Skip to content

Commit

Permalink
improve contributing.rst
Browse files Browse the repository at this point in the history
rename `just test-all` to `just test-all-seq`, `just test-all-p` to `just test-all`
  • Loading branch information
zhPavel committed Jan 19, 2024
1 parent f90fdf4 commit 182545d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 18 deletions.
62 changes: 46 additions & 16 deletions docs/reference/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,69 +55,99 @@ Tools overview
Venv managing
----------------

Bootstrap
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Initial preparation of venv and repo for developing.

.. code-block:: bash
just bootstrap
Initial preparation venv and repo for developing.
Deps sync
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Sync all dependencies. Need to run if committed dependencies are changed.

.. code-block:: bash
just venv-sync
Sync all dependencies. Need to run if committed dependencies are changed.
Linting
----------------

Run linters
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Run all linters. Should be executed before tests.

.. code-block:: bash
just lint
Run all linters. Should be executed before tests.
Testing
----------------

Run basic tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Sequentially run basic tests on all python versions. It is useful to rapidly check that the code is working.

.. code-block:: bash
just test
Run basic tests on all python versions. It is useful to rapidly check that the code is working
Run all tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Parallelly run all tests on all python versions.

.. code-block:: bash
just test-all-p
just test-all
Run all tests (sequentially)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Run all tests on all python versions parallelly.
Sequentially run all tests on all python versions. Failed parallel runs can have unclear output.

.. code-block:: bash
just test-all
just test-all-seq
Run all tests on all python versions. Failed parallel runs can have unclear output.
Produce coverage report
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Create coverage report. All coverage reports will be merged into ``coverage.xml`` file at working directory.
You can import it to IDE. Instruction for
`PyCharm <https://www.jetbrains.com/help/pycharm/switching-between-code-coverage-suites.html#add-remove-coverage-suite>`_.

.. code-block:: bash
just cov
Produce coverage report. All coverage reports will be merged into ``coverage.xml`` file at working directory.
You can import it to IDE. Instruction for
`PyCharm <https://www.jetbrains.com/help/pycharm/switching-between-code-coverage-suites.html#add-remove-coverage-suite>`_.
Documentation
----------------

.. code-block:: bash
just doc
Build documentation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Build documentation.
Generate html files with documentation. Output files will be placed in ``docs-build/html``.

.. code-block:: bash
just doc-clean
just doc
Clean generated documentation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Clean generated documentation and build cache.
Sometimes sphinx can not detect changes in non-rst files.
This command fixes it.

.. code-block:: bash
just doc-clean
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ set windows-powershell := true
tox -e $(tox list --no-desc | grep '^py' | grep 'new$' | tr '\n' ',')

# run all tests on all python versions
@test-all:
@test-all-seq:
tox -e $(tox list --no-desc | grep '^py' | sort -r | tr '\n' ',')

# run all tests on all python versions parallelly
@test-all-p:
@test-all:
tox -e $(tox list --no-desc | grep '^py' | sort -r | tr '\n' ',') -p auto

# run all tests on specific python version
Expand Down

0 comments on commit 182545d

Please sign in to comment.