The AIStore project repository follows an open source model where anyone is allowed and encouraged to contribute. However, contributing to AIStore has a few guidelines that must be followed.
The AIStore project repository maintains a contribution structure in which everyone proposes changes to the codebase via pull requests. To contribute to AIStore:
- Fork the repository,
- Create branch for issue,
- Test changes,
- Format changes,
- Commit changes (w/ sign-off),
- Squash commits,
- Create a pull request.
AIStore maintains a few formatting rules to ensure a consistent coding style. These rules are checked and enforced by black
, pylint
, gofmt
, etc. Before committing any changes, make sure to check (or fix) all changes against the formatting rules as follows:
$ cd aistore
# Run linter on entire codebase
$ make lint
# Check code formatting
$ make fmt-check
# Fix code formatting
$ make fmt-fix
# Check for any misspelled words
$ make spell-check
For more information, run
make help
.
Before committing any changes, run the following tests to verify any added changes to the codebase:
$ cd aistore
# Run short tests
$ BUCKET=tmp make test-short
# Run all tests
$ BUCKET=<existing-cloud-bucket> make test-long
To run Python-related tests:
$ cd aistore/python
# Run all Python tests
$ make python_tests
# Run Python sdk tests
$ make python_sdk_tests
# Run Python ETL tests
$ make python_etl_tests
# Run Python botocore monkey patch tests
$ make python_botocore_tests
All contributors must sign-off on each commit. This certifies that each contribution is that contributor's original work per the following Developer Certificate of Origin1.
Commits can be signed off by using the git
command's --signoff
(or -s
) option:
$ git commit -s -m "Add new feature"
This will append the following type of footer to the commit message:
Signed-off-by: Your Name <[email protected]>
Note: Commits that are not signed-off cannot be accepted or merged.
If a pull request contains more than one commit, squash all commits into one.
The basic squashing workflow is as follows:
git checkout <your-pr-branch>
git rebase -i HEAD~<# of commits to squash>
If a bug requires more attention, raise an issue here. We will try to respond to the issue as soon as possible.
Please give the issue an appropriate title and include detailed information on the issue at hand.
Footnotes
-
Developer Certificate of Origin
↩Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.