Package updates, additional tests, and force influence plot - #58
Merged
Conversation
Updates tox.ini to include py314 test environments and adds py314-alldeps-cov and py314-devdeps jobs to the CI test workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New test files: - test_f9topbox.py: socket operations for F/9 topbox - test_mmtcell.py: async cell operations - test_utils.py: DNS lookup functions - test_photometry.py: spot mask generation Enhanced existing tests: - test_secondaries.py: connected mode operations - test_telescope.py: edge cases and subprocess mocking - test_wfs.py: WFS operations and edge cases - test_zernike.py: Zernike calculations and cache tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add MMT.plot_force_influence() and lazy-loaded MMT.load_act2surf() helper, with act2surf_file path in config; rewire bcv dev.ipynb to call the class method instead of its local copy - Correct CLAUDE.md tox envs (py312 -> py314, no py312 exists); document console scripts and the photometry/utils/custom_exceptions modules - environment.yml: unpin python, pin httpx<1.0 (httpx 1.0 drops HTTPTransport and breaks dnspython's import) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #58 +/- ##
===========================================
+ Coverage 85.09% 96.61% +11.51%
===========================================
Files 10 10
Lines 2328 2361 +33
===========================================
+ Hits 1981 2281 +300
+ Misses 347 80 -267 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- wfs.py: replace deprecated DAOStarFinder sharphi=0.95 with sharpness_range=(0.2, 0.95) (numerically identical), and cast the detection result to a plain QTable before renaming x_centroid/y_centroid back to xcentroid/ycentroid so accessing the old names no longer raises AstropyDeprecationWarning. These two deprecations (the second masked by the first in CI) accounted for all 28 analysis-test failures. - test_wfs.py: recalibrate test_mmirs_analysis Z10 window to 388-408 to track the ~398 nm value produced under photutils 3.0 / numpy / scipy / astropy; rename the duplicate test_mmirs_pupil_mask (which actually tested plotgrid_hdr and was shadowed) to test_mmirs_plotgrid_hdr. - Clear remaining flake8 errors (unused imports/locals, trailing blank line) in test_mmtcell.py and test_telescope.py. - test_telescope.py: add coverage for the new MMT.load_act2surf() and MMT.plot_force_influence() (telescope.py now 100%). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
This PR adds a bunch of tests to bring total coverage to near 100%. This branch was also used to develop a new force influence plot that shows the surface displacement that a given force vector produces. Package configuration was also updated to increment supported python versions and tweak some version pinning. Claude was heavily used in the development here so the
CLAUDE.mdfile was included.Update: photutils 3.0 compatibility, codestyle, and coverage
Fixed CI failures introduced by the photutils 3.0 (and numpy/scipy/astropy) upgrade:
DAOStarFinder(..., sharphi=0.95)→sharpness_range=(0.2, 0.95)(verified numerically identical — photutils maps the old param to exactly this range, and source tables match byte-for-byte).DeprecatedColumnQTablethat warns whenever the oldxcentroid/ycentroidcolumn names are accessed. Cast it to a plainQTableinwfsfind()and rename the columns once, so the rest of the module keeps its established naming with no warnings. This second deprecation was masked in CI by the first.test_mmirs_analysis: recalibrated theZ10acceptance window (416–436→388–408) to track the stable ~398 nm value produced under the new dependency stack. Also renamed a shadowed duplicatetest_mmirs_pupil_mask(which actually testedplotgrid_hdr) totest_mmirs_plotgrid_hdr, so it now runs.MMT.load_act2surf()andMMT.plot_force_influence()—telescope.pyis now at 100%.Full test suite (169 tests) and flake8 both pass locally.