@@ -59,14 +59,18 @@ is done as follows:
59
59
60
60
.. note ::
61
61
62
- The ``.pre-commit-config.yaml `` file was changed such that some hooks are
63
- now run on ``pre-push ``. If you have an old development environment, please
64
- run ``pre-commit install `` again to update the git hooks.
62
+ ``.pre-commit-config.yaml `` is configured to run the hooks using python
63
+ 3.12. Thus, you need to have python 3.12 installed for pre-commit to work.
65
64
66
65
The ``pre-push `` stage runs several hooks (tests, doctests, mypy, coverage) that
67
- take some time. These are intended to let developers know problems which must be
68
- resolved for any pull request to be considered for merging. If you wish to push
69
- without running these hooks, use the command ``git push --no-verify ``.
66
+ take some time. These hooks are intended to inform developers of issues that
67
+ must be resolved before any pull request can be considered for merging. If you
68
+ wish to push without running these hooks, use the command ``git push
69
+ --no-verify ``.
70
+
71
+ Formatting of the code is done automatically by pre-commit. If some pre-commit
72
+ hooks fail and you decide to skip them, the formatting will be automatically
73
+ applied by a github action in pull requests.
70
74
71
75
Documentation
72
76
-------------
86
90
Running the unit tests can be done either using using `pytest
87
91
<https://docs.pytest.org/> `__ or `tox
88
92
<https://tox.readthedocs.io/en/stable/> `__. The tests are also installed with
89
- the package, thus can be run in a production system.
93
+ the package, thus can be run in a production system. Also pre-commit runs some
94
+ additional tests.
90
95
91
96
.. code-block :: bash
92
97
@@ -96,6 +101,9 @@ the package, thus can be run in a production system.
96
101
python -m jsonargparse_tests # Run tests on installed package (requires pytest and pytest-subtests)
97
102
pre-commit run -a --hook-stage pre-push # Run pre-push git hooks (tests, doctests, mypy, coverage)
98
103
104
+ Coverage
105
+ --------
106
+
99
107
For a nice html test coverage report, run:
100
108
101
109
.. code-block :: bash
0 commit comments