-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
164 lines (150 loc) · 3.84 KB
/
pyproject.toml
File metadata and controls
164 lines (150 loc) · 3.84 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "versioningit"]
[dependency-groups]
dev = [
"genbadge[coverage,tests]",
"git-changelog",
"mike>=2.0.0",
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-macros-plugin",
"mkdocs-material",
"mkdocs-minify-plugin",
"mkdocs-typer",
"mkdocstrings-python",
"pip-licenses",
"pre-commit",
"pytest-cov",
"pytest-html",
"pytest-xdist",
"pytest",
"scipy>=1.9",
"seaborn>=0.13.2",
]
studentt = [
"scipy>=1.9",
]
[project]
authors = [{name = "Fabio Muratore", email = "accounts@famura.net"}]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
]
dependencies = [
"torch>=2.7",
]
description = "PyTorch-based implementations of the Continuously-Ranked Probability Score (CRPS) as well as its locally scale-invariant version (SCRPS)"
dynamic = ["version"]
license = "BSD-3-Clause"
maintainers = [{name = "Fabio Muratore", email = "accounts@famura.net"}]
name = "torch-crps"
readme = "readme.md"
requires-python = ">=3.11"
[project.urls]
homepage = "https://famura.github.io/torch-crps"
source = "https://github.com/famura/torch-crps"
[tool.coverage.html]
directory = "docs/exported/coverage"
[tool.coverage.report]
fail_under = 80
show_missing = true
skip_empty = true
[tool.coverage.run]
branch = true
source = ["torch_crps"]
[tool.hatch.version]
default-version = "0.0.0"
source = "versioningit"
[tool.hatch.version.format]
dirty = "{base_version}"
distance = "{base_version}"
distance-dirty = "{base_version}"
[tool.mypy]
ignore_missing_imports = true # when no stubs are available, e.g. for matplotlib or tabulate
pretty = true
show_error_context = true
show_traceback = true
[tool.pytest.ini_options]
addopts = [
"--capture=tee-sys",
"--cov-config=pyproject.toml",
"--cov-report=html",
"--cov-report=term",
"--cov-report=xml",
"--html=docs/exported/tests/index.html",
"--junit-xml=pytest.xml",
"--self-contained-html",
"--showlocals",
"-ra",
]
markers = [
"needs_cuda: the marked tests require a GPU with CUDA and is skipped otherwise",
"plot: marks tests that generate plots/visualizations (deselect with '-m \"not plot\"')",
]
testpaths = ["tests"]
[tool.ruff]
exclude = [
".coverage",
".mypy_cache",
".pytest_cache",
".ruff_cache",
".site",
".venv",
"coverage.xml",
"docs/exported",
"pytest.xml",
]
fix = true
line-length = 120
[tool.ruff.lint]
extend-select = [
"ANN", # flake8-annotations
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # mccabe
"CPY", # flake8-copyright
"D", # pydocstyle
"FURB", # refurb
"I", # isort
"N", # pep8-naming
"PERF", # Perflint
"PL", # pylint
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle (warning)
]
ignore = [
"CPY001", # missing copyright notice at the top of the file
"D100", # missing docstring in public module
"D104", # missing docstring in public package
"D205", # 1st line of the docstring must be a oneliner
"PLC0415", # import should be at the top-level of a file
"PLR", # pylint refactor
"RUF001", # allow for greek letters
"RUF003", # allow for greek letters
"UP035", # allow importing Callable from typing
]
preview = true
[tool.ruff.lint.per-file-ignores]
"examples/*" = [
"S101", # use of assert detected
]
"tests/*" = [
"ANN201", # return type information
"D", # pydocstyle
"PLC2701", # private name import from external module
"S101", # use of assert detected
]
"torch_crps/cli/*" = [
"C901", # too much complexity
"PLC0415", # `import` should be at the top-level of a file
]
[tool.ruff.lint.pydocstyle]
convention = "google"