Skip to content

Allow per-call CCD extension overrides - #960

Open
nomad3 wants to merge 3 commits into
astropy:mainfrom
nomad3:fix-817-ccd-extension-override
Open

Allow per-call CCD extension overrides#960
nomad3 wants to merge 3 commits into
astropy:mainfrom
nomad3:fix-817-ccd-extension-override

Conversation

@nomad3

@nomad3 nomad3 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an optional ext argument to ImageFileCollection.ccds() for selecting a FITS data extension per call
  • keep the collection's own extension unchanged for primary-header summaries and filtering
  • continue supporting ccd_kwargs["hdu"], avoid mutating caller dictionaries, and reject contradictory selectors explicitly
  • cover integer, extension-name, (name, version), and zero-valued selectors with offline multi-extension FITS regressions
  • correct the generated NumPy-style parameter indentation so the ccds() docstring builds cleanly under Sphinx warnings-as-errors

Compatibility boundary: ext is now reserved as the per-call selector; code that needs to filter an EXT header keyword should filter the collection before calling ccds().

Fixes #817

Validation

  • initial override/conflict regression on untouched main: 7 failed
  • python -m pytest ccdproc/tests/test_image_collection.py -q — 85 passed
  • full NumPy suite — 354 passed, 29 skipped
  • full Dask suite — 349 passed, 34 skipped
  • full JAX x64 suite — 347 passed, 29 skipped, 7 established xfails
  • inspected the final cleaned docstring: ext is a parameter and every description line is indented beneath it
  • Black, Ruff, git diff --check, and git show --check

AI assistance disclosure

OpenAI Codex was used for repository inspection, test design, implementation, CI diagnosis, and automated review. The contributor has completed the final review and takes responsibility for the contribution's correctness and maintenance.

Checklist

  • For new contributors: Did you add yourself to the AUTHORS.rst file? (Present on current main through merged Exclude masked weights from average combinations #952.)
  • For documentation changes: Does the commit message include a [skip ci]? (Not a documentation-only change.)

For new functionality:

  • Did you add an entry to CHANGES.rst?
  • Did you include a meaningful docstring with Parameters?
  • Does the commit message include Fixes #817?
  • Did you include tests for the new functionality?
  • Does this PR add, rename, move, or remove an existing function or parameter? (It adds the optional ext parameter.)

nomad3 added a commit to nomad3/ccdproc that referenced this pull request Jul 19, 2026
Signed-off-by: Simon Aguilera <saguilera1608@gmail.com>
nomad3 added 3 commits July 27, 2026 00:19
Fixes astropy#817

Signed-off-by: Simon Aguilera <saguilera1608@gmail.com>
Signed-off-by: Simon Aguilera <saguilera1608@gmail.com>
Signed-off-by: Simon Aguilera <saguilera1608@gmail.com>
@nomad3
nomad3 force-pushed the fix-817-ccd-extension-override branch from df72651 to 81fe53d Compare July 27, 2026 04:21
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.64%. Comparing base (e2d43f3) to head (81fe53d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #960      +/-   ##
==========================================
+ Coverage   96.63%   96.64%   +0.01%     
==========================================
  Files           8        8              
  Lines        1575     1581       +6     
==========================================
+ Hits         1522     1528       +6     
  Misses         53       53              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nomad3
nomad3 marked this pull request as ready for review July 27, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImagerFileCollection.ccds() extension override

1 participant