|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Contributions are welcome, and they are greatly appreciated! Every little contribution |
| 4 | +helps, and credit will always be given. |
| 5 | + |
| 6 | +You can contribute in many ways: |
| 7 | + |
| 8 | +# Types of Contributions |
| 9 | + |
| 10 | +## Report Bugs |
| 11 | + |
| 12 | +Report bugs at https://github.com/SurPathHub/Dayong/issues. |
| 13 | + |
| 14 | +If you are reporting a bug, please include: |
| 15 | + |
| 16 | +* Any details about your local setup that might be helpful in troubleshooting. |
| 17 | +* Detailed steps to reproduce the bug. |
| 18 | + |
| 19 | +## Fix Bugs |
| 20 | + |
| 21 | +Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it. |
| 22 | + |
| 23 | +## Implement Features |
| 24 | + |
| 25 | +Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it. |
| 26 | + |
| 27 | +## Write Documentation |
| 28 | + |
| 29 | +Dayong could always use more documentation, whether as part of the official Dayong docs, in docstrings, or even on the web in blog posts, articles, and such. |
| 30 | + |
| 31 | +## Submit Feedback |
| 32 | + |
| 33 | +The best way to send feedback is to file an issue at https://github.com/SurPathHub/Dayong/issues. |
| 34 | + |
| 35 | +If you are proposing a feature: |
| 36 | + |
| 37 | +* Explain in detail how it would work. |
| 38 | +* Keep the scope as narrow as possible, to make it easier to implement. |
| 39 | +* Remember that this is a volunteer-driven project, and that contributions are welcome. |
| 40 | + |
| 41 | +## Get Started |
| 42 | + |
| 43 | +Ready to contribute? Here's how to set up `Dayong` for local development. |
| 44 | + |
| 45 | +1. Fork the `Dayong` repo on GitHub. |
| 46 | +2. Clone your fork locally |
| 47 | + |
| 48 | + ``` |
| 49 | + $ git clone https://github.com/SurPathHub/Dayong.git |
| 50 | + ``` |
| 51 | +
|
| 52 | +3. Install your local copy into a virtualenv. Assuming you have python [poetry](https://github.com/python-poetry/poetry) installed, this is how you set up your fork for local development |
| 53 | +
|
| 54 | + ``` |
| 55 | + $ cd Dayong/ |
| 56 | + $ poetry shell |
| 57 | + $ poetry install |
| 58 | + ``` |
| 59 | +
|
| 60 | +4. Create a branch for local development |
| 61 | +
|
| 62 | + ``` |
| 63 | + $ git checkout -b name-of-your-bugfix-or-feature |
| 64 | + ``` |
| 65 | +
|
| 66 | + Now you can make your changes locally. |
| 67 | +
|
| 68 | +5. When you're done making changes, check that your changes pass flake8, pylint, and pyright. |
| 69 | +
|
| 70 | + ``` |
| 71 | + $ flake8 dayong |
| 72 | + $ pylint dayong |
| 73 | + $ pyright dayong |
| 74 | + ``` |
| 75 | +
|
| 76 | +## Commit Message Guidelines |
| 77 | +Dayong uses precise rules over how git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, git commit messages are used to generate the change log. For instructions, head over to this site: https://www.conventionalcommits.org/en/v1.0.0/. |
| 78 | +
|
| 79 | +``` |
| 80 | +$ git add . |
| 81 | +$ git commit -m "<type>(<scope>): <subject>" |
| 82 | +``` |
| 83 | +
|
| 84 | +## Pull Request Guidelines |
| 85 | +
|
| 86 | +Please open an issue before submitting, unless it's just a typo or some other small error. |
| 87 | +
|
| 88 | +Before you submit a pull request, check that it meets these guidelines: |
| 89 | +
|
| 90 | +1. If the pull request adds functionality, the docs should be updated. Implement your functionality with a docstring if needed. |
| 91 | +2. The pull request should work for Python 3.9 and above. |
| 92 | +
|
| 93 | +Before making changes to the code, install the development requirements using |
| 94 | +
|
| 95 | +``` |
| 96 | +$ poetry install |
| 97 | +``` |
| 98 | +
|
| 99 | +Before committing, stage your files and run style and linter checks |
| 100 | +
|
| 101 | +``` |
| 102 | +$ black dayong/ # apply codestyle |
| 103 | +$ isort --profile black dayong/ # sort imports |
| 104 | +$ flake8 dayong/ |
| 105 | +$ pylint dayong/ |
| 106 | +$ pyright dayong/ # optional static type checking |
| 107 | +``` |
0 commit comments