-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
185 lines (165 loc) · 4.53 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
[tool.coverage.run]
source = ["src"]
[tool.poetry]
name = "spaemis"
version = "0.3.0"
description = "Produce a coherent set of emissions for regional air quality modelling"
authors = ["Jared Lewis <jared.lewis@climate-resource.com>"]
readme = "README.md"
packages = [{include = "spaemis", from = "src"}]
keywords = ["emissions", "climate", "air quality"]
license = "BSD-3-Clause"
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: BSD License",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering"
]
homepage = "https://github.com/climate-resource/spaemis"
documentation = "https://spaemis.readthedocs.io/en/latest/"
[tool.poetry.scripts]
spaemis = 'spaemis.main:cli'
[tool.poetry.dependencies]
python = ">=3.10, <3.12"
matplotlib = { version = "^3.7.1", optional = true }
notebook = { version = "^6.5.3", optional = true }
seaborn = { version = "*", optional = true }
jupytext = { version = "1.14.5", optional = true }
papermill = { version = "*", optional = true }
python-dotenv = { version = "*", optional = true }
scmdata = "^0.15.0"
cattrs = "^22.2.0"
xarray = "^2023.5.0"
rioxarray = "^0.14.1"
geopandas = "^0.13.0"
netcdf4 = "^1.6.3"
scipy = "^1.10.1"
pooch = "^1.7.0"
typing-extensions = "^4.5.0"
pyyaml = "^6.0"
[tool.commitizen]
version = "0.3.0"
version_files = ["pyproject.toml:^version"]
tag_format = "v$version"
major_version_zero = true
[tool.poetry.extras]
notebooks = [
"notebook",
"matplotlib",
"seaborn",
"jupytext" ,
"papermill" ,
"python-dotenv"
]
[tool.poetry.group.tests.dependencies]
pytest = "^7.3.1"
pytest-mock = "*"
[tool.poetry.group.docs.dependencies]
myst-nb = "^0.17.0"
sphinx-rtd-theme = "^1.2.0"
sphinx-autodoc-typehints = "^1.23.0"
sphinx-autodocgen = "^1.3"
jupytext = "^1.14.5"
sphinx-copybutton = "^0.5.2"
[tool.poetry.group.dev.dependencies]
pytest-cov = "^4.0.0"
coverage = "^7.2.0"
black = "23.3.0"
blackdoc = "0.3.8"
commitizen = "^3.1.1"
mypy = "^1.2.0"
ruff = "0.0.264"
pre-commit = "^3.3.1"
joblib = "*"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.coverage.report]
fail_under = 95
skip_empty = true
show_missing = true
# Regexes for lines to exclude from consideration in addition to the defaults
exclude_also = [
# Don't complain about missing type checking code:
"if TYPE_CHECKING",
]
[tool.mypy]
strict = true
# prevent unimported libraries silently being treated as Any
#disallow_any_unimported = true
# show error codes on failure with context
show_error_codes = true
show_error_context = true
# warn if code can't be reached
warn_unreachable = true
# importing following uses default settings
follow_imports = "normal"
exclude = [
"src/spaemis/main.py"
]
[[tool.mypy.overrides]]
module = "scmdata.*"
ignore_missing_imports = true
[tool.jupytext]
formats = "ipynb,py:percent"
[tool.pytest.ini_options]
testpaths = [ "tests"]
addopts = [
"--import-mode=importlib",
]
[tool.ruff]
src = ["src"]
target-version = "py310"
select = [
"E", # pycodestyle error
"W", # pycodestyle warning
"F", # pyflakes
"I", # isort
"D", # pydocstyle
"PL", # pylint
"TRY", # tryceratops
"NPY", # numpy rules
"RUF", # ruff specifics
"ERA", # eradicate old commented out code
"UP", # pyupgrade
"S", # flake8-bandit
]
unfixable = [
]
ignore = [
"D105", # D105 Missing docstring in magic method
"D200", # One-line docstring should fit on one line with quotes
"D400", # First line should end with a period
# TODO: relax the following
"TRY003" # Avoid specifying long messages outside the exception class
]
# Provide some leeway for long docstring, this is otherwise handled by black
line-length = 110
extend-exclude = [
"src/spaemis/gse_emis.py"
]
[tool.ruff.per-file-ignores]
"test*.py" = [
"D", # Documentation not needed in tests
"S101", # S101 Use of `assert` detected
"PLR2004" # Magic value used in comparison
]
"*notebooks/*" = [
"D100", # Missing docstring at the top of file
"E402", # Module level import not at top of file
"ERA001", # False positive while parsing jupytext header
"S101", # Use of `assert` detected
]
"scripts/*" = [
"S101" # S101 Use of `assert` detected
]
[tool.ruff.isort]
known-first-party = ["src"]
[tool.ruff.pydocstyle]
convention = "numpy"