Contribution Guide
Style Guidelines
In general, code style should follow PEP8 and PEP20. Specifics are summarized below:
Code should be indented using spaces, not tabs. One indentation = 4 spaces
Lines longer than 100 should be manually wrapped, but prefer readability
Minimize blank lines: 2 around top level classes functions, 1 in nested functions
Workflows, Fireworks, and Firetasks should follow the same naming scheme as in atomate
Include docstrings for classes and functions (see code), add comments where needed
Function and variable names should be descriptive (not ‘x’ or ‘xx’) and all lowercase_with_underscores
Class names should be descriptive CapitalWords
How to Contribute
It is recommended to first install anaconda if one does not have it installed yet.
Register an account in www.github.com or www.gitlab.com, depending on where the package that you want to contribute to is resided.
Sign into your web account
find the the package that you want to contribute to
make a fork by click the sign on top-right corner of the repositary (for instance, see the web site of DFTTK)
go back to your web account, you will see the forked repositary shown in your account
login in your local machine
clone the repository to your local machine and go to/create a folder that you want to reside your contribution, then install the development version by
git clone https://github.com/PhasesResearchLab/dfttk.git cd dfttk pip install -e . dfttk config -mp -aci #a folder named "config" will be created where running environmental info saved
Create a new branch for your addition or changes (
git checkout -b mybranchname
), something like
git checkout -b yourhname # "yourhname" is a name that you prefered to use
Write codes or make changes and commit them to your branch. (#Note from me, try your best not changing the original codes, only focusing expanding codes will save a lot of troubles when merging your changes to the package)
git commit -am "your notation for the changes"
Push your branch to the repository
git push #push your changes to github/gitlab
*When and only when your are sure that your changes are completely correct*
, submit a pull request by going to your web account and click the sign of on the top-left side of your repository
After you submit a merge request, other members of the group are able to review your changes and give feedback. Someone with a rank of Master or higher in the project can merge your commits into the master branch.