-
Notifications
You must be signed in to change notification settings - Fork 9
/
pyproject.toml
152 lines (137 loc) · 3.91 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
[tool.poetry]
authors = [
"David Orme <[email protected]>",
"Alienor Lavergne <[email protected]>",
"Vivienne Groner <[email protected]>",
"Marion Weinzierl <[email protected]>",
"Tianzhang Cai <[email protected]>",
"Surbhi Goel <[email protected]>",
"Alexander Smith <[email protected]>",
"James Emberton <[email protected]>",
"Amy Pike <[email protected]>",
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Intended Audience :: Science/Research",
"Development Status :: 4 - Beta",
]
description = "Python tools for modelling plant productivity and demography."
homepage = "https://pyrealm.readthedocs.io/"
license = "MIT"
name = "pyrealm"
packages = [
{include = "pyrealm"},
{include = "pyrealm_build_data", format = "sdist"},
]
readme = "README.md"
repository = "https://github.com/ImperialCollegeLondon/pyrealm"
version = "2.0.0-rc.1"
[tool.poetry.dependencies]
dacite = "^1.6.0"
numpy = "~2.1" # pinning below 2.2.0 at the moment, issue with float typing.
python = ">=3.10"
scipy = "^1.7.3"
tabulate = "^0.8.10"
marshmallow = "^3.22.0"
marshmallow-dataclass = "^8.7.0"
pandas = "^2.2.2"
pandas-stubs = "^2.2.2.240909"
[tool.poetry.group.types.dependencies]
pandas-stubs = "^2.2.0.240218"
types-tabulate = "^0.9.0.0"
[tool.poetry.group.test.dependencies]
graphviz = "*"
pytest = "^7.1.2"
pytest-cov = "^3.0.0"
pytest-mock = "^3.8.1"
pytest-profiling = "^1.7.0"
[tool.poetry.group.dev.dependencies]
ipython = "^8.9.0"
jupyterlab = "^4.2.1"
jupyterlab-myst = "^2.4.2"
jupytext = "^1.16.2"
matplotlib = "^3.5.2"
multiprocess = "^0.70.16"
mypy = "^1.0"
pandas = "^2.2.0"
pre-commit = "^3.2.0"
ruff = "^0.4.1"
[tool.poetry.group.docs.dependencies]
autodocsumm = "^0.2.8"
myst-nb = "^1.0.0"
netcdf4 = "^1.6.3"
pydocstyle = "^6.1.1"
sphinx = "^7.0.0"
sphinx-external-toc = "^1.0.0"
sphinx-rtd-theme = "^3.0.0"
sphinxcontrib-bibtex = "^2.6.1"
xarray = "^2024.6.0"
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.8.2"]
[tool.mypy]
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
exclude = [
'pyrealm_build_data/splash/splash_py_version/*.py', # Legacy code used for building golden datasets
]
ignore_missing_imports = false
no_implicit_optional = true
plugins = 'numpy.typing.mypy_plugin'
strict_optional = true
[tool.mypy-setup]
ignore_errors = true
[[tool.mypy.overrides]]
disallow_incomplete_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false
module = "tests.*"
[tool.pytest.ini_options]
addopts = """
-v
-p no:warnings
-m "not profiling"
--cov=pyrealm
--cov-report=html:reports/coverage
--doctest-modules
--ignore=pyrealm/__main__.py
--ignore=tests/pmodel/generate_test_inputs.py
"""
python_files = 'test_*.py'
testpaths = ['tests', 'pyrealm']
[tool.ruff]
exclude = [
"pyrealm_build_data/splash/splash_py_version/*", # Legacy code used for building golden datasets
]
target-version = "py310"
[tool.ruff.lint]
# Enable all `pydocstyle` rules, limiting to those that adhere to the
# Google convention via `convention = "google"`, below.
select = [
# "B", # flake8-bugbear
# "SIM", # flake8-simplify
"E", # pycodestyle
"F", # pyflakes
"D", # pydocstyle
"I", # isort
"UP", # pyupgrade
"RUF", # RUF specific checks
"NPY201",
]
# On top of the Google convention, disable:
ignore = [
"D202", # Blank line after docstring is ok
"D107", # Location of __init__ docstring in class not __init__"
"D105", # Magic methods do not need docstrings.
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.jupytext]
# Stop jupytext from removing mystnb and other settings in MyST Notebook YAML headers
notebook_metadata_filter = "settings,mystnb,language_info"
# Also stop it from stripping cell metadata, except for specific ones to lose.
cell_metadata_filter = "all,-trusted"