-
Notifications
You must be signed in to change notification settings - Fork 29
/
pyproject.toml
116 lines (94 loc) · 3.14 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
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "pyflwdir"
authors = [{name = "Dirk Eilander", email = "dirk.eilander@deltares.nl"}]
readme = "README.rst"
license = {file = "LICENSE"}
classifiers = ["License :: OSI Approved :: MIT License"]
dynamic = ["version", "description"]
dependencies = [
"affine",
"numba>=0.54,<1.0",
"numpy",
"scipy",
]
requires-python = ">=3.9"
[project.urls]
Home = "https://github.com/Deltares/pyflwdir"
Documentation = "https://deltares.github.io/pyflwdir"
[project.optional-dependencies]
test = [
"black[jupyter]",
"pre-commit",
"pytest>=2.7.3",
"pytest-cov",
]
doc = [
"nbsphinx",
"pydata-sphinx-theme",
"sphinx",
"sphinx_design",
]
examples = [
"cartopy>=0.20",
"descartes",
"geopandas>0.8",
"jupyter",
"matplotlib",
"rasterio",
"pandoc",
]
full = ["pyflwdir[test, doc, examples]"]
[tool.black]
line-length = 88
target-version = ['py39']
[tool.flit.sdist]
include = ["pyflwdir"]
exclude = ["docs", "notebooks", "envs", "tests", "binder", ".github"]
[tool.pytest.ini_options]
testpaths = ["tests"]
[tool.make_env]
channels = ["conda-forge"]
deps_not_in_conda = [
"sphinx_design",
"black[jupyter]",
]
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64"]
[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.feature.py312.dependencies]
python = "3.12.*"
[tool.pixi.feature.doc.dependencies]
pandoc = "*"
[tool.pixi.pypi-dependencies]
pyflwdir = { path = ".", editable = true }
[tool.pixi.environments]
default = { features = ["py311", "full", "test", "doc", "examples"], solve-group = "default" }
test-py39 = { features = ["py39", "test"], solve-group = "py39" }
test-py310 = { features = ["py310", "test"], solve-group = "py310" }
test-py311 = { features = ["test"], solve-group = "default" }
test-py312 = { features = ["py312", "test"], solve-group = "py312" }
[tool.pixi.tasks]
install-pre-commit = "pre-commit install"
# linting
lint = { cmd = "pre-commit run --all-files", depends_on = ["install-pre-commit"] }
# docs
docs-dummy = {cmd = ["sphinx-build", "./docs", "./docs/_build", "-b", "dummy", "-W"], env = {PYDEVD_DISABLE_FILE_VALIDATION = "1"}}
docs-skip-examples = {cmd = ["sphinx-build", "./docs", "./docs/_build", "-b", "html", "-W"], env = {SKIP_DOC_EXAMPLES = "1", PYDEVD_DISABLE_FILE_VALIDATION = "1"}}
docs-html = {cmd = ["sphinx-build", "-M", "html", "./docs", "./docs/_build", "-W"]}
docs-clean = {cmd = ["rm", "-rf", "./docs/_build", "./docs/_generated"] }
docs-html-clean = { depends_on = ["docs-clean", "docs-html"] }
# tests
test = { cmd = ["pytest", "tests", "-v", "--cov-report=term-missing"] }
test-cov-xml = { cmd = "python -m pytest --verbose --cov=pyflwdir --cov-report xml", env = {NUMBA_DISABLE_JIT = "1"} }
test-cov = { cmd = "python -m pytest --verbose --cov=pyflwdir --cov-report term-missing", env = {NUMBA_DISABLE_JIT = "1"} }
# version
version = { cmd = ["python", "-c", "from pyflwdir import __version__ as v; print('dev' if 'dev' in v else 'v'+v)"] }