-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (129 loc) · 4.3 KB
/
Copy pathpyproject.toml
File metadata and controls
141 lines (129 loc) · 4.3 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
[project]
name = "shapepipe"
version = "1.1.0"
description = "Galaxy shape measurement pipeline."
readme = "README.rst"
authors = [
{ name = "Samuel Farrens", email = "samuel.farrens@cea.fr" },
{ name = "Axel Guinot", email = "axel.guinot@cea.fr" },
{ name = "Martin Kilbinger", email = "martin.kilbinger@cea.fr" }
]
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.12"
# Dependencies use FLOOR RANGES; exact versions live in `uv.lock`, the
# reproducible manifest generated by uv (never hand-edited). Renovate updates
# the lock (rangeStrategy=update-lockfile, see renovate.json), so uv's resolver
# owns version selection — cross-package constraints (e.g. numba capping numpy)
# are resolved jointly instead of failing update PRs. Bump a floor only when
# the code actually requires the newer API.
dependencies = [
"astropy>=7.0", # major 6 → 7
"astroquery",
"canfar",
"cs_util>=0.2.1",
"galsim>=2.8",
"h5py",
"joblib>=1.4",
"matplotlib>=3.10",
"mccd>=1.2.4",
"modopt>=1.6",
"mpi4py>=4.1.2",
"numba>=0.59", # numpy 2 support
"numpy>=2.4.6", # major 1 → 2
"pandas>=3.0.3", # major 2 → 3
"python-dateutil",
"python-pysap>=0.3",
"PyQt5",
"pyqtgraph",
"reproject>=0.19",
"sf_tools>=2.0.4",
"skaha>=1.7",
"sqlitedict>=2.0",
"termcolor",
"tqdm>=4.68.1",
"vos>=3.6",
"ngmix>=2.4",
]
[project.optional-dependencies]
doc = [
"myst-parser",
"numpydoc",
"sphinx",
"sphinxcontrib-bibtex",
"sphinx-book-theme"
]
jupyter = [
"ipython>=9.14.1",
"jupyterlab>=4.5.9",
"snakemake>=9.22.0",
]
lint = [
"ruff",
]
release = [
"build",
"twine",
]
test = [
"hypothesis>=6.155.2",
"pytest>=8.3",
"pytest-cov>=5.0",
]
fitsio = ["fitsio"]
dev = ["shapepipe[doc,jupyter,lint,release,test,fitsio]"]
[project.scripts]
shapepipe_run = "shapepipe.shapepipe_run:main"
summary_run = "shapepipe.summary_run:main"
canfar_submit_job = "shapepipe.canfar_run:run_job"
canfar_monitor = "shapepipe.canfar_run:run_log"
canfar_monitor_log = "shapepipe.canfar_run:run_monitor_log"
[tool.uv]
# shapepipe targets Linux only; skip Windows/macOS wheel resolution
environments = ["sys_platform == 'linux'"]
[tool.uv.sources]
ngmix = { git = "https://github.com/esheldon/ngmix", tag = "v2.4.1" }
# Track cs_util's develop branch (a git ref, not a pinned release) so new
# cs_util.size / cs_util.shape helpers are available without shipping a release
# and rebuilding the image each time. shapepipe's column grammar sources size
# (T = 2*sigma^2) and ellipticity conversions from cs_util.
cs_util = { git = "https://github.com/CosmoStat/cs_util", branch = "develop" }
[build-system]
# Declaring a build backend makes shapepipe an installed package (not a uv
# "virtual" project), so `uv sync` / `pip install -e .` put it on the path
# rather than only its dependencies.
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
script-files = [
"scripts/python/update_runs_log_file.py",
"scripts/sh/run_job_sp_canfar_v2.0.bash",
"scripts/sh/job_sp_canfar_v2.0.bash",
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
# Ruff is the single lint + format tool, replacing black, isort, and the
# pytest-pycodestyle / pytest-pydocstyle plugins (the latter broke on the
# pytest 9.1 hookspec change). Rules below cover pycodestyle (E/W), Pyflakes
# (F), import sorting (I), and numpydoc-style docstrings (D) — matching the
# project style: PEP 8 + numpydoc.
line-length = 79
target-version = "py312"
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "W", "F", "I", "D"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.pytest.ini_options]
# One discovery root: everything lives under `tests/`. Tiers are
# `module/` (per-module unit tests, import package internals directly),
# `unit/` (structural), `science/` (fast guardrails), `cluster/` (candide,
# marked `candide`+`slow`), with shared library code in `helpers/`. See
# tests/README.md.
addopts = "--verbose --strict-markers --cov=shapepipe --cov-report=term-missing"
testpaths = ["tests"]
markers = [
"slow: heavy compute (minutes); excluded from the fast inner loop.",
"candide: needs the candide cluster and/or its real data; auto-skipped elsewhere.",
]