diff --git a/README.rst b/README.rst index a58971f0..f6fccceb 100644 --- a/README.rst +++ b/README.rst @@ -90,10 +90,9 @@ need to follow these steps: .. code:: bash - python -m pip install -U pip flit tox - python -m pip install -r requirements/requirements_build.txt - python -m pip install -r requirements/requirements_doc.txt - python -m pip install -r requirements/requirements_tests.txt + python -m pip install .[test] + python -m pip install .[doc] + python -m pip install .[build] #. Install the project in editable mode: @@ -101,37 +100,12 @@ need to follow these steps: .. code:: bash python -m pip install --editable ansys-tools-path - - #. Finally, verify your development installation by running: - .. code:: bash - - tox How to testing -------------- -This project takes advantage of `tox`_. This tool allows to automate common -development tasks (similar to Makefile) but it is oriented towards Python -development. - -Using tox -^^^^^^^^^ - -As Makefile has rules, `tox`_ has environments. In fact, the tool creates its -own virtual environment so anything being tested is isolated from the project in -order to guarantee project's integrity. The following environments commands are provided: - -- **tox -e style**: will check for coding style quality. -- **tox -e py**: checks for unit tests. -- **tox -e py-coverage**: checks for unit testing and code coverage. -- **tox -e doc**: checs for documentation building process. - - -Raw testing -^^^^^^^^^^^ - If required, you can always call the style commands (`black`_, `isort`_, `flake8`_...) or unit testing ones (`pytest`_) from the command line. However, this does not guarantee that your project is being tested in an isolated @@ -159,12 +133,6 @@ For building documentation, you can either run the usual rules provided in the make -C doc/ html && your_browser_name doc/html/index.html -However, the recommended way of checking documentation integrity is using: - -.. code:: bash - - tox -e doc && your_browser_name .tox/doc_out/index.html - Distributing ------------ @@ -174,7 +142,7 @@ the building requirements and then executing the build module: .. code:: bash - python -m pip install -r requirements/requirements_build.txt + python -m pip install .[build] python -m build python -m twine check dist/* diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 41a30d46..00000000 --- a/tox.ini +++ /dev/null @@ -1,48 +0,0 @@ -[tox] -description = Default tox environments list -envlist = - style,{py37,py38,py39,py310}{,-coverage},doc -skip_missing_interpreters = true -isolated_build = true -isolated_build_env = build - -[gh-actions] -description = The tox environment to be executed in gh-actions for a given python version -python = - 3.7: style,py37-coverage,doc - 3.8: style,py38-coverage,doc - 3.9: style,py39-coverage,doc - 3.10: style,py310-coverage,doc - -[testenv] -description = Checks for project unit tests and coverage (if desired) -basepython = - py37: python3.7 - py38: python3.8 - py39: python3.9 - py310: python3.10 - py: python3 - {style,reformat,doc,build}: python3 -deps = - -r{toxinidir}/requirements/requirements_tests.txt -setenv = - PYTHONUNBUFFERED = yes - coverage: PYTEST_EXTRA_ARGS = --cov=ansys.tools --cov-report=term --cov-report=xml:.cov/xml --cov-report=html:.cov/html -commands = - pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv} - -[testenv:style] -description = Checks project code style -skip_install = true -deps = - pre-commit -commands = - pre-commit install - pre-commit run --all-files --show-diff-on-failure - -[testenv:doc] -description = Check if documentation generates properly -deps = - -r{toxinidir}/requirements/requirements_doc.txt -commands = - sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -bhtml