Skip to content

Commit f374f59

Browse files
authored
Docs: Update contrib docs (#627)
1 parent 2085c61 commit f374f59

File tree

2 files changed

+38
-13
lines changed

2 files changed

+38
-13
lines changed

docs/development.rst

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
Development
22
===========
33

4-
To contribute to `pytest-html` you can use `Pipenv`_ to manage a python virtual environment and
4+
To contribute to `pytest-html` you can use `Hatch`_ to manage a python virtual environment and
55
`pre-commit`_ to help you with styling and formatting.
66

77
To setup the virtual environment and pre-commit, run:
88

99
.. code-block:: bash
1010
11-
$ pipenv install --dev
12-
$ pipenv run pre-commit install
11+
$ hatch -e test run pre-commit install
1312
14-
If you're not using `Pipenv`_, run the following to install `pre-commit`_:
13+
If you're not using `Hatch`_, run the following to install `pre-commit`_:
1514

1615
.. code-block:: bash
1716
@@ -35,14 +34,31 @@ Running Tests
3534
Python
3635
~~~~~~
3736

38-
You will need `Tox`_ installed to run the tests against the supported Python versions. If you're using `Pipenv`_
37+
You will need `Tox`_ and `Docker`_ installed to run the tests against the supported Python versions. If you're using `Hatch`_
3938
it will be installed for you.
4039

41-
With `Pipenv`_, run:
40+
The integration tests requires `Docker`_ as we have to render the report.
41+
This is then done using `Selenium`_ and `BeautifulSoup`_
42+
43+
To start the image needed, run:
44+
45+
.. code-block:: bash
46+
47+
$ ./start
48+
49+
Sometimes the image becomes unresponsive and needs a restart:
50+
51+
.. code-block:: bash
52+
53+
$ ./start down && ./start
54+
55+
You can watch the tests in your browser at `localhost:7900`, the password is `secret`.
56+
57+
To run the tests with `Hatch`_, run:
4258

4359
.. code-block:: bash
4460
45-
$ pipenv run tox
61+
$ hatch -e test run tox
4662
4763
Otherwise, to install and run, do:
4864

@@ -54,7 +70,7 @@ Otherwise, to install and run, do:
5470
JavaScript
5571
~~~~~~~~~~
5672

57-
You will need `npm`_ installed to run the JavaScript tests. Internally, we use `Grunt`_ and `QUnit`_ to run the tests.
73+
You will need `npm`_ installed to run the JavaScript tests. Internally, we use `Mocha`_, `Chai`_, `Sinon`_ to run the tests.
5874

5975
Once `npm`_ is installed, you can install all needed dependencies by running:
6076

@@ -66,7 +82,7 @@ Run the following to execute the tests:
6682

6783
.. code-block:: bash
6884
69-
$ npm test
85+
$ npm run unit
7086
7187
Documentation
7288
-------------
@@ -110,18 +126,22 @@ Follow these steps to release a new version of the project:
110126
#. Commit and push the new branch and then create a new pull request
111127
#. Wait for tests and reviews and then merge the branch
112128
#. Once merged, update your local master again (``git pull --rebase upstream master``)
113-
#. Tag the release with the new release version (``git tag v<new tag>``)
129+
#. Tag the release with the new release version (``git tag <new tag>``)
114130
#. Push the tag (``git push upstream --tags``)
115131
#. Done. Check `Github Actions`_ for release progress.
116132

117133
.. _GitHub Actions: https://github.com/pytest-dev/pytest-html/actions
118-
.. _Grunt: https://gruntjs.com
134+
.. _Mocha: https://mochajs.org/
119135
.. _npm: https://www.npmjs.com
120-
.. _Pipenv: https://pipenv.pypa.io/en/latest
136+
.. _Hatch: https://hatch.pypa.io/latest/
121137
.. _pre-commit: https://pre-commit.com
122-
.. _QUnit: https://qunitjs.com
138+
.. _Chai: https://www.chaijs.com/
139+
.. _Sinon: https://sinonjs.org/
123140
.. _Read The Docs: https://readthedocs.com
124141
.. _RST: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
125142
.. _SASS/SCSS: https://sass-lang.com
126143
.. _the changelog: https://pytest-html.readthedocs.io/en/latest/changelog.html
127144
.. _Tox: https://tox.readthedocs.io
145+
.. _Docker: https://www.docker.com/
146+
.. _Selenium: https://www.selenium.dev/
147+
.. _BeautifulSoup: https://beautiful-soup-4.readthedocs.io/en/latest/

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ Source = "https://github.com/pytest-dev/pytest-html"
7070
[project.entry-points.pytest11]
7171
html = "pytest_html.plugin"
7272

73+
[tool.hatch.envs.test]
74+
features = [
75+
"test",
76+
]
77+
7378
[tool.hatch.version]
7479
source = "vcs"
7580

0 commit comments

Comments
 (0)