Skip to content

Latest commit

 

History

History
121 lines (79 loc) · 4.6 KB

CONTRIBUTING.md

File metadata and controls

121 lines (79 loc) · 4.6 KB

Contributing to AIStore

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.

Contribution Workflow

The AIStore project repository maintains a contribution structure in which everyone proposes changes to the codebase via pull requests. To contribute to AIStore:

  1. Fork the repository,
  2. Create branch for issue,
  3. Test changes,
  4. Format changes,
  5. Commit changes (w/ sign-off),
  6. Squash commits,
  7. Create a pull request.

Formatting Operator Changes

AIStore operator maintains a few formatting rules to ensure a consistent coding style. These rules are checked and enforced by gofmt, etc. Before committing any changes, make sure to check (or fix) all changes against the formatting rules as follows:

$ cd operator

# 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

Testing Operator Changes

Before committing any changes, run the following tests to verify any added changes to the codebase. Refer to operator Development and Test sections for more details.

Signing-Off Commits

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.

Squashing Commits

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>

Raise an Issue

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

  1. 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.