|
1 | 1 | # Contributing to Django-PGCrypto-Fields
|
2 | 2 |
|
3 |
| -We welcome contributions in many forms: |
| 3 | +Contributions are welcome, and they are greatly appreciated! Every little bit |
| 4 | +helps, and credit will always be given. |
| 5 | + |
| 6 | +You can contribute in many ways: |
4 | 7 |
|
5 | 8 | * Code patches and enhancements
|
6 | 9 | * Documentation improvements
|
7 | 10 | * Bug reports and patch reviews
|
8 | 11 |
|
9 |
| -## Running Tests |
| 12 | +## Types of Contributions |
| 13 | + |
| 14 | +### Report Bugs |
| 15 | + |
| 16 | +Report bugs at https://github.com/incuna/django-pgcrypto-fields/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 | +Look through the GitHub issues for bugs. Anything tagged with "bug" and "help |
| 27 | +wanted" is open to whoever wants to implement it. |
| 28 | + |
| 29 | +### Implement Features |
| 30 | + |
| 31 | +Look through the GitHub issues for features. Anything tagged with "enhancement" |
| 32 | +and "help wanted" is open to whoever wants to implement it. |
| 33 | + |
| 34 | +### Write Documentation |
| 35 | + |
| 36 | +django-pgcrypto-fields could always use more documentation, whether as part of the |
| 37 | +official django-pgcrypto-fields docs, in docstrings, or even on the web in blog posts, |
| 38 | +articles, and such. |
| 39 | + |
| 40 | +### Submit Feedback |
| 41 | + |
| 42 | +The best way to send feedback is to file an issue at https://github.com/incuna/django-pgcrypto-fields/issues |
| 43 | + |
| 44 | +If you are proposing a feature: |
| 45 | + |
| 46 | +* Explain in detail how it would work. |
| 47 | +* Keep the scope as narrow as possible, to make it easier to implement. |
| 48 | +* Remember that this is a volunteer-driven project, and that contributions |
| 49 | + are welcome :-) |
| 50 | + |
| 51 | +## Get Started! |
| 52 | + |
| 53 | +Ready to contribute? Here's how to set up `django-pgcrypto-fields` for local development. |
| 54 | + |
| 55 | +1. Fork the `django-pgcrypto-fields` repo on GitHub. |
| 56 | +2. Clone your fork locally: |
| 57 | + |
| 58 | + ```bash |
| 59 | + $ git clone [email protected]:your_name_here/pgcrypto.git |
| 60 | + ``` |
| 61 | + |
| 62 | +3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development: |
| 63 | + |
| 64 | + ```bash |
| 65 | + $ mkvirtualenv django-pgcrypto-fields |
| 66 | + $ cd django-pgcrypto-fields/ |
| 67 | + $ pip install -r requirements_dev.txt --upgrade |
| 68 | + ``` |
| 69 | + |
| 70 | +4. Create a branch for local development: |
| 71 | + |
| 72 | + ```bash |
| 73 | + $ git checkout -b name-of-your-bugfix-or-feature |
| 74 | + ``` |
| 75 | + |
| 76 | + Now you can make your changes locally. |
| 77 | + |
| 78 | +5. When you're done making changes, check that your changes pass flake8 and the |
| 79 | + tests: |
| 80 | +
|
| 81 | + ```bash |
| 82 | + $ make test |
| 83 | + ``` |
| 84 | +
|
| 85 | + To get flake8 and tox, just pip install them into your virtualenv. |
| 86 | +
|
| 87 | +6. Commit your changes and push your branch to GitHub: |
| 88 | +
|
| 89 | + ```bash |
| 90 | + $ git add . |
| 91 | + $ git commit -m "Your detailed description of your changes." |
| 92 | + $ git push origin name-of-your-bugfix-or-feature |
| 93 | + ``` |
| 94 | +
|
| 95 | +7. Submit a pull request through the GitHub website. |
10 | 96 |
|
11 |
| -* Install requirements to a virtual environment |
12 |
| -* Setup a local PostgreSQL server |
13 |
| -* Create a PostreSQL database named `pgcrypto_fields` |
14 |
| -* In a terminal, run `make test` |
| 97 | +### Pull Request Guidelines |
15 | 98 |
|
| 99 | +Before you submit a pull request, check that it meets these guidelines: |
16 | 100 |
|
17 |
| -## Releasing to PyPI |
| 101 | +1. The pull request should include tests. |
| 102 | +2. If the pull request adds functionality, the docs should be updated. Put |
| 103 | + your new functionality into a function with a docstring, and add the |
| 104 | + feature to the list in README.rst. |
| 105 | +3. The pull request should work for Python 3.4, 3.5 and 3.7. Check |
| 106 | + https://travis-ci.org/incuna/django-pgcrypto-fields/pull_requests |
| 107 | + and make sure that the tests pass for all supported Python versions. |
18 | 108 |
|
19 |
| -This section only applies to maintainers. |
| 109 | +### Deploying |
20 | 110 |
|
21 |
| -In your virtual environment, run |
| 111 | +A reminder for the maintainers on how to deploy. |
| 112 | +Make sure all your changes are committed (including an entry in CHANGELOG.md). |
| 113 | +Then run: |
22 | 114 |
|
23 |
| -* `pip install pip --upgrade` |
24 |
| -* `pip install setuptools wheel twine` |
25 |
| -* `make release` |
| 115 | +```bash |
| 116 | +$ make release |
| 117 | +``` |
0 commit comments