diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dba802c..e15fe50 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -58,7 +58,12 @@ jobs: # to see if something hung. timeout-minutes: 60 run: | - pytest --durations=0 --durations-min=1.0 --verbosity=1 --cov=qutip_jax --cov-report= --color=yes -W ignore::UserWarning:qutip -W "ignore:Complex dtype:UserWarning" + pytest -Werror --durations=0 --durations-min=1.0 --verbosity=1 --color=yes \ + -W ignore::UserWarning:qutip \ + -W "ignore:Complex dtype:UserWarning" \ + -W "ignore:jax.core.pp_eqn_rules is deprecated.:DeprecationWarning" \ + -W "ignore:unhashable type:FutureWarning" \ + -W "ignore:In a future release of JAX,:DeprecationWarning" # Above flags are: # --durations=0 --durations-min=1.0 # at the end, show a list of all the tests that took longer than a @@ -73,8 +78,16 @@ jobs: # --cov-report= # don't print the coverage report to the terminal---it just adds # cruft, and we're going to upload the .coverage file to Coveralls + # -Werror + # Unless explicitly ignored, warnings are errors. # -W ignore::UserWarning:qutip # Ignore matplotlib missing warnings + # -W "ignore:Complex dtype:UserWarning" + # Ignore diffrax's partial complex support + # -W "ignore:jax.core.pp_eqn_rules is deprecated.:DeprecationWarning" + # -W "ignore:unhashable type:FutureWarning" + # -W "ignore:In a future release of JAX,:DeprecationWarning" + # Diffrax / equinox are have warning with latest jax # These flags are added to those in pyproject.toml. - name: Upload to Coveralls diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index 2ddf191..2d7abf0 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -66,7 +66,12 @@ jobs: # to see if something hung. timeout-minutes: 60 run: | - pytest --durations=0 --durations-min=1.0 --verbosity=1 --color=yes -W ignore::UserWarning:qutip -W "ignore:Complex dtype:UserWarning" + pytest -Werror --durations=0 --durations-min=1.0 --verbosity=1 --color=yes \ + -W ignore::UserWarning:qutip \ + -W "ignore:Complex dtype:UserWarning" \ + -W "ignore:jax.core.pp_eqn_rules is deprecated.:DeprecationWarning" \ + -W "ignore:unhashable type:FutureWarning" \ + -W "ignore:In a future release of JAX,:DeprecationWarning" # Above flags are: # --durations=0 --durations-min=1.0 # at the end, show a list of all the tests that took longer than a @@ -78,8 +83,16 @@ jobs: # limit coverage reporting to code that's within the qutip_jax package # --color=yes # force coloured output in the terminal + # -Werror + # Unless explicitly ignored, warnings are errors. # -W ignore::UserWarning:qutip # Ignore matplotlib missing warnings + # -W "ignore:Complex dtype:UserWarning" + # Ignore diffrax's partial complex support + # -W "ignore:jax.core.pp_eqn_rules is deprecated.:DeprecationWarning" + # -W "ignore:unhashable type:FutureWarning" + # -W "ignore:In a future release of JAX,:DeprecationWarning" + # Diffrax / equinox are have warning with latest jax # These flags are added to those in pyproject.toml. finalise: diff --git a/pyproject.toml b/pyproject.toml index 2c3aa0e..375f4f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ requires = [ build-backend = "setuptools.build_meta" [tool.pytest.ini_options] -addopts = "-Werror --strict-config --strict-markers -W \"ignore:Complex dtype:UserWarning\"" +addopts = "--strict-config --strict-markers" testpaths = [ "tests", ]