|
| 1 | +============ |
| 2 | +Contributing |
| 3 | +============ |
| 4 | + |
| 5 | +Contributions are welcome, and they are greatly appreciated! Every little bit |
| 6 | +helps, and credit will always be given. |
| 7 | + |
| 8 | +You can contribute in many ways: |
| 9 | + |
| 10 | +Types of Contributions |
| 11 | +---------------------- |
| 12 | + |
| 13 | +Report Bugs |
| 14 | +~~~~~~~~~~~ |
| 15 | + |
| 16 | +Report bugs at https://github.com/fpgmaas/cookiecutter-poetry/issues |
| 17 | + |
| 18 | +If you are reporting a bug, please include: |
| 19 | + |
| 20 | +* Your operating system name and version. |
| 21 | +* Any details about your local setup that might be helpful in troubleshooting. |
| 22 | +* Detailed steps to reproduce the bug. |
| 23 | + |
| 24 | +Fix Bugs |
| 25 | +~~~~~~~~ |
| 26 | + |
| 27 | +Look through the GitHub issues for bugs. Anything tagged with "bug" |
| 28 | +and "help wanted" is open to whoever wants to implement a fix for it. |
| 29 | + |
| 30 | +Implement Features |
| 31 | +~~~~~~~~~~~~~~~~~~ |
| 32 | + |
| 33 | +Look through the GitHub issues for features. Anything tagged with "enhancement" |
| 34 | +and "help wanted" is open to whoever wants to implement it. |
| 35 | + |
| 36 | +Write Documentation |
| 37 | +~~~~~~~~~~~~~~~~~~~ |
| 38 | + |
| 39 | +Cookiecutter PyPackage could always use more documentation, whether as part of |
| 40 | +the official docs, in docstrings, or even on the web in blog posts, articles, |
| 41 | +and such. |
| 42 | + |
| 43 | +Submit Feedback |
| 44 | +~~~~~~~~~~~~~~~ |
| 45 | + |
| 46 | +The best way to send feedback is to file an issue at |
| 47 | +https://github.com/fpgmaas/cookiecutter-poetry/issues. |
| 48 | + |
| 49 | +If you are proposing a new feature: |
| 50 | + |
| 51 | +* Explain in detail how it would work. |
| 52 | +* Keep the scope as narrow as possible, to make it easier to implement. |
| 53 | +* Remember that this is a volunteer-driven project, and that contributions |
| 54 | + are welcome :) |
| 55 | + |
| 56 | +Get Started! |
| 57 | +------------ |
| 58 | + |
| 59 | +Ready to contribute? Here's how to set up `cookiecutter-poetry` for local |
| 60 | +development. Please note this documentation assumes you already have |
| 61 | +`poetry` and `Git` installed and ready to go. |
| 62 | + |
| 63 | +| 1. Fork the `cookiecutter-poetry` repo on GitHub. |
| 64 | +
|
| 65 | +| 2. Clone your fork locally: |
| 66 | +
|
| 67 | + .. code-block:: bash |
| 68 | +
|
| 69 | + cd <directory_in_which_repo_should_be_created> |
| 70 | + git clone [email protected]:YOUR_NAME/cookiecutter-poetry.git |
| 71 | +
|
| 72 | +
|
| 73 | +| 3. Now we need to install the environment. Navigate into the directory |
| 74 | +
|
| 75 | + .. code-block:: bash |
| 76 | +
|
| 77 | + cd cookiecutter-poetry |
| 78 | +
|
| 79 | + If you are using ``pyenv``, select a version to use locally. (See installed versions with ``pyenv versions``) |
| 80 | + |
| 81 | + .. code-block:: bash |
| 82 | +
|
| 83 | + pyenv local <x.y.z> |
| 84 | +
|
| 85 | + Then, install and activate the environment with: |
| 86 | + |
| 87 | + .. code-block:: bash |
| 88 | +
|
| 89 | + poetry install |
| 90 | + poetry shell |
| 91 | +
|
| 92 | +| 4. Create a branch for local development: |
| 93 | +
|
| 94 | + .. code-block:: bash |
| 95 | +
|
| 96 | + git checkout -b name-of-your-bugfix-or-feature |
| 97 | +
|
| 98 | + Now you can make your changes locally. |
| 99 | + |
| 100 | + |
| 101 | +| 5. Don't forget to add test cases for your added functionality to the ``tests`` directory. |
| 102 | +
|
| 103 | +| 6. When you're done making changes, check that your changes pass the formatting tests. |
| 104 | +
|
| 105 | + .. code-block:: bash |
| 106 | +
|
| 107 | + make lint |
| 108 | +
|
| 109 | +| 7. Now, validate that all unit tests are passing: |
| 110 | +
|
| 111 | + .. code-block:: bash |
| 112 | +
|
| 113 | + make test |
| 114 | +
|
| 115 | +| 8. Before raising a pull request you should also run tox. This will run the |
| 116 | + tests across different versions of Python: |
| 117 | +
|
| 118 | + .. code-block:: bash |
| 119 | +
|
| 120 | + tox |
| 121 | +
|
| 122 | + This requires you to have multiple versions of python installed. |
| 123 | + This step is also triggered in the CI/CD pipeline, so you could also choose to skip this |
| 124 | + step locally. |
| 125 | + |
| 126 | +| 9. Reflect your changes in the dcoumentation. Update relevant files in the ``docs`` directory, |
| 127 | + and potentially the ``README``.You can check the updated documentation with |
| 128 | +
|
| 129 | + .. code-block:: bash |
| 130 | +
|
| 131 | + make docs |
| 132 | +
|
| 133 | +| 10. Commit your changes and push your branch to GitHub: |
| 134 | +
|
| 135 | + .. code-block:: bash |
| 136 | +
|
| 137 | + git add . |
| 138 | + git commit -m "Your detailed description of your changes." |
| 139 | + git push origin name-of-your-bugfix-or-feature |
| 140 | +
|
| 141 | +| 11. Submit a pull request through the GitHub website. |
| 142 | +
|
| 143 | +Pull Request Guidelines |
| 144 | +--------------------------- |
| 145 | + |
| 146 | +Before you submit a pull request, check that it meets these guidelines: |
| 147 | + |
| 148 | +1. The pull request should include tests. |
| 149 | + |
| 150 | +2. If the pull request adds functionality, the docs should be updated. Put your |
| 151 | + new functionality into a function with a docstring, and add the feature to |
| 152 | + the list in README.rst. |
0 commit comments