-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
136 lines (125 loc) · 3.81 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
[build-system]
requires = ["hatchling", "versioningit"]
build-backend = "hatchling.build"
[project]
dynamic = ["version"]
name = "genno"
description = "Efficient, transparent calculation on N-D data"
authors = [{ name = "genno contributors" }]
maintainers = [
{ name = "Paul Natsuo Kishimoto", email = "[email protected]" },
]
readme = "README.rst"
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
]
requires-python = ">=3.9"
dependencies = [
"dask [array] >= 2.14",
"importlib_resources; python_version < '3.10'",
"pandas[parquet] >= 1.0",
"platformdirs",
"pint",
"PyYAML",
# 2022.6.0 is affected by pydata/xarray#6822
"xarray >= 0.17, != 2022.6.0",
]
[project.optional-dependencies]
# Graphviz, for Computer.describe()
graphviz = ["graphviz"]
docs = ["furo", "IPython"]
# Specific packages for which compatibility is provided
plotnine = ["plotnine"]
pyam = ["pyam-iamc"]
sdmx = ["sdmx1"]
# All compat packages together
compat = ["genno[plotnine]", "genno[pyam]", "genno[sdmx]"]
tests = [
"genno[compat,graphviz]",
"bottleneck",
"jupyter",
"nbclient",
"pytest",
"pytest-cov",
"pytest-rerunfailures",
"pytest-xdist",
]
sparse = [
"numba >= 0.54", # Override >= 0.49 as of sparse 0.15.4
"sparse >= 0.12",
]
[project.urls]
homepage = "https://github.com/khaeru/genno"
repository = "https://github.com/khaeru/genno"
documentation = "https://genno.rtfd.io/en/stable/"
[tool.coverage.report]
omit = [
"**/genno/compat/sphinx/*",
]
exclude_also = [
# Imports only used by type checkers
"if TYPE_CHECKING:",
# Exclude bodies of abstract functions
"\\.{3}$",
"return NotImplemented",
# A pragma comment that excludes an entire file:
"\\A(?s:.*# pragma: exclude file.*)\\Z",
]
[tool.hatch]
version.source = "versioningit"
[tool.mypy]
files = [
"conftest.py",
"doc",
"genno",
]
# Settings recommended by https://careers.wolt.com/en/blog/tech/professional-grade-mypy-configuration
# check_untyped_defs = true # 66 errors
# disallow_untyped_defs = true # 535 errors
# disallow_any_unimported = true # 20 errors
# warn_return_any = true # 24 errors
warn_unused_ignores = true
[[tool.mypy.overrides]]
# Packages/modules for which no type hints are available
module = [
"graphviz",
"pandas.*",
"pyam.*",
"scipy.*",
"sparse.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = "--cov=genno --cov-report="
filterwarnings = [
"ignore:elementwise comparison failed.*:FutureWarning:genno.operator",
# Mirror (a) filter(s) set in .core.sparsedataarray
"ignore:Conversion of an array with ndim > 0 to a scalar:DeprecationWarning:sparse._coo.core",
# Upstream changes that won't affect genno
"ignore:configure_currency.*will no longer be the default:DeprecationWarning:iam_units",
"ignore:Jupyter is migrating its paths.*:DeprecationWarning:jupyter_client.connect",
# https://github.com/dateutil/dateutil/issues/1314
"ignore:datetime.datetime.utcfromtimestamp.. is deprecated.*:DeprecationWarning:dateutil",
]
# commented: This doubles the number of tests in the entire suite.
# Use only to identify more narrow applications of the same fixture.
# usefixtures = "parametrize_copy_on_write"
[tool.ruff.lint]
select = ["C9", "E", "F", "I", "W"]
ignore = ["E501", "W191"]
# Exceptions:
# - .core.computer.add_queue: 11
mccabe.max-complexity = 10
[tool.versioningit]
default-version = "0.1.dev1" # Match setuptools-scm