To contribute to pytest-html you can use Pipenv to manage a python virtual environment and pre-commit to help you with styling and formatting.
To setup the virtual environment and pre-commit, run:
$ pipenv install --dev
$ pipenv run pre-commit install
If you're not using Pipenv, run the following to install pre-commit:
$ pip install pre-commit
$ pre-commit install
All pull requests and merges are tested in GitHub Actions which are defined inside .github
folder.
To retrigger CI to run again for a pull request, you either use dropdown option, close and reopen pull-request or to just update the branch containing it.
You can do this with git commit --allow-empty
You will need Tox installed to run the tests against the supported Python versions. If you're using Pipenv it will be installed for you.
With Pipenv, run:
$ pipenv run tox
Otherwise, to install and run, do:
$ pip install tox
$ tox
You will need npm installed to run the JavaScript tests. Internally, we use Grunt and QUnit to run the tests.
Once npm is installed, you can install all needed dependencies by running:
$ npm install
Run the following to execute the tests:
$ npm test
Documentation is hosted on Read the Docs, and is written in RST. Remember to add any new files to the toctree
section in index.rst
.
To build your documentation, run:
$ tox -e docs
You can then run a local webserver to verify your changes compiled correctly.
You will need npm installed to compile the CSS, which is generated via SASS/SCSS.
Once npm is installed, you can install all needed dependencies by running:
$ npm install
Run the following to generate the CSS:
$ npm run build:css
Follow these steps to release a new version of the project:
- Update your local main with the upstream main (
git pull --rebase upstream main
) - Create a new branch
- Update the changelog with the new version, today's date, and all changes/new features
- Commit and push the new branch and then create a new pull request
- Wait for tests and reviews and then merge the branch
- Once merged, update your local main again (
git pull --rebase upstream main
) - Tag the release with the new release version (
git tag v<new tag>
) - Push the tag (
git push upstream --tags
) - Done. Check Github Actions for release progress.