forked from NOAA-GFDL/NDSL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
132 lines (117 loc) · 3.58 KB
/
pyproject.toml
File metadata and controls
132 lines (117 loc) · 3.58 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
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools >= 80", "setuptools-scm>=8"]
[project]
authors = [{name = "NOAA/NASA"}]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Private :: Do Not Upload",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13"
]
dynamic = ["dependencies", "version"]
license = "Apache-2.0"
license-files = ["LICENSE.txt", "ndsl/viz/fv3/README.md"]
name = "ndsl"
readme = "README.md"
requires-python = ">=3.11,<3.14"
[project.optional-dependencies]
demos = ["ipython", "ipykernel"]
dev = [
"flake8-pyproject",
"ndsl[demos]",
"ndsl[docs]",
"ndsl[test]",
"pre-commit"
]
docs = ["mkdocs-material", "mkdocstrings[python]", "mkdocs-exclude"]
extras = ["ndsl[docs]", "ndsl[demos]", "ndsl[test]", "ndsl[dev]"]
serialbox = ["serialbox @ git+https://github.com/FlorianDeconinck/serialbox.git@feature/data_ijkbuff#subdirectory=src/serialbox-python"]
test = ["pytest", "coverage"]
zarr = ["zarr<3"]
[project.scripts]
best_guess_diff = "ndsl.stencils.testing.best_guess_diff:entry_point"
ndsl-serialbox_to_netcdf = "ndsl.stencils.testing.serialbox_to_netcdf:entry_point"
[project.urls]
Repository = "https://github.com/NOAA-GFDL/NDSL"
[tool.aliases]
[tool.coverage.run]
branch = true
omit = ["tests/*", "*gt_cache*", ".dacecache*", "external/*", "__init__.py"]
parallel = true
source_pkgs = ["ndsl"]
[tool.flake8]
exclude = ["docs"]
extend-ignore = [
# Redundant with black formatter
"E302", # Blank lines before function
"E501", # Line too long
"E704", # One statement per line
"W293", # Blank line contains whitespace
"W503", # Linebreak before binary operator
# Clashes with NDSL/stencil syntax
"E203", # Space before ":", e.g. `field[1, :]`
"F841", # Local variable assigned but unused
# other
"B019" # We'd like to keep using functools.lru_cache
]
max-line-length = 88
[tool.isort]
default_section = "THIRDPARTY"
known_third_party = "f90nml,pytest,xarray,numpy,mpi4py,gt4py,dace"
lines_after_imports = 2
profile = "black"
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
[tool.mypy]
disallow_incomplete_defs = true
disallow_untyped_defs = true
# TODO: understand what's wrong with imports and fix
ignore_missing_imports = true
strict_equality = true
strict_optional = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
disallow_incomplete_defs = false
disallow_untyped_defs = false
module = [
# TODO: fix issues and remove this override
"ndsl.grid.*",
"ndsl.viz.*",
# Unclear what happens to this module in the future
"ndsl.dsl.gt4py_utils",
# We don't fix legacy (unless we really need it)
"ndsl.restart._legacy_restart",
# translate test system is "beyond repair"
"ndsl.stencils.testing.translate",
"ndsl.stencils.testing.parallel_translate"
]
[[tool.mypy.overrides]]
disallow_untyped_defs = false
module = [
# Unclear what the state of these modules is
"ndsl.monitor.*",
"ndsl.stencils.testing.serialbox_to_netcdf"
]
[tool.pytest]
markers = [
# tests running on a cpu (e.g. with cupy)
"gpu",
# tests relying on at least two MPI processes
"parallel",
# tests relying on the optional zarr dependency
"zarr"
]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
include = ["ndsl", "ndsl.*"]
[tool.setuptools_scm]
version_scheme = "no-guess-dev"