diff --git a/.constraints/py3.10.txt b/.constraints/py3.10.txt index 4d3438af..4bdf58cb 100644 --- a/.constraints/py3.10.txt +++ b/.constraints/py3.10.txt @@ -14,12 +14,12 @@ babel==2.9.1 backcall==0.2.0 backports.entry-points-selectable==1.1.1 beautifulsoup4==4.10.0 -black==21.11b1 +black==21.12b0 bleach==4.1.0 certifi==2021.10.8 cffi==1.15.0 cfgv==3.3.1 -charset-normalizer==2.0.8 +charset-normalizer==2.0.9 click==7.1.2 colorama==0.4.4 coverage==6.2 @@ -56,7 +56,7 @@ imagesize==1.3.0 importlib-metadata==4.8.2 iniconfig==1.1.1 ipykernel==6.6.0 -ipython==7.30.0 +ipython==7.30.1 ipython-genutils==0.2.0 ipywidgets==7.6.5 isort==5.10.1 @@ -95,7 +95,7 @@ nbclient==0.5.9 nbconvert==6.3.0 nbdime==3.1.1 nbformat==5.1.3 -nbmake==1.0 +nbmake==1.1 nest-asyncio==1.5.4 nodeenv==1.6.0 notebook==6.4.6 @@ -126,7 +126,7 @@ pydocstyle==6.1.1 pydot==1.4.2 pyflakes==2.4.0 pygments==2.10.0 -pylint==2.12.1 +pylint==2.12.2 pyparsing==3.0.6 pyrsistent==0.18.0 pytest==6.2.5 @@ -140,8 +140,7 @@ pytz==2021.3 pyyaml==6.0 pyzmq==22.3.0 qtconsole==5.2.1 -qtpy==1.11.2 -regex==2021.11.10 +qtpy==1.11.3 requests==2.26.0 restructuredtext-lint==1.3.2 send2trash==1.8.0 diff --git a/.constraints/py3.6.txt b/.constraints/py3.6.txt index 8bf5ae58..78ee1540 100644 --- a/.constraints/py3.6.txt +++ b/.constraints/py3.6.txt @@ -15,12 +15,12 @@ babel==2.9.1 backcall==0.2.0 backports.entry-points-selectable==1.1.1 beautifulsoup4==4.10.0 -black==21.11b1 +black==21.12b0 bleach==4.1.0 certifi==2021.10.8 cffi==1.15.0 cfgv==3.3.1 -charset-normalizer==2.0.8 +charset-normalizer==2.0.9 click==7.1.2 colorama==0.4.4 contextvars==2.4 @@ -97,7 +97,7 @@ nbclient==0.5.9 nbconvert==6.0.7 nbdime==3.1.1 nbformat==5.1.3 -nbmake==1.0 +nbmake==1.1 nest-asyncio==1.5.4 nodeenv==1.6.0 notebook==6.4.6 @@ -128,7 +128,7 @@ pydocstyle==6.1.1 pydot==1.4.2 pyflakes==2.4.0 pygments==2.10.0 -pylint==2.12.1 +pylint==2.12.2 pyparsing==3.0.6 pyrsistent==0.18.0 pytest==6.2.5 @@ -142,8 +142,7 @@ pytz==2021.3 pyyaml==6.0 pyzmq==22.3.0 qtconsole==5.2.1 -qtpy==1.11.2 -regex==2021.11.10 +qtpy==1.11.3 requests==2.26.0 restructuredtext-lint==1.3.2 send2trash==1.8.0 diff --git a/.constraints/py3.7.txt b/.constraints/py3.7.txt index e246c068..cf270db3 100644 --- a/.constraints/py3.7.txt +++ b/.constraints/py3.7.txt @@ -15,12 +15,12 @@ babel==2.9.1 backcall==0.2.0 backports.entry-points-selectable==1.1.1 beautifulsoup4==4.10.0 -black==21.11b1 +black==21.12b0 bleach==4.1.0 certifi==2021.10.8 cffi==1.15.0 cfgv==3.3.1 -charset-normalizer==2.0.8 +charset-normalizer==2.0.9 click==7.1.2 colorama==0.4.4 coverage==6.2 @@ -57,7 +57,7 @@ importlib-metadata==4.2.0 importlib-resources==5.4.0 iniconfig==1.1.1 ipykernel==6.6.0 -ipython==7.30.0 +ipython==7.30.1 ipython-genutils==0.2.0 ipywidgets==7.6.5 isort==5.10.1 @@ -96,7 +96,7 @@ nbclient==0.5.9 nbconvert==6.3.0 nbdime==3.1.1 nbformat==5.1.3 -nbmake==1.0 +nbmake==1.1 nest-asyncio==1.5.4 nodeenv==1.6.0 notebook==6.4.6 @@ -127,7 +127,7 @@ pydocstyle==6.1.1 pydot==1.4.2 pyflakes==2.4.0 pygments==2.10.0 -pylint==2.12.1 +pylint==2.12.2 pyparsing==3.0.6 pyrsistent==0.18.0 pytest==6.2.5 @@ -141,8 +141,7 @@ pytz==2021.3 pyyaml==6.0 pyzmq==22.3.0 qtconsole==5.2.1 -qtpy==1.11.2 -regex==2021.11.10 +qtpy==1.11.3 requests==2.26.0 restructuredtext-lint==1.3.2 send2trash==1.8.0 diff --git a/.constraints/py3.8.txt b/.constraints/py3.8.txt index d0cf9ba8..6cbefaa1 100644 --- a/.constraints/py3.8.txt +++ b/.constraints/py3.8.txt @@ -14,12 +14,12 @@ babel==2.9.1 backcall==0.2.0 backports.entry-points-selectable==1.1.1 beautifulsoup4==4.10.0 -black==21.11b1 +black==21.12b0 bleach==4.1.0 certifi==2021.10.8 cffi==1.15.0 cfgv==3.3.1 -charset-normalizer==2.0.8 +charset-normalizer==2.0.9 click==7.1.2 colorama==0.4.4 coverage==6.2 @@ -57,7 +57,7 @@ importlib-metadata==4.8.2 importlib-resources==5.4.0 iniconfig==1.1.1 ipykernel==6.6.0 -ipython==7.30.0 +ipython==7.30.1 ipython-genutils==0.2.0 ipywidgets==7.6.5 isort==5.10.1 @@ -96,7 +96,7 @@ nbclient==0.5.9 nbconvert==6.3.0 nbdime==3.1.1 nbformat==5.1.3 -nbmake==1.0 +nbmake==1.1 nest-asyncio==1.5.4 nodeenv==1.6.0 notebook==6.4.6 @@ -127,7 +127,7 @@ pydocstyle==6.1.1 pydot==1.4.2 pyflakes==2.4.0 pygments==2.10.0 -pylint==2.12.1 +pylint==2.12.2 pyparsing==3.0.6 pyrsistent==0.18.0 pytest==6.2.5 @@ -141,8 +141,7 @@ pytz==2021.3 pyyaml==6.0 pyzmq==22.3.0 qtconsole==5.2.1 -qtpy==1.11.2 -regex==2021.11.10 +qtpy==1.11.3 requests==2.26.0 restructuredtext-lint==1.3.2 send2trash==1.8.0 diff --git a/.constraints/py3.9.txt b/.constraints/py3.9.txt index 9f1621a6..de6056fc 100644 --- a/.constraints/py3.9.txt +++ b/.constraints/py3.9.txt @@ -14,12 +14,12 @@ babel==2.9.1 backcall==0.2.0 backports.entry-points-selectable==1.1.1 beautifulsoup4==4.10.0 -black==21.11b1 +black==21.12b0 bleach==4.1.0 certifi==2021.10.8 cffi==1.15.0 cfgv==3.3.1 -charset-normalizer==2.0.8 +charset-normalizer==2.0.9 click==7.1.2 colorama==0.4.4 coverage==6.2 @@ -56,7 +56,7 @@ imagesize==1.3.0 importlib-metadata==4.8.2 iniconfig==1.1.1 ipykernel==6.6.0 -ipython==7.30.0 +ipython==7.30.1 ipython-genutils==0.2.0 ipywidgets==7.6.5 isort==5.10.1 @@ -95,7 +95,7 @@ nbclient==0.5.9 nbconvert==6.3.0 nbdime==3.1.1 nbformat==5.1.3 -nbmake==1.0 +nbmake==1.1 nest-asyncio==1.5.4 nodeenv==1.6.0 notebook==6.4.6 @@ -126,7 +126,7 @@ pydocstyle==6.1.1 pydot==1.4.2 pyflakes==2.4.0 pygments==2.10.0 -pylint==2.12.1 +pylint==2.12.2 pyparsing==3.0.6 pyrsistent==0.18.0 pytest==6.2.5 @@ -140,8 +140,7 @@ pytz==2021.3 pyyaml==6.0 pyzmq==22.3.0 qtconsole==5.2.1 -qtpy==1.11.2 -regex==2021.11.10 +qtpy==1.11.3 requests==2.26.0 restructuredtext-lint==1.3.2 send2trash==1.8.0 diff --git a/.cspell.json b/.cspell.json index 7563f162..f4d305b2 100644 --- a/.cspell.json +++ b/.cspell.json @@ -118,6 +118,7 @@ "asdot", "astuple", "autoupdate", + "bdist", "cano", "celltoolbar", "codacy", @@ -180,6 +181,7 @@ "precommit", "prefactor", "preorder", + "prereleased", "pygments", "pylance", "pylintrc", @@ -190,6 +192,7 @@ "rightarrow", "risch", "rtfd", + "sdist", "seealso", "sharex", "startswith", diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 5067fcca..afe566ac 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,5 +1,3 @@ -# cspell:ignore bdist noreply prereleased sdist - name: CD on: @@ -10,16 +8,27 @@ on: jobs: push: - name: Push to stable branch + name: Push to version branches if: startsWith(github.ref, 'refs/tags') runs-on: ubuntu-20.04 steps: - uses: actions/checkout@master - - name: Push to stable branch + - name: Configure Git credentials run: | git config --global user.name "GitHub Action" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git push origin HEAD:refs/heads/stable -f + - name: Push to stable branch + run: | + git push origin HEAD:refs/heads/stable --force + - name: Push to matching minor version branch + env: + TAG: ${{ github.ref_name }} + run: | + re='^([0-9]+)\.([0-9]+)\.[0-9]+' + if [[ $TAG =~ $re ]]; then + MINOR_VERSION_BRANCH="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.x" + git push origin HEAD:refs/heads/$MINOR_VERSION_BRANCH --force + fi pypi: name: Publish to PyPI diff --git a/.github/workflows/requirements-pr.yml b/.github/workflows/requirements-pr.yml index 417495e2..83900bd3 100644 --- a/.github/workflows/requirements-pr.yml +++ b/.github/workflows/requirements-pr.yml @@ -7,9 +7,28 @@ on: - epic/* jobs: - pip-constraints: - name: Update pip constraints files + diff: + name: Check dependency changes if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Determine dependency changes + run: | + DIFF="$(git diff origin/main --color -- .constraints .pre-commit-config.yaml setup.cfg)" + echo ::set-output name=diff::"${DIFF}" + id: diff + outputs: + diff: ${{ steps.diff.outputs.diff }} + + pip-constraints: + name: Update pip constraints + needs: diff + if: > + github.event.pull_request.head.repo.full_name == github.repository && + needs.diff.outputs.diff != '' # Only run if PR does not come from a fork # https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow runs-on: ubuntu-20.04 @@ -24,39 +43,29 @@ jobs: - "3.10" steps: - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Check if there are dependency changes - run: | - DIFF="$(git diff origin/main --color -- .constraints setup.cfg)" - echo ::set-output name=diff::"${DIFF}" - id: diff - uses: ComPWA/update-pip-constraints@main - if: steps.diff.outputs.diff != '' with: python-version: ${{ matrix.python-version }} pre-commit: name: pre-commit autoupdate - if: github.event.pull_request.head.repo.full_name == github.repository + needs: diff + if: > + github.event.pull_request.head.repo.full_name == github.repository && + needs.diff.outputs.diff != '' runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Check if there are changes to pre-commit config - run: | - DIFF="$(git diff origin/main --color -- .pre-commit-config.yaml)" - echo ::set-output name=diff::"${DIFF}" - id: diff - uses: ComPWA/update-pre-commit@main - if: steps.diff.outputs.diff != '' push: name: Push changes - if: github.event.pull_request.head.repo.full_name == github.repository + if: > + github.event.pull_request.head.repo.full_name == github.repository && + needs.diff.outputs.diff != '' runs-on: ubuntu-20.04 needs: + - diff - pip-constraints - pre-commit steps: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c8f87c95..7ebf19c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/ComPWA/repo-maintenance - rev: 0.0.90 + rev: 0.0.93 hooks: - id: check-dev-files args: @@ -54,7 +54,7 @@ repos: - id: format-setup-cfg - repo: https://github.com/psf/black - rev: 21.11b1 + rev: 21.12b0 hooks: - id: black @@ -64,7 +64,7 @@ repos: - id: blacken-docs - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v5.6.10 + rev: v5.6.11 hooks: - id: cspell @@ -126,7 +126,7 @@ repos: metadata.toc-showmarkdowntxt metadata.toc-showtags - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.5.0 + rev: v2.5.1 hooks: - id: prettier @@ -136,7 +136,7 @@ repos: - id: pydocstyle - repo: https://github.com/ComPWA/mirrors-pyright - rev: v1.1.191 + rev: v1.1.192 hooks: - id: pyright diff --git a/src/qrules/_implementers.py b/src/qrules/_implementers.py index 7f4d66cf..4967e869 100644 --- a/src/qrules/_implementers.py +++ b/src/qrules/_implementers.py @@ -1,13 +1,14 @@ """A collection of implementation tools to can be used accross all modules.""" -from typing import Any, Callable, Type, TypeVar +from typing import TYPE_CHECKING, Any, Callable, Type, TypeVar import attr -try: - from IPython.lib.pretty import PrettyPrinter -except ImportError: - PrettyPrinter = Any +if TYPE_CHECKING: + try: + from IPython.lib.pretty import PrettyPrinter + except ImportError: + PrettyPrinter = Any _DecoratedClass = TypeVar("_DecoratedClass") @@ -27,7 +28,7 @@ def decorator( " attrs" ) - def repr_pretty(self: Any, p: PrettyPrinter, cycle: bool) -> None: + def repr_pretty(self: Any, p: "PrettyPrinter", cycle: bool) -> None: class_name = type(self).__name__ if cycle: p.text(f"{class_name}(...)") diff --git a/src/qrules/io/_dict.py b/src/qrules/io/_dict.py index bee8b83c..c0a23095 100644 --- a/src/qrules/io/_dict.py +++ b/src/qrules/io/_dict.py @@ -1,3 +1,4 @@ +# pylint: disable=import-outside-toplevel """Serialization from and to a `dict`.""" import json @@ -6,7 +7,6 @@ from typing import Any, Dict import attr -import jsonschema from qrules.particle import ( Parity, @@ -184,6 +184,8 @@ def build_topology(definition: dict) -> Topology: def validate_particle_collection(instance: dict) -> None: + import jsonschema + jsonschema.validate(instance=instance, schema=__SCHEMA_PARTICLES) diff --git a/src/qrules/particle.py b/src/qrules/particle.py index df859ca8..d1d9551b 100644 --- a/src/qrules/particle.py +++ b/src/qrules/particle.py @@ -1,3 +1,4 @@ +# pylint: disable=import-outside-toplevel """A collection of particle info containers. The :mod:`.particle` module is the starting point of `qrules`. Its main @@ -18,6 +19,7 @@ from functools import total_ordering from math import copysign from typing import ( + TYPE_CHECKING, Any, Callable, Dict, @@ -33,16 +35,18 @@ import attr from attr.converters import optional from attr.validators import instance_of -from particle import Particle as PdgDatabase -from particle.particle import enums from .conservation_rules import GellMannNishijimaInput, gellmann_nishijima from .quantum_numbers import Parity, _to_fraction -try: - from IPython.lib.pretty import PrettyPrinter -except ImportError: - PrettyPrinter = Any +if TYPE_CHECKING: + from particle import Particle as PdgDatabase + from particle.particle import enums + + try: + from IPython.lib.pretty import PrettyPrinter + except ImportError: + PrettyPrinter = Any def _to_float(value: SupportsFloat) -> float: @@ -104,7 +108,7 @@ def __neg__(self) -> "Spin": def __repr__(self) -> str: return f"{self.__class__.__name__}{(self.magnitude, self.projection)}" - def _repr_pretty_(self, p: PrettyPrinter, _: bool) -> None: + def _repr_pretty_(self, p: "PrettyPrinter", _: bool) -> None: class_name = type(self).__name__ magnitude = _to_fraction(self.magnitude) projection = _to_fraction(self.projection, render_plus=True) @@ -232,7 +236,7 @@ def is_lepton(self) -> bool: or self.tau_lepton_number != 0 ) - def _repr_pretty_(self, p: PrettyPrinter, cycle: bool) -> None: + def _repr_pretty_(self, p: "PrettyPrinter", cycle: bool) -> None: class_name = type(self).__name__ if cycle: p.text(f"{class_name}(...)") @@ -334,7 +338,7 @@ def __repr__(self) -> str: output += "})" return output - def _repr_pretty_(self, p: PrettyPrinter, cycle: bool) -> None: + def _repr_pretty_(self, p: "PrettyPrinter", cycle: bool) -> None: class_name = type(self).__name__ if cycle: p.text(f"{class_name}(...)") @@ -534,6 +538,8 @@ def load_pdg() -> ParticleCollection: PDG info is imported from the `scikit-hep/particle `_ package. """ + from particle import Particle as PdgDatabase + all_pdg_particles = PdgDatabase.findall( lambda item: item.charge is not None and item.charge.is_integer() # remove quarks @@ -562,7 +568,7 @@ def __sign(value: Union[float, int]) -> int: # cspell:ignore pdgid -def __convert_pdg_instance(pdg_particle: PdgDatabase) -> Particle: +def __convert_pdg_instance(pdg_particle: "PdgDatabase") -> Particle: def convert_mass_width(value: Optional[float]) -> float: if value is None: return 0.0 @@ -603,7 +609,7 @@ def convert_mass_width(value: Optional[float]) -> float: def __compute_quark_numbers( - pdg_particle: PdgDatabase, + pdg_particle: "PdgDatabase", ) -> Tuple[int, int, int, int]: strangeness = 0 charmness = 0 @@ -624,7 +630,7 @@ def __compute_quark_numbers( def __compute_lepton_numbers( - pdg_particle: PdgDatabase, + pdg_particle: "PdgDatabase", ) -> Tuple[int, int, int]: electron_lepton_number = 0 muon_lepton_number = 0 @@ -640,11 +646,11 @@ def __compute_lepton_numbers( return electron_lepton_number, muon_lepton_number, tau_lepton_number -def __compute_baryonnumber(pdg_particle: PdgDatabase) -> int: +def __compute_baryonnumber(pdg_particle: "PdgDatabase") -> int: return int(__sign(pdg_particle.pdgid) * pdg_particle.pdgid.is_baryon) -def __create_isospin(pdg_particle: PdgDatabase) -> Optional[Spin]: +def __create_isospin(pdg_particle: "PdgDatabase") -> Optional[Spin]: if pdg_particle.I is None: return None magnitude = pdg_particle.I @@ -652,7 +658,7 @@ def __create_isospin(pdg_particle: PdgDatabase) -> Optional[Spin]: return Spin(magnitude, projection) -def __isospin_projection_from_pdg(pdg_particle: PdgDatabase) -> float: +def __isospin_projection_from_pdg(pdg_particle: "PdgDatabase") -> float: if pdg_particle.charge is None: raise ValueError(f"PDG instance has no charge:\n{pdg_particle}") if "qq" in pdg_particle.quarks.lower(): @@ -678,14 +684,16 @@ def __isospin_projection_from_pdg(pdg_particle: PdgDatabase) -> float: return projection -def __filter_quark_content(pdg_particle: PdgDatabase) -> str: +def __filter_quark_content(pdg_particle: "PdgDatabase") -> str: matches = re.search(r"([dDuUsScCbBtT+-]{2,})", pdg_particle.quarks) if matches is None: return "" return matches[1] -def __create_parity(parity_enum: enums.Parity) -> Optional[Parity]: +def __create_parity(parity_enum: "enums.Parity") -> Optional[Parity]: + from particle.particle import enums + if parity_enum is None or parity_enum == enums.Parity.u: return None if parity_enum == getattr(parity_enum, "o", None): # particle < 0.14 diff --git a/src/qrules/topology.py b/src/qrules/topology.py index b02eca55..2f40f85d 100644 --- a/src/qrules/topology.py +++ b/src/qrules/topology.py @@ -16,6 +16,7 @@ from collections import abc from functools import total_ordering from typing import ( + TYPE_CHECKING, Any, Callable, Collection, @@ -47,10 +48,11 @@ else: from typing_extensions import Protocol -try: - from IPython.lib.pretty import PrettyPrinter -except ImportError: - PrettyPrinter = Any +if TYPE_CHECKING: + try: + from IPython.lib.pretty import PrettyPrinter + except ImportError: + PrettyPrinter = Any class Comparable(Protocol): @@ -82,7 +84,7 @@ def __init__(self, mapping: Optional[Mapping] = None): def __repr__(self) -> str: return f"{self.__class__.__name__}({self.__mapping})" - def _repr_pretty_(self, p: PrettyPrinter, cycle: bool) -> None: + def _repr_pretty_(self, p: "PrettyPrinter", cycle: bool) -> None: class_name = type(self).__name__ if cycle: p.text(f"{class_name}(...)") diff --git a/src/qrules/transition.py b/src/qrules/transition.py index a85e3307..6fb2cb25 100644 --- a/src/qrules/transition.py +++ b/src/qrules/transition.py @@ -9,6 +9,7 @@ from itertools import zip_longest from multiprocessing import Pool from typing import ( + TYPE_CHECKING, Any, Collection, DefaultDict, @@ -82,10 +83,11 @@ create_n_body_topology, ) -try: - from IPython.lib.pretty import PrettyPrinter -except ImportError: - PrettyPrinter = Any +if TYPE_CHECKING: + try: + from IPython.lib.pretty import PrettyPrinter + except ImportError: + PrettyPrinter = Any class SolvingMode(Enum): @@ -829,7 +831,7 @@ def __attrs_post_init__(self) -> None: ), ) - def _repr_pretty_(self, p: PrettyPrinter, cycle: bool) -> None: + def _repr_pretty_(self, p: "PrettyPrinter", cycle: bool) -> None: class_name = type(self).__name__ if cycle: p.text(f"{class_name}(...)") @@ -935,7 +937,7 @@ def __eq__(self, other: object) -> bool: f" {other.__class__.__name__}" ) - def _repr_pretty_(self, p: PrettyPrinter, cycle: bool) -> None: + def _repr_pretty_(self, p: "PrettyPrinter", cycle: bool) -> None: class_name = type(self).__name__ if cycle: p.text(f"{class_name}(...)") diff --git a/tox.ini b/tox.ini index 8101f7b9..ace8b21d 100644 --- a/tox.ini +++ b/tox.ini @@ -88,6 +88,14 @@ allowlist_externals = commands = make ignore-warnings=1 linkcheck # for margin directive +[testenv:nb] +description = + Run all notebooks with pytest +allowlist_externals = + pytest +commands = + pytest --nbmake {posargs:docs} + [testenv:pydeps] description = Visualize module dependencies @@ -96,7 +104,7 @@ deps = changedir = src commands = pydeps qrules \ - -o module_structure.svg \ + -o ../module_structure.svg \ --exclude *._* \ --max-bacon=1 \ --noshow @@ -106,12 +114,10 @@ passenv = HOME description = Perform all linting, formatting, and spelling checks setenv = - SKIP = mypy, pyright + SKIP = pyright allowlist_externals = - mypy pre-commit commands = - mypy src tests # run separately because of potential caching problems pre-commit run {posargs} -a [testenv:test] @@ -125,11 +131,3 @@ commands = --cov-report=html \ --cov-report=xml \ --cov=qrules - -[testenv:nb] -description = - Run all notebooks with pytest -allowlist_externals = - pytest -commands = - pytest --nbmake {posargs:docs}