-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
217 lines (193 loc) · 7.63 KB
/
Copy pathpyproject.toml
File metadata and controls
217 lines (193 loc) · 7.63 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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
[build-system]
requires = ["hatchling>=1.5.0", "hatch-nodejs-version>=0.3.2", "pyyaml>=6"]
build-backend = "hatchling.build"
[project]
name = "fileglancer"
readme = "README.md"
authors = [
{ name = "Allison Truhlar", email = "truhlara@janelia.hhmi.org" },
{ name = "Jody Clements", email = "clementsj@janelia.hhmi.org" },
{ name = "Cristian Goina", email = "goinac@janelia.hhmi.org" },
{ name = "Konrad Rokicki", email = "rokickik@janelia.hhmi.org" }
]
license = { file = "LICENSE" }
requires-python = ">=3.12.0"
classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = ["version", "description", "urls", "keywords"]
dependencies = [
"alembic ==1.19.2",
"atlassian-python-api ==4.0.7",
"authlib ==1.8.0",
"cachetools ==6.2.6",
"click ==8.5.0",
"fastapi ==0.136.3",
"httpx ==0.28.1",
"itsdangerous ==2.2.0",
"loguru ==0.7.3",
"pandas ==2.3.3",
"psycopg2-binary ==2.9.12",
"pydantic ==2.13.5",
"pydantic-settings ==2.15.0",
"python-jose ==3.5.0",
"cryptography ==50.0.1",
"sqlalchemy ==2.0.52",
"packaging ==26.3",
"uvicorn ==0.38.0",
"x2s3 ==1.6.0",
"py-cluster-api ==0.8.0"
]
[project.scripts]
fileglancer = "fileglancer.cli:cli"
[project.optional-dependencies]
test = [
"coverage ==7.16.0",
"pytest ==9.1.1",
"pytest-asyncio ==1.4.0",
"pytest-cov ==7.1.0",
"pytest-html ==4.2.0",
"requests-mock ==1.12.1",
"httpx2 ==2.12.0"
]
release = [
"twine ==7.0.0",
"hatch ==1.17.1"
]
[tool.hatch.version]
source = "nodejs"
path = "frontend/package.json"
[tool.hatch.metadata.hooks.nodejs]
path = "frontend/package.json"
fields = ["description", "urls", "keywords"]
[tool.hatch.build.targets.sdist]
artifacts = [
"fileglancer/ui",
"fileglancer/alembic.ini",
"fileglancer/alembic/**/*"
]
exclude = [".github"]
[tool.hatch.build.targets.wheel]
artifacts = [
"fileglancer/ui",
"fileglancer/alembic.ini",
"fileglancer/alembic/**/*"
]
[tool.hatch.build.hooks.version]
path = "fileglancer/_version.py"
[tool.hatch.build.hooks.custom]
path = "hatch_build.py"
[tool.check-wheel-contents]
ignore = ["W002"]
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["osx-arm64", "osx-64", "linux-64", "linux-aarch64"]
[tool.pixi.feature.test.tasks]
test-pip-install = { cmd = "pip install -e .", default-environment = "test" }
test-backend = { cmd = "pytest --cov=fileglancer --cov-report=html --cov-report=term", depends-on = ["test-pip-install"], default-environment = "test" }
test-frontend = { cmd = "cd frontend && npm test", default-environment = "test" }
test-storybook = { cmd = "cd frontend && npm run test:storybook", default-environment = "test" }
[tool.pixi.feature.test.dependencies]
coverage = ">=7.10.6,<8"
pytest = ">=9.1.1,<10"
pytest-asyncio = ">=1.1.0,<2"
pytest-cov = ">=7.0.0,<8"
pytest-jupyter = ">=0.10.1,<0.11"
requests-mock = ">=1.12.1,<2"
pytest-jupyter-server = ">=0.6.0"
httpx2 = ">=2.2.0,<3"
[tool.pixi.feature.release.tasks]
version = "hatch version"
pypi-build = "pip install build && python -m build"
pypi-upload = "twine upload dist/*"
[tool.pixi.feature.release.dependencies]
twine = ">=7.0.0,<8"
hatch = ">=1.14.1,<2"
[tool.pixi.feature.release.pypi-dependencies]
hatch-nodejs-version = ">=0.3.2,<0.4"
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
[tool.pixi.environments]
default = { solve-group = "default" }
test = { features = ["test"], solve-group = "default" }
release = { features = ["release"], solve-group = "default" }
test-py312 = ["test", "py312"]
[tool.pixi.tasks]
sync-pypi-versions = "python scripts/sync_pyproject_versions.py"
unpin-pypi-versions = "python scripts/sync_pyproject_versions.py --unpin"
bump-pypi-versions = "python scripts/sync_pyproject_versions.py --unpin && pixi update && python scripts/sync_pyproject_versions.py"
pip-install = { cmd = "pixi reinstall fileglancer" }
pip-uninstall = { cmd = "pixi clean" }
node-install = "cd frontend && npm install"
node-build = { cmd = "cd frontend && npm run build", depends-on = ["node-install"] }
node-eslint-check = "cd frontend && npx eslint . --ext .ts,.tsx"
node-eslint-write = "cd frontend && npx eslint . --cache --fix --ext .ts,.tsx"
node-prettier-check = "cd frontend && npx prettier \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\" \"!package-lock.json\" --check"
node-prettier-write = "cd frontend && npx prettier --list-different --write '**/*.{ts,tsx,js,jsx,json,md}' '!package-lock.json'"
node-check = "cd frontend && npx tsc --noEmit -p tsconfig.app.json"
node-install-ui-tests = "npm --prefix frontend/ui-tests install"
test-ui = { cmd = "npm --prefix frontend/ui-tests run test ", depends-on = ["node-install-ui-tests"] }
test-launch = "pixi run uvicorn fileglancer.server:app --port 7879"
dev-install = { depends-on = ["node-build", "pip-install"] }
dev-watch = { cmd = "cd frontend && NODE_ENV=development npm run watch" }
storybook = { cmd = "npm run storybook", cwd = "frontend" }
storybook-build = { cmd = "npm run build-storybook", cwd = "frontend" }
dev-vite = { cmd = "cd frontend && npx vite" }
dev-vite-remote = { cmd = "cd frontend && SSL_KEYFILE=/opt/certs/cert.key SSL_CERTFILE=/opt/certs/cert.crt npx vite" }
dev-launch = "pixi run uvicorn fileglancer.server:app --port 7878 --reload"
debug-launch = "fileglancer debug"
dev-launch-remote = "pixi run uvicorn fileglancer.server:app --host 0.0.0.0 --port 7878 --reload --ssl-keyfile /opt/certs/cert.key --ssl-certfile /opt/certs/cert.crt"
prod-launch-remote = "pixi run uvicorn fileglancer.server:app --workers 10 --host 0.0.0.0 --port 7878 --ssl-keyfile /opt/certs/cert.key --ssl-certfile /opt/certs/cert.crt"
dev-launch-secure = "python fileglancer/dev_launch.py"
migrate = "alembic -c fileglancer/alembic.ini upgrade head"
migrate-create = "alembic -c fileglancer/alembic.ini revision --autogenerate"
stamp-db = "python -m fileglancer.stamp_db"
container-rebuild = "bash .devcontainer/dc.sh up --workspace-folder . --remove-existing-container"
container-shell = "bash .devcontainer/dc.sh exec --workspace-folder . bash"
container-claude = "bash .devcontainer/dc.sh exec --workspace-folder . bash -lc 'pixi run claude --permission-mode auto'"
container-codex = "bash .devcontainer/dc.sh exec --workspace-folder . bash -lc 'pixi run codex --dangerously-bypass-approvals-and-sandbox'"
claude = "claude"
codex = "codex"
[tool.pixi.tasks.test-py312]
depends-on = [
{ task = "test-pip-install", environment = "test-py312" },
{ task = "test-backend", environment = "test-py312" }
]
[tool.pixi.dependencies]
python = ">=3.12.0"
pip = ">=25.0.1,<26"
nodejs = ">=22.12.0,<23"
alembic = ">=1.17.0,<2"
atlassian-python-api = ">=4.0.7,<5"
authlib = ">=1.6.5,<2"
cachetools = ">=6.2.1,<7"
click = ">=8.0,<9"
fastapi = ">=0.136.3,<0.137"
httpx = ">=0.28.1,<0.29"
itsdangerous = ">=2.2.0,<3"
loguru = ">=0.7.3,<0.8"
pandas = ">=2.3.3,<3"
psycopg2-binary = ">=2.9.10,<3"
pydantic = ">=2.10.6,<3"
pydantic-settings = ">=2.11.0,<3"
python-jose = ">=3.5.0,<4"
cryptography = ">=50.0.1,<51"
sqlalchemy = ">=2.0.44,<3"
packaging = ">=24.0"
uvicorn = ">=0.38.0,<0.39"
[tool.pixi.pypi-dependencies]
fileglancer = { path = ".", editable = true }
# Semver ranges scripts/sync_pyproject_versions.py restores via `--unpin` (run
# before `pixi update`, so it has room to move) for PyPI-only packages that
# have no [tool.pixi.*] conda mirror to restore a range from. Not read by
# pixi or pip -- sync_pyproject_versions.py is the only consumer.
[tool.sync-pypi-versions.ranges]
x2s3 = ">=1.5.2,<2"
py-cluster-api = ">=0.8.0,<0.9"
build = ">=1.3.0,<2"
[dependency-groups]
release = ["build ==1.6.0"]