-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathpyproject.toml
131 lines (119 loc) · 3.09 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "xcdat"
dynamic = ["version"]
description = "Xarray Climate Data Analysis Tools"
readme = "README.rst"
requires-python = ">=3.9"
license = { text = "Apache-2.0" }
authors = [{ name = "xCDAT developers" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache-2.0 License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = ["xcdat"]
dependencies = [
"cf_xarray >=0.9.1",
"cftime",
"dask",
"netcdf4",
"numpy >=2.0.0,<3.0.0",
"pandas",
"python-dateutil",
"xarray >=2024.03.0",
"xesmf >=0.8.7",
"xgcm",
]
[project.urls]
Documentation = "https://xcdat.readthedocs.io/en/latest/getting-started-guide/overview.html"
"Issue Tracker" = "https://github.com/xCDAT/xcdat/issues"
[project.optional-dependencies]
test = ["pytest", "pytest-cov"]
docs = [
"sphinx",
"sphinx-autosummary-accessors",
"sphinx-book-theme",
"sphinx-copybutton",
"nbsphinx",
"sphinx-design",
"pandoc",
"ipython",
"gsw-xarray",
]
dev = ["types-python-dateutil", "pre-commit", "ruff", "mypy"]
[tool.setuptools.packages.find]
include = ["xcdat", "xcdat.*"]
[tool.setuptools.dynamic]
version = { attr = "xcdat.__version__" }
[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=xcdat --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"]
# These markers are defined in `xarray.tests` and must be included to avoid warnings when importing from this module.
markers = ["flaky", "network"]
[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