-
Notifications
You must be signed in to change notification settings - Fork 25
/
pyproject.toml
157 lines (137 loc) · 3.58 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "scores"
dynamic = ["version"]
authors = [
{ name="Tennessee Leeuwenburg", email="tennessee.leeuwenburg@bom.gov.au" },
]
description = """\
Scores is a Python package containing mathematical functions \
for the verification, evaluation and optimisation of forecasts, predictions or models.
"""
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
dependencies = ["xarray", "pandas", "scipy", "bottleneck"]
[project.optional-dependencies]
dev = [
"pytest",
"pytest-watch",
"pytest-cov",
"pre-commit",
"black == 24.1.0",
"mypy == 1.13.0",
"pylint == 3.3.1",
"bandit == 1.7.8",
"dask",
"h5netcdf",
"pandas-stubs",
"nbmake"
]
tutorial = [
"jupyterlab",
"matplotlib",
"h5netcdf",
"rasterio",
"rioxarray",
"plotly",
"dask",
"gcsfs",
"zarr"
]
maintainer = ["build",
"hatch",
"sphinx",
"myst-parser",
"sphinx-book-theme",
"nbsphinx",
"sphinx_gallery",
"ipywidgets",
"twine",
"pandoc",
"pip-tools",
]
all = ["scores[dev,tutorial]"]
[project.urls]
"Repository" = "https://github.com/nci/scores"
"Documentation" = "https://scores.readthedocs.io/en/stable/"
[tool.hatch.build]
exclude = [
"/tutorials/",
"/docs/",
"/tests/"
]
dependencies = [
"tomlkit",
]
[tool.hatch.build.hooks.custom]
override = true # This is required to activate the build hook.
[tool.hatch.metadata.hooks.custom.config]
# The pinned versions of these dependencies will be subsituted during package builds.
# Pinned versions will only be substitued for packages that are already in this package's dependencies list.
pinned_dependencies = [
"xarray ~= 2024.1",
"pandas ~= 2.0",
"scipy ~= 1.13",
"bottleneck ~= 1.3"
]
[tool.hatch.version]
path = "src/scores/__init__.py"
[tool.isort]
profile = "black"
[tool.black]
line-length = 120
[tool.mypy]
warn_return_any = true
warn_unused_configs = true
[[tool.mypy.overrides]]
module = "scipy.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
ignore_missing_imports = true
[tool.coverage.paths]
source = ["/src/"]
[tool.coverage.report]
exclude_also = [
"@overload",
"raise NotImplementedError"
]
[tool.pyright]
reportPrivateImportUsage = false
[tool.pytest.ini_options]
addopts = [
'--cov-fail-under=99',
'--cov-branch',
'--cov-report=html',
'--cov-report=term-missing',
'--junitxml=report.xml',
# Ignore notebooks which depend on external data for E2E tests
'--ignore=tutorials/First_Data_Fetching.ipynb',
'--ignore=tutorials/Mean_Squared_Error.ipynb',
'--ignore=tutorials/Root_Mean_Squared_Error.ipynb',
'--ignore=tutorials/Weighting_Results.ipynb',
'--ignore=tutorials/Mean_Absolute_Error.ipynb',
'--ignore=tutorials/Additive_and_multiplicative_bias.ipynb'
]
[tool.pylint.master]
# https://github.com/PyCQA/pylint/issues/4081#issuecomment-778242554
init-hook = 'import sys; sys.setrecursionlimit(3 * sys.getrecursionlimit())'
fail-under=9.8
ignore-paths = [
'docs/'
]
[tool.pylint.DESIGN]
max-args=10
[tool.pylint.FORMAT]
max-line-length=150 # Deliberately "too long" to avoid disagreements with black formatter
[tool.pylint.messages_control]
good-names=['df','da','x','y','z','i','j','k','ae'] # pylint: disable=E0015
disable = [
"too-many-positional-arguments",
]