fix: small develop bugs (#709, #711, #712, #713)#714
Open
cailmdaley wants to merge 3 commits intodevelopfrom
Open
fix: small develop bugs (#709, #711, #712, #713)#714cailmdaley wants to merge 3 commits intodevelopfrom
cailmdaley wants to merge 3 commits intodevelopfrom
Conversation
7-space indent on the Params Default docstring opener caused IndentationError at the 8-space body, breaking canfar_monitor, canfar_submit_job, canfar_monitor_log, and canfar_run imports. Closes #709
summary_run previously consumed sys.argv[1] as the 'patch' positional without parsing, so 'summary_run -h' tried to create a directory named '-h'. Switch to argparse: help/usage work, required patch is enforced, optional job_exclusive and --verbose preserved. Closes #711
Three runtime deps were missing from the develop image, breaking
imports in recently-merged modules:
- astroquery: mask_package.mask, mask_runner
- numba: ngmix_package.ngmix, ngmix_runner
- fitsio: uncompress_fits_package.uncompress_fits,
uncompress_fits_runner
setuptools>=81 dropped pkg_resources, which sip_tpv v1.1 (the latest
release; upstream unmaintained) still imports at module load. That
breaks split_exp_package.split_exp and split_exp_runner on current
setuptools. Pinning setuptools<81 restores pkg_resources until
sip_tpv is either forked or replaced; the v2.0 Dockerfile uses the
same pin.
Closes #712
Closes #713
This was referenced Apr 23, 2026
martinkilbinger
pushed a commit
to martinkilbinger/shapepipe-1
that referenced
this pull request
Apr 24, 2026
Closes CosmoStat#713. The only functional use of sip_tpv in shapepipe was `split_exp.create_hdus` calling `stp.pv_to_sip(h)` to rewrite each per-CCD header's TPV distortion keywords as SIP before saving. Modern astropy (>=5) parses TPV natively via WCSLIB, as do SExtractor, PSFEx, and every other downstream WCS consumer in the pipeline, so the keyword-level conversion was no longer buying us anything. Removing the conversion lets us drop sip_tpv entirely — an unmaintained 2017 package whose v1.1 imports `pkg_resources` at module load and is incompatible with setuptools>=81 (the underlying cause of the ModuleNotFoundError in CosmoStat#713; PR CosmoStat#714's setuptools<81 pin is a symptom workaround). Changes: - split_exp: remove sip_tpv import + pv_to_sip call; drop the now-dead `transf_coord` plumbing through `process` / `create_hdus`; update module docstring accordingly. - Remove sip_tpv from `depends=[...]` in split_exp_runner, python_example_runner, and find_exposures_runner (the last was a spurious declaration — find_exposures_package never imported it). - Drop sip_tpv from environment.yml, environment-dev.yml, Dockerfile, install_shapepipe, docs/source/dependencies.md, and the orphan shupe:12 BibTeX entry. - New: `src/shapepipe/tests/test_split_exp.py` — three unittests that build a synthetic multi-CCD FITS with TPV distortion, run SplitExposures, and verify (1) per-CCD header WCS matches the source for several pixel samples, (2) the saved headers .npy round-trips pixel→world→pixel, (3) flag output uses int16. `scripts/jupyter/wcs.ipynb` still imports sip_tpv; it's an exploratory notebook last touched ~2.5 years ago and left alone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four of the five issues filed against
developwhile I was reviewing PRs this week. Issue #710 is still open pending a direction call (posted findings there).Changes
fix: align canfar_monitor docstring indentationsrc/shapepipe/canfar/canfar_monitor.pyfix: add argparse to summary_run so -h shows helpsrc/shapepipe/summary_run.pyfix: add astroquery, numba, fitsio, pin setuptools<81 in DockerfileDockerfileNotes
#713 turned out to be a transitive issue:
sip_tpvv1.1 (the latest release; upstream appears unmaintained) importspkg_resourcesat module load, whichsetuptools>=81no longer ships. Thesetuptools<81pin restores it. The v2.0 Dockerfile already uses the same pin.#711 swapped to argparse rather than a 2-line
-h/--helpguard sosummary_rungets real help output. Behavior is preserved:patchis still the required positional,job_exclusiveis still optional, and-v/--verbosereplaces the oldlen(args) == 3heuristic.#712 picks up
astroquery,numba,fitsiounpinned to match the pattern on v2.0's Dockerfile (core stack pinned, auxiliary tools floating). Happy to pin them if preferred — let me know.Closes #709, #711, #712, #713.