|
| 1 | +Development |
| 2 | +=========== |
| 3 | + |
| 4 | +To contribute to `pytest-html` you can use `Pipenv`_ to manage |
| 5 | +a python virtual environment and `pre-commit <https://pre-commit.com/>`_ to help you with |
| 6 | +styling and formatting. |
| 7 | + |
| 8 | +To setup the virtual environment and pre-commit, run: |
| 9 | + |
| 10 | +.. code-block:: bash |
| 11 | +
|
| 12 | + $ pipenv install --dev |
| 13 | + $ pipenv run pre-commit install |
| 14 | +
|
| 15 | +If you're not using `Pipenv`_, to install `pre-commit`, run: |
| 16 | + |
| 17 | +.. code-block:: bash |
| 18 | +
|
| 19 | + $ pip install pre-commit |
| 20 | + $ pre-commit install |
| 21 | +
|
| 22 | +
|
| 23 | +Automated Testing |
| 24 | +----------------- |
| 25 | + |
| 26 | +All pull requests and merges are tested in `Travis CI <https://travis-ci.org/>`_ |
| 27 | +based on the ``.travis.yml`` file. |
| 28 | + |
| 29 | +Usually, a link to your specific travis build appears in pull requests, but if |
| 30 | +not, you can find it on the |
| 31 | +`pull requests page <https://travis-ci.org/pytest-dev/pytest-base-url/pull_requests>`_ |
| 32 | + |
| 33 | +The only way to trigger Travis CI to run again for a pull request, is to submit |
| 34 | +another change to the pull branch. |
| 35 | + |
| 36 | +You can do this with `git commit --allow-empty` |
| 37 | + |
| 38 | +Running Tests |
| 39 | +------------- |
| 40 | + |
| 41 | +You will need `Tox <http://tox.testrun.org/>`_ installed to run the tests |
| 42 | +against the supported Python versions. If you're using `Pipenv`_ it will be |
| 43 | +installed for you. |
| 44 | + |
| 45 | +With `Pipenv`_, run: |
| 46 | + |
| 47 | +.. code-block:: bash |
| 48 | +
|
| 49 | + $ pipenv run tox |
| 50 | +
|
| 51 | +Otherwise, to install and run, do: |
| 52 | + |
| 53 | +.. code-block:: bash |
| 54 | +
|
| 55 | + $ pip install tox |
| 56 | + $ tox |
| 57 | +
|
| 58 | +Releasing a new version |
| 59 | +----------------------- |
| 60 | + |
| 61 | +Follow these steps to release a new version of the project: |
| 62 | + |
| 63 | +1. Update your local master with the upstream master (``git pull --rebase upstream master``) |
| 64 | +2. Create a new branch and update ``CHANGES.rst`` with the new version, today's date, and all changes/new features |
| 65 | +3. Commit and push the new branch and then create a new pull request |
| 66 | +4. Wait for tests and reviews and then merge the branch |
| 67 | +5. Once merged, update your local master again (``git pull --rebase upstream master``) |
| 68 | +6. Tag the release with the new release version (``git tag v<new tag>``) |
| 69 | +7. Push the tag (``git push upstream --tags``) |
| 70 | +8. Done. You can monitor the progress on `Travis <https://travis-ci.org/pytest-dev/pytest-base-url/>`_ |
0 commit comments