From 71e6f2c4f35dafc9b8f5b6f7e6489964928fb00c Mon Sep 17 00:00:00 2001 From: Hiroki Takezawa Date: Tue, 12 Apr 2022 10:22:43 -0700 Subject: [PATCH] Initialize repo from template --- .flake8 | 7 + .github/workflows/ci_cd.yml | 81 +++++++++++ .gitignore | 158 +++++++++++++++++++++ .pre-commit-config.yaml | 28 ++++ LICENSE | 21 +++ README.rst | 165 ++++++++++++++++++++++ doc/Makefile | 26 ++++ doc/make.bat | 41 ++++++ doc/source/_static/README.md | 1 + doc/source/_templates/README.md | 1 + doc/source/_templates/sidebar-nav-bs.html | 10 ++ doc/source/conf.py | 83 +++++++++++ doc/source/index.rst | 6 + pyproject.toml | 50 +++++++ requirements/requirements_build.txt | 2 + requirements/requirements_doc.txt | 4 + requirements/requirements_tests.txt | 2 + src/ansys/edb/core/__init__.py | 12 ++ tests/test_metadata.py | 5 + tox.ini | 47 ++++++ 20 files changed, 750 insertions(+) create mode 100644 .flake8 create mode 100644 .github/workflows/ci_cd.yml create mode 100644 .gitignore create mode 100644 .pre-commit-config.yaml create mode 100644 LICENSE create mode 100644 README.rst create mode 100644 doc/Makefile create mode 100644 doc/make.bat create mode 100644 doc/source/_static/README.md create mode 100644 doc/source/_templates/README.md create mode 100644 doc/source/_templates/sidebar-nav-bs.html create mode 100644 doc/source/conf.py create mode 100644 doc/source/index.rst create mode 100644 pyproject.toml create mode 100644 requirements/requirements_build.txt create mode 100644 requirements/requirements_doc.txt create mode 100644 requirements/requirements_tests.txt create mode 100644 src/ansys/edb/core/__init__.py create mode 100644 tests/test_metadata.py create mode 100644 tox.ini diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000000..41573c4a45 --- /dev/null +++ b/.flake8 @@ -0,0 +1,7 @@ +[flake8] +exclude = venv, __init__.py, doc/_build, .venv +select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, E501, F401, F403 +count = True +max-complexity = 10 +max-line-length = 100 +statistics = True diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml new file mode 100644 index 0000000000..568e204197 --- /dev/null +++ b/.github/workflows/ci_cd.yml @@ -0,0 +1,81 @@ +name: GitHub CI +on: + pull_request: + push: + tags: + - "*" + branches: + - main + +jobs: + + style: + name: Code style + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Install dependencies + run: | + python -m pip install --upgrade pip flit tox + - name: Test with tox + run: tox -e style + + + tests: + name: Tests and coverage + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, ubuntu-latest] + python-version: ['3.7', '3.8', '3.9', '3.10'] + fail-fast: false + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip flit tox tox-gh-actions + - name: Test with tox + # Only the tox environment specified in the tox.ini gh-actions is run + run: tox + + + docs: + name: Documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Install dependencies + run: | + python -m pip install --upgrade pip flit tox + - name: Generate the documentation with tox + run: tox -e doc + + + build: + name: Build library + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Install dependencies and build the library + run: | + python -m pip install --upgrade pip flit + python -m pip install -r requirements/requirements_build.txt + flit build + python -m twine check dist/* diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..97a53435a9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,158 @@ +# Created by https://www.toptal.com/developers/gitignore/api/python +# Edit at https://www.toptal.com/developers/gitignore?templates=python + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +doc/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +# End of https://www.toptal.com/developers/gitignore/api/python diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..bfe33e4076 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,28 @@ +repos: + +- repo: https://github.com/psf/black + rev: 22.3.0 + hooks: + - id: black + +- repo: https://github.com/pycqa/isort + rev: 5.10.1 + hooks: + - id: isort + +- repo: https://gitlab.com/PyCQA/flake8 + rev: 4.0.1 + hooks: + - id: flake8 + +- repo: https://github.com/codespell-project/codespell + rev: v2.1.0 + hooks: + - id: codespell + +- repo: https://github.com/pycqa/pydocstyle + rev: 6.1.1 + hooks: + - id: pydocstyle + additional_dependencies: [toml] + exclude: "^(tests/)" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..ea581cdfa6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 ANSYS, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000000..49f86b8411 --- /dev/null +++ b/README.rst @@ -0,0 +1,165 @@ +Pyedb core +========== + +Ansys Electronics Database Python Client + + +How to install +-------------- + +At least two installation modes are provided: user and developer. + +For users +^^^^^^^^^ + +In order to install Pyedb core, make sure you +have the required build system tool. To do so, run: + +.. code:: bash + + python -m pip install -U pip flit + +Then, you can simply execute: + +.. code:: bash + + python -m pip install ansys-edb-core + +For developers +^^^^^^^^^^^^^^ + +Installing Pyedb core in developer mode allows +you to modify the source and enhance it. + +Before contributing to the project, please refer to the `PyAnsys Developer's guide`_. You will +need to follow these steps: + +1. Start by cloning this repository: + + .. code:: bash + + git clone https://github.com/pyansys/pyedb-core + +2. Create a fresh-clean Python environment and activate it: + + .. code:: bash + + # Create a virtual environment + python -m venv .venv + + # Activate it in a Linux environment + python -m venv .venv && source .venv/bin/activate + + # Activate it in a Windows CMD environment + source .venv\Scripts\activate.bat + + # Activate it in a Windows Powershell environment + source .venv\Scripts\Activate.ps1 + + +3. Make sure you have the latest required build system and doc, testing, and CI tools: + + .. 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 + + +4. Install the project in editable mode: + + .. code:: bash + + python -m pip install --editable ansys-edb-core + + 5. 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 py3X**: being X the minor version of your Python environment. Checks for unit tests. +- **tox -e py3X-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 +environment, which is the reason why tools like `tox`_ exist. + + +A note on pre-commit +^^^^^^^^^^^^^^^^^^^^ + +The style checks take advantage of `pre-commit`_. Developers are not forced but +encouraged to install this tool via: + +.. code:: bash + + python -m pip install pre-commit && pre-commit install + + +Documentation +------------- + +For building documentation, you can either run the usual rules provided in the +`Sphinx`_ Makefile, such us: + +.. code:: bash + + 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/html/index.html + + +Distributing +------------ + +If you would like to create either source or wheel files, start by installing +the building requirements: + +.. code:: bash + + python -m pip install -r requirements/requirements_build.txt + +Then, you can execute: + +.. code:: bash + + flit build + python -m twine check dist/* + +.. LINKS AND REFERENCES +.. _black: https://github.com/psf/black +.. _flake8: https://flake8.pycqa.org/en/latest/ +.. _isort: https://github.com/PyCQA/isort +.. _PyAnsys Developer's guide: https://dev.docs.pyansys.com/ +.. _pre-commit: https://pre-commit.com/ +.. _pytest: https://docs.pytest.org/en/stable/ +.. _Sphinx: https://www.sphinx-doc.org/en/master/ +.. _tox: https://tox.wiki/ diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000000..d5066f423c --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,26 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = -j auto +SPHINXBUILD = sphinx-build +SOURCEDIR = source +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + + +# Customized clean due to examples gallery +clean: + rm -rf $(BUILDDIR)/* + rm -rf $(SOURCEDIR)/examples + find . -type d -name "_autosummary" -exec rm -rf {} + diff --git a/doc/make.bat b/doc/make.bat new file mode 100644 index 0000000000..fbf400507e --- /dev/null +++ b/doc/make.bat @@ -0,0 +1,41 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=_build + +if "%1" == "" goto help +if "%1" == "clean" goto clean + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:clean +rmdir /s /q %BUILDDIR% > /NUL 2>&1 +for /d /r %SOURCEDIR% %%d in (_autosummary) do @if exist "%%d" rmdir /s /q "%%d" +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/doc/source/_static/README.md b/doc/source/_static/README.md new file mode 100644 index 0000000000..ff7796e464 --- /dev/null +++ b/doc/source/_static/README.md @@ -0,0 +1 @@ +Static files will be found here (like images and other assets). diff --git a/doc/source/_templates/README.md b/doc/source/_templates/README.md new file mode 100644 index 0000000000..86a233caad --- /dev/null +++ b/doc/source/_templates/README.md @@ -0,0 +1 @@ +## Contains templates for the documentation build diff --git a/doc/source/_templates/sidebar-nav-bs.html b/doc/source/_templates/sidebar-nav-bs.html new file mode 100644 index 0000000000..0554e82eba --- /dev/null +++ b/doc/source/_templates/sidebar-nav-bs.html @@ -0,0 +1,10 @@ + diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 0000000000..e65623839a --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,83 @@ +"""Sphinx documentation configuration file.""" +from datetime import datetime + +from pyansys_sphinx_theme import pyansys_logo_black + +from ansys.edb.core import __version__ + +# Project information +project = "ansys-edb-core" +copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved" +author = "ANSYS, Inc." +release = version = __version__ + +# use the default pyansys logo +html_logo = pyansys_logo_black +html_theme = "pyansys_sphinx_theme" + +html_short_title = html_title = "ansys-edb-core" + +# specify the location of your github repo +html_theme_options = { + "github_url": "https://github.com/pyansys/pyedb-core", + "show_prev_next": False, + "show_breadcrumbs": True, + "additional_breadcrumbs": [ + ("PyAnsys", "https://docs.pyansys.com/"), + ], +} + +# Sphinx extensions +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "numpydoc", + "sphinx.ext.intersphinx", + "sphinx_copybutton", +] + +# Intersphinx mapping +intersphinx_mapping = { + "python": ("https://docs.python.org/dev", None), + # kept here as an example + # "scipy": ("https://docs.scipy.org/doc/scipy/reference", None), + # "numpy": ("https://numpy.org/devdocs", None), + # "matplotlib": ("https://matplotlib.org/stable", None), + # "pandas": ("https://pandas.pydata.org/pandas-docs/stable", None), + # "pyvista": ("https://docs.pyvista.org/", None), +} + +# numpydoc configuration +numpydoc_show_class_members = False +numpydoc_xref_param_type = True + +# Consider enabling numpydoc validation. See: +# https://numpydoc.readthedocs.io/en/latest/validation.html# +numpydoc_validate = True +numpydoc_validation_checks = { + "GL06", # Found unknown section + "GL07", # Sections are in the wrong order. + "GL08", # The object does not have a docstring + "GL09", # Deprecation warning should precede extended summary + "GL10", # reST directives {directives} must be followed by two colons + "SS01", # No summary found + "SS02", # Summary does not start with a capital letter + # "SS03", # Summary does not end with a period + "SS04", # Summary contains heading whitespaces + # "SS05", # Summary must start with infinitive verb, not third person + "RT02", # The first line of the Returns section should contain only the + # type, unless multiple values are being returned" +} + + +# static path +html_static_path = ["_static"] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ["_templates"] + +# The suffix(es) of source filenames. +source_suffix = ".rst" + +# The master toctree document. +master_doc = "index" diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 0000000000..d2824a5f6e --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,6 @@ +.. + Just reuse the root readme to avoid duplicating the documentation. + Provide any documentation specific to your online documentation + here. + +.. include:: ../../README.rst diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..f23aa66409 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,50 @@ +[build-system] +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" + +[project] +# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections +name = "ansys-edb-core" +version = "0.1" +description = "Ansys electronics database python client" +readme = "README.rst" +requires-python = ">=3.7" +license = {file = "LICENSE"} +authors = [ + {name = "ANSYS, Inc.", email = "pyansys.support@ansys.com"}, +] +maintainers = [ + {name = "PyAnsys developers", email = "pyansys.maintainers@ansys.com"}, +] + +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] +dependencies = [ + "importlib-metadata >=4.0", +] + +[tool.flit.module] +name = "ansys.edb.core" + +[project.urls] +Source = "https://github.com/pyansys/pyedb-core" + +[tool.black] +line-length = 100 + +[tool.isort] +profile = "black" +force_sort_within_sections = true +line_length = 100 +default_section = "THIRDPARTY" +src_paths = ["doc", "src", "tests"] + +[tool.coverage.run] +source = ["ansys.edb"] + +[tool.coverage.report] +show_missing = true diff --git a/requirements/requirements_build.txt b/requirements/requirements_build.txt new file mode 100644 index 0000000000..a18c98ac99 --- /dev/null +++ b/requirements/requirements_build.txt @@ -0,0 +1,2 @@ +build>=0.7.0 +twine>=3.8 diff --git a/requirements/requirements_doc.txt b/requirements/requirements_doc.txt new file mode 100644 index 0000000000..04fdab5c64 --- /dev/null +++ b/requirements/requirements_doc.txt @@ -0,0 +1,4 @@ +Sphinx>=4.4 +numpydoc>=1.2 +pyansys_sphinx_theme>=0.2 +Sphinx-copybutton>=0.4 diff --git a/requirements/requirements_tests.txt b/requirements/requirements_tests.txt new file mode 100644 index 0000000000..a7a65165e3 --- /dev/null +++ b/requirements/requirements_tests.txt @@ -0,0 +1,2 @@ +pytest>=7.1.0 +pytest-cov>=3.0.0 diff --git a/src/ansys/edb/core/__init__.py b/src/ansys/edb/core/__init__.py new file mode 100644 index 0000000000..0aac5f3f2c --- /dev/null +++ b/src/ansys/edb/core/__init__.py @@ -0,0 +1,12 @@ +""" +edb. + +core +""" + +try: + import importlib.metadata as importlib_metadata +except ModuleNotFoundError: + import importlib_metadata + +__version__ = importlib_metadata.version(__name__.replace(".", "-")) diff --git a/tests/test_metadata.py b/tests/test_metadata.py new file mode 100644 index 0000000000..afd04417f4 --- /dev/null +++ b/tests/test_metadata.py @@ -0,0 +1,5 @@ +from ansys.edb.core import __version__ + + +def test_pkg_version(): + assert __version__ == "0.1" diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..3d204c58a8 --- /dev/null +++ b/tox.ini @@ -0,0 +1,47 @@ +[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 + {style,reformat,doc,build}: python3 +setenv = + PYTHONUNBUFFERED = yes + coverage: PYTEST_EXTRA_ARGS = --cov=ansys.edb --cov-report=term --cov-report=xml --cov-report=html +deps = + -r{toxinidir}/requirements/requirements_tests.txt +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