How to contribute¶
Important
The markup used for the documentation is reStructuredText.
We maintain the EEW Simulation Package for Python as an open-source project for common interest. To allow your contributions if provided via a pull-request, you should follow the following rules:
Make sure the package can be installed from source (requires to remove the pre-installed version as bellow or to increment version number):
python -m pip uninstall pyshake python -m pip install ./
Make sure all dependencies are listed in requirements.txt.
Make sure version number is upgraded in setup.py in order to trigger pip update and consistent with docs/conf.py (variable release).
Make sure all features are documented and test documentation with (requires sphinx installed) and check the result (open _build/html/index.html):
sphinx-apidoc -f -o docs pyshake cd docs make clean html
Submit your contribution via a pull request from a branch of a fork, see the example below.
Please make sure your commits and pull requests are properly described following common best practices such as https://www.atlassian.com/blog/git/written-unwritten-guide-pull-requests.
Know that the title of your pull request will be used as the default merge message for all squashed commits (https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests).
Please also be patient with the maintenance team, and remember that your help is very welcomed!
How to PR from fork branch¶
Create a fork of the main project online at https://github.com/ATTAC-EEW-in-Central-America/pyShake
Clone the main project, and go in the clone:
git clone https://github.com/ATTAC-EEW-in-Central-America/pyShake cd pyShake
Setup pushing to your fork (e.g., with mine, have your own instead):
git remote set-url --add --push origin https://github.com/<YOUR USER NAME>/pyShake
Push your contribution to a branch of your fork:
git checkout -b <CONTRIB NAME> git add <files with contrib> git commit git push origin <CONTRIB NAME>
Note
Note that git provides a direct link to create your pull request, e.g.:
... remote: Create a pull request for '<CONTRIB NAME>' on GitHub by visiting: remote: https://github.com/ATTAC-EEW-in-Central-America/pyshake
Bonus¶
Project owners might push minor contribution from their master branch to both their forks and the main project repo:
git push all master