From e632a162a66a2f93ab3cfc6c89cfac5adbf3eb54 Mon Sep 17 00:00:00 2001 From: stephenworsley <49274989+stephenworsley@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:59:28 +0100 Subject: [PATCH] improve pyproject.toml (#429) --- .coveragerc | 17 ----------------- pyproject.toml | 12 +++++++++++- 2 files changed, 11 insertions(+), 18 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 4548c2e25..000000000 --- a/.coveragerc +++ /dev/null @@ -1,17 +0,0 @@ -# -# .coveragerc to control coverage.py -# - -[run] -branch = True -omit = - setup.py - iris_grib/tests/* - .eggs/* - - -[report] -exclude_lines = - pragma: no cover - def __repr__ - if __name__ == .__main__.: diff --git a/pyproject.toml b/pyproject.toml index 5a054c517..115f69028 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,5 @@ +# See https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html + [build-system] # Defined by PEP 518 requires = [ @@ -65,7 +67,10 @@ optional-dependencies.test = {file = "requirements/test.txt"} [tool.setuptools.packages.find] include = ["iris_grib*"] +#------------------------------------------------------------------------------ + [tool.coverage.run] +# See https://coverage.readthedocs.io/en/latest/config.html branch = true source = [ "iris_grib", @@ -77,14 +82,17 @@ omit = [ [tool.coverage.report] exclude_lines = [ "pragma: no cover", + "def __repr__", "if __name__ == .__main__.:" ] [tool.codespell] +# See https://github.com/codespell-project/codespell/tree/master?tab=readme-ov-file#using-a-config-file ignore-words-list = "alpha-numeric,degreee,discontiguities,lazyness,meaned,nin" skip = "_build,*.css,*.ipynb,*.js,*.html,*.svg,*.xml,.git,generated" [tool.mypy] +# See https://mypy.readthedocs.io/en/stable/config_file.html ignore_missing_imports = true warn_unused_configs = true enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"] @@ -92,8 +100,10 @@ exclude = [ 'noxfile\.py', 'docs/conf\.py' ] +strict = false # Default value, make true when introducing type hinting. [tool.pytest.ini_options] +# See https://docs.pytest.org/en/stable/reference/customize.html addopts = [ "--doctest-continue-on-failure", "--doctest-modules", @@ -103,7 +113,7 @@ addopts = [ "-v", ] doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS NUMBER" -# configure logging as recommended by repo-review +# configure settings as recommended by repo-review: log_cli = "True" log_cli_level = "INFO" minversion = "6.0"