Skip to content

Commit

Permalink
Don't turn warnings into errors in pytest (#628)
Browse files Browse the repository at this point in the history
Turning warnings into errors is nice in principle,
but it turn out to be too much of a churn.

* Ignore Cryptography Deprecation warning
* Ignore spglib deprecationwarning
* pytest: Don't error out on warnings
  • Loading branch information
danielhollas authored Aug 7, 2024
1 parent ae11a2b commit de5f0cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
filterwarnings = [
'error',
# The following deprecation warnings come from Python 3.12 stdlib modules
"ignore:datetime.datetime.:DeprecationWarning:",
# This one is coming from plumpy
Expand All @@ -16,12 +15,15 @@ filterwarnings = [
"ignore:The default datetime adapter is deprecated as of Python 3.12; see the sqlite3 documentation for suggested replacement recipes:DeprecationWarning:",
# This is needed since SQLAlchemy 2.0, see
# https://github.com/aiidalab/aiidalab-widgets-base/issues/605
'ignore:Object of type .* not in session, .* operation along .* will not proceed:sqlalchemy.exc.SAWarning',
'ignore:Object of type.*not in session,.*operation along.*will not proceed:sqlalchemy.exc.SAWarning',
'ignore::DeprecationWarning:bokeh',
'ignore:Creating AiiDA configuration:UserWarning:aiida',
'ignore:The `Code` class:aiida.common.warnings.AiidaDeprecationWarning:',
'ignore:crystal system:UserWarning:ase.io.cif',
'ignore::DeprecationWarning:ase.atoms',
# This popped up in spglib 2.5. Since we still try to support spglib v1,
# it's not clear if we can get rid of it.
"ignore:dict interface.*is deprecated.Use attribute interface:DeprecationWarning:spglib",
# TODO: This comes from a transitive dependency of ipyoptimade
# Remove this when this issue is addressed:
# https://github.com/CasperWA/ipywidgets-extended/issues/85
Expand All @@ -34,6 +36,7 @@ filterwarnings = [
# This warning is coming from circus (aiida-core dependency):
# https://github.com/circus-tent/circus/issues/1215
"ignore:'pipes' is deprecated and slated for removal in Python 3.13:DeprecationWarning:",
"ignore::cryptography.utils.CryptographyDeprecationWarning:",
]

[tool.ruff]
Expand Down

0 comments on commit de5f0cc

Please sign in to comment.