-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (119 loc) · 3.24 KB
/
Copy pathpyproject.toml
File metadata and controls
141 lines (119 loc) · 3.24 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "xmipy"
description = "xmipy is an extension to the bmipy Python package"
readme = "README.md"
authors = [
{ name = "Martijn Russcher", email = "Martijn.Russcher@deltares.nl" },
{ name = "Julian Hofer", email = "Julian.Hofer@deltares.nl" },
{ name = "Joseph D. Hughes", email = "jdhughes@usgs.gov" },
]
keywords = ["BMI", "Basic Model Interface"]
license = { text = "CC0" }
classifiers = [
"Intended Audience :: Science/Research",
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
"Topic :: Scientific/Engineering :: Hydrology",
]
requires-python = ">=3.9"
dependencies = ["bmipy", "numpy"]
dynamic = ["version"]
[project.optional-dependencies]
tests = ["flopy >=3.3.6", "pytest", "pytest-cov", "requests"]
lint = ["ruff", "mypy"]
docs = ["pdoc"]
[project.urls]
Documentation = "https://deltares.github.io/xmipy/xmipy.html"
Source = "https://github.com/Deltares/xmipy"
[tool.hatch.build.targets.wheel]
packages = ["xmipy"]
[tool.hatch.version]
path = "xmipy/__init__.py"
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
[tool.pixi.pypi-dependencies]
xmipy = { path = ".", editable = true }
[tool.pixi.dependencies]
python-build = "*"
flopy = ">=3.3.6"
mypy = "*"
pdoc = "*"
pytest = "*"
pytest-cov = "*"
requests = "*"
ruff = "*"
codespell = "*"
twine = "*"
[tool.pixi.tasks]
# Get executables
get-exes = "python -c \"import os; os.makedirs('bin', exist_ok=True)\" && get-modflow bin --repo modflow6-nightly-build"
# Tests
# The flag -s stops pytest from capturing output
# This is necessary until proper error reporting is implemented by Modflow
tests-ci = "pytest --cov=xmipy --cov-report=xml"
tests = "pytest"
# Docs
docs = "pdoc -o docs/ xmipy"
# Lint
ruff = "ruff check ."
ruff-format = "ruff format --check ."
mypy = "mypy --install-types --non-interactive --ignore-missing-imports ."
spell = "codespell"
check-build = "rm -rf dist && python -m build && twine check --strict dist/*"
# Publish
publish-build = { cmd = "twine upload dist/*", depends_on = ["check-build"] }
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
[tool.pixi.feature.py310.dependencies]
python = "3.10.*"
[tool.pixi.feature.py39.dependencies]
python = "3.9.*"
[tool.pixi.environments]
default = { features = ["py312"], solve-group = "py312" }
py312 = { features = ["py312"], solve-group = "py312" }
py311 = ["py311"]
py310 = ["py310"]
py39 = ["py39"]
[tool.pytest.ini_options]
addopts = "-vs"
testpaths = ["tests"]
[tool.mypy]
exclude = ["tests"]
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
strict_equality = true
strict_concatenate = true
check_untyped_defs = true
disallow_untyped_decorators = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_reexport = true
warn_return_any = true
[tool.ruff.lint]
select = [
"ARG",
"B",
"C4",
"E",
"F",
"I",
"N",
"NPY",
"PD",
"PTH",
"RUF",
"SIM",
"W",
]
ignore = ["E501", "PT011"]
fixable = ["I", "W"]
[tool.codespell]
ignore-words-list = "nam"