-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (128 loc) · 3.36 KB
/
pyproject.toml
File metadata and controls
143 lines (128 loc) · 3.36 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "e3sm_to_cmip"
dynamic = ["version"]
description = "Transform E3SM model data output into CMIP compatible data using the Climate Model Output Rewriter."
authors = [
{ name = "Sterling Baldwin" },
{ name = "Tom Vo", email = "vo13@llnl.gov" },
{ name = "Chengzhu (Jill) Zhang", email = "zhang40@llnl.gov" },
{ name = "Anthony Bartoletti" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.11"
keywords = ["e3sm_to_cmip"]
dependencies = [
"cmor>=3.7.0",
"dask",
# "nco" is not available on PyPI, but is required for the E3SM to CMIP conversion.
# It can be installed via conda or from source.
# "nco >= 5.1.4",
"netcdf4",
"numpy >=2.0.0,<3.0.0",
"pyyaml",
"tqdm",
"xarray >=2024.03.0",
"xcdat>=0.11.1",
]
[project.optional-dependencies]
test = ["pytest", "pytest-cov"]
dev = [
"ruff",
"mypy",
"pre-commit",
"isort",
"types-pytz",
"types-PyYAML",
"types-tqdm",
"pandas-stubs",
]
[project.urls]
homepage = "https://github.com/E3SM-Project/e3sm_to_cmip"
[project.scripts]
e3sm_to_cmip = "e3sm_to_cmip.main:main"
[tool.setuptools.packages.find]
include = ["e3sm_to_cmip", "e3sm_to_cmip.*"]
[tool.setuptools.package-data]
"e3sm_to_cmip" = ["LICENSE"]
[tool.setuptools.dynamic]
version = { attr = "e3sm_to_cmip.__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=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.13"
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 do not exist and there are no plans to add them.
module = ["cmor.*", "xcdat.*"]
follow_imports = "skip"