-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpyproject.toml
74 lines (67 loc) · 1.72 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"docs",
"node_modules",
"site-packages",
"venv",
]
[tool.ruff.lint]
# E4 - whitespace
# E7 - multiple-statements
# E9 - trailing-whitespace
# F - Enable Pyflakes
# B - Enable flake8-bugbear
# W - Enable pycodestyle
# C901 - complex-structure
# D - Enable flake8-docstrings
select = ["E4", "E7", "E9", "F", "B", "W", "C901"]
# E501 - line-too-long
ignore = ["E501"]
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 5.
max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.pytest.ini_options]
# Docs: https://docs.pytest.org/en/7.2.x/reference/customize.html#configuration
junit_family = "xunit2"
addopts = "--cov=e3sm_to_cmip --cov-report term --cov-report html:tests_coverage_reports/htmlcov --cov-report xml:tests_coverage_reports/coverage.xml -s"
python_files = ["tests.py", "test_*.py"]
[tool.mypy]
# Docs: https://mypy.readthedocs.io/en/stable/config_file.html
python_version = "3.10"
check_untyped_defs = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
[[tool.mypy.overrides]]
# cmor type stubs does not exist and there are no plans to add them.
# netCDF4 type stubs has not been added yet (https://github.com/python/typeshed/issues/9545)
module = ["cmor.*", "netCFD4.*"]
follow_imports = "skip"
follow_imports_for_stubs = true