-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (118 loc) · 3.79 KB
/
pyproject.toml
File metadata and controls
139 lines (118 loc) · 3.79 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
[project.urls]
Homepage = "https://github.com/wildlife-dynamics/ecoscope-earthranger-io-core"
Tracker = "https://github.com/wildlife-dynamics/ecoscope-earthranger-io-core/issues"
[project]
name = "ecoscope-earthranger-io-core"
dynamic = ["version"]
readme = "README.md"
description = "Core models for Ecoscope interface with EarthRanger."
authors = [
{ name = "Charles Stern", email = "charless@earthranger.com" },
]
# dependencies for pip and pixi, grouped visually
# for clarity, some inevitable duplication here
requires-python = ">=3.10,<3.13"
dependencies = [
"pydantic >=2.0.0,<3",
"pyarrow >=20.0.0,<24",
"geoarrow-pyarrow >=0.2.0,<0.3",
"google-auth >=2.0.0,<3",
# note that pip distributions deliberately exclude
# geopandas and pandera, as they are not necessary
# and geopandas in particular is a heavy dependency
# only needed for the client side
]
[project.optional-dependencies]
test = [
"fastapi",
"pytest",
"pytest-asyncio",
"httpx",
]
[tool.pixi.dependencies]
python = ">=3.10,<3.13"
pydantic = ">=2.0.0,<3"
pyarrow = ">=20.0.0,<24"
geoarrow-pyarrow = ">=0.2.0,<0.3"
google-auth = ">=2.0.0,<3"
geopandas = ">=1.1.0,<2"
pandera = ">=0.24.0,<0.32"
[tool.pixi.feature.test.dependencies]
fastapi = "*"
pytest = ">=8.3.5,<9"
pytest-asyncio = "*"
httpx = "*"
mypy = "*"
pandas-stubs = "*"
pandera-mypy = "*"
# additional pixi workspace, environment, feature etc. declarations
[tool.pixi.workspace]
preview = ["pixi-build"]
platforms = ["linux-64", "osx-arm64"]
channels = [
"https://repo.prefix.dev/ecoscope-workflows/",
"https://prefix.dev/conda-forge",
"https://prefix.dev/pixi-build-backends",
]
[tool.pixi.feature.py310]
dependencies = { python = "3.10.*" }
[tool.pixi.feature.py311]
dependencies = { python = "3.11.*" }
[tool.pixi.feature.py312]
dependencies = { python = "3.12.*" }
[tool.pixi.feature.test.pypi-dependencies]
"ecoscope-earthranger-io-core" = { path = ".", editable = true }
pyarrow-stubs = "*" # recommended in https://github.com/apache/arrow/issues/32609
types-geopandas = "*" # https://github.com/geopandas/geopandas/issues/3091
types-shapely = "*"
[tool.pixi.feature.test.tasks]
test-310 = { cmd = "./dev/pytest.sh 310"}
test-311 = { cmd = "./dev/pytest.sh 311"}
test-312 = { cmd = "./dev/pytest.sh 312"}
test-all = { cmd = "echo 'test-all' complete", depends-on = [
"test-310",
"test-311",
"test-312",
]}
mypy-310 = { cmd = "./dev/mypy.sh 310"}
mypy-311 = { cmd = "./dev/mypy.sh 311"}
mypy-312 = { cmd = "./dev/mypy.sh 312"}
mypy-all = { cmd = "echo 'mypy-all' complete", depends-on = [
"mypy-310",
"mypy-311",
"mypy-312",
]}
[tool.pixi.feature.publish.dependencies]
rattler-build = "*"
hatch = "*"
hatch-vcs = "*"
[tool.pixi.feature.publish.tasks]
build-release = { cmd = "./publish/build.sh" }
push-all = { cmd = "./publish/push.sh" }
[tool.pixi.environments]
default = { solve-group = "default" }
publish = { features = ["publish"], solve-group = "default" }
test-310 = { features = ["test", "py310"], solve-group = "py310" }
test-311 = { features = ["test", "py311"], solve-group = "py311" }
test-312 = { features = ["test", "py312"], solve-group = "py312" }
# build configuration; for pip ...
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.vcs]
version-file = "src/ecoscope_earthranger_io_core/_version.py"
[tool.hatch.version]
source = "vcs"
fallback-version = "9999"
# ... and for pixi
[tool.pixi.package]
name = "ecoscope-earthranger-io-core"
version = "9999" # placeholder to be overridden by rattler build backend
[tool.pixi.package.build]
backend = { name = "pixi-build-python", version = "0.1.*" }
[tool.pixi.package.host-dependencies]
python = ">=3.10,<=3.12"
hatchling = "==1.26.3"
# other tools
[tool.mypy]
plugins = ["pandera.mypy", "pydantic.mypy"]