From 182545d39aa104c3b4be42958316ceee9a45da14 Mon Sep 17 00:00:00 2001 From: pavel Date: Sat, 20 Jan 2024 00:00:05 +0300 Subject: [PATCH] improve contributing.rst rename `just test-all` to `just test-all-seq`, `just test-all-p` to `just test-all` --- docs/reference/contributing.rst | 62 ++++++++++++++++++++++++--------- justfile | 4 +-- 2 files changed, 48 insertions(+), 18 deletions(-) diff --git a/docs/reference/contributing.rst b/docs/reference/contributing.rst index 767567eb..d98e07d1 100644 --- a/docs/reference/contributing.rst +++ b/docs/reference/contributing.rst @@ -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 `_. .. 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 `_. 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 diff --git a/justfile b/justfile index 5796bce2..00569a22 100644 --- a/justfile +++ b/justfile @@ -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