|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Any contributions are welcome! |
| 4 | + |
| 5 | +Open new issues at https://github.com/DataCrunch-io/datacrunch-python/issues. |
| 6 | + |
| 7 | +You can open pull requests by following the steps: |
| 8 | + |
| 9 | +## Code Contribution |
| 10 | + |
| 11 | +1. Fork the `datacrunch-python` repo on GitHub. |
| 12 | + |
| 13 | +2. Clone your fork locally: |
| 14 | + |
| 15 | + ```bash |
| 16 | + git clone git@github.com:{your_username}/datacrunch-python.git |
| 17 | + cd datacrunch-python |
| 18 | + ``` |
| 19 | + |
| 20 | +3. Create virtual environment & install this local copy into the virtual environment: |
| 21 | + |
| 22 | + ```bash |
| 23 | + python3 -m venv datacrunch_env && source ./datacrunch_env/bin/activate |
| 24 | + python3 setup.py develop |
| 25 | + ``` |
| 26 | + |
| 27 | +4. Create a new branch: |
| 28 | + |
| 29 | + if it's a feature: |
| 30 | + |
| 31 | + ```bash |
| 32 | + git checkout -b feature/new-feature-name |
| 33 | + ``` |
| 34 | + |
| 35 | + or a bugfix: |
| 36 | + |
| 37 | + ```bash |
| 38 | + git checkout -b fix/some-bugfix |
| 39 | + ``` |
| 40 | + |
| 41 | +5. Make your local changes |
| 42 | + |
| 43 | +6. Install dependencies for test: |
| 44 | + |
| 45 | + ```bash |
| 46 | + pip3 install -e .[test] |
| 47 | + pip3 install -U pytest |
| 48 | + ``` |
| 49 | + |
| 50 | +7. Run tests: |
| 51 | + |
| 52 | + ```bash |
| 53 | + pytest |
| 54 | + ``` |
| 55 | + |
| 56 | +8. Commit and push: |
| 57 | + |
| 58 | + ```bash |
| 59 | + git commit .am "Detailed commit message" |
| 60 | + git push origin {branch-name} |
| 61 | + ``` |
| 62 | + |
| 63 | +9. Submit a pull request in GitHub. |
| 64 | + |
| 65 | +## Pull Request Guidelines |
| 66 | + |
| 67 | +1. The pull request should include tests. |
| 68 | +2. Please add documentation docstrings and type hinting to any new feature. |
| 69 | + |
| 70 | +## Release Guidelines |
| 71 | + |
| 72 | +Some steps for releasing a new version: |
| 73 | + |
| 74 | +1. Update the version in `__version__.py` |
| 75 | +2. Add an entry to the CHANGELOG.md file |
| 76 | +3. `git tag v{major}.{minor}.{patch}` |
| 77 | +4. `git push master` |
| 78 | +5. `git push --tags` |
| 79 | +6. [Draft and publish](https://github.com/DataCrunch-io/datacrunch-python/releases) a new release. |
| 80 | +7. Check that package is automatically published to [PyPI](https://pypi.org/project/datacrunch/) via [GitHub action](https://github.com/DataCrunch-io/datacrunch-python/actions/workflows/publish_package.yml). |
0 commit comments