spacetelescope / stcal

https://stcal.readthedocs.io/en/latest/
Other
10 stars 32 forks source link

Isolate jwst/romancal pytest configuration #297

Closed braingram closed 3 weeks ago

braingram commented 4 weeks ago

Currently downstream testing of jwst and romancal end up using the pyproject.toml in this repository for determining pytest configuration. https://github.com/spacetelescope/stcal/actions/runs/11142379456/job/30965215790#step:10:107 This ends up with pytest using options in these downstream tests that differ from the options used by the downstream packages in their tests (when run in their own CI). This in turn results in lots of false failures in our downstream testing.

This PR changes how the jwst and romancal downstream tests to use the pytest options defined in the respective repositories.

Tasks

news fragment change types... - ``changes/.apichange.rst``: change to public API - ``changes/.bugfix.rst``: fixes an issue - ``changes/.general.rst``: infrastructure or miscellaneous change
codecov[bot] commented 4 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.21%. Comparing base (a83e20b) to head (60bd3b8). Report is 5 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #297 +/- ## ========================================== + Coverage 81.80% 86.21% +4.40% ========================================== Files 46 47 +1 Lines 8810 8812 +2 ========================================== + Hits 7207 7597 +390 + Misses 1603 1215 -388 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

braingram commented 4 weeks ago

Needs a changes fragment for the change log, but otherwise fine.

Thanks! I pushed on in 24b0a2b I gave it the 'general' category. I originally left one off since this is all internal/testing changes. If it's helpful to have these in the changelog we could add a 'testing' catagory for these types of changes.

jhunkeler commented 3 weeks ago

Hey, the test-numpy{...} environments don't map back to any [testenv].deps. Unless you planned to get rid of these the following should make it work:

diff --git a/tox.ini b/tox.ini
index 14937c2..8819ecf 100644
--- a/tox.ini
+++ b/tox.ini
@@ -2,7 +2,7 @@
 envlist =
     check-{style,build,types}
     test{,-warnings,-cov}-xdist
-    test-numpy{120,121,122}
+    test-numpy{123,124,125,126}
     test-{jwst,romancal}{,-xdist}{,-cov}
     build-{docs,dist}

@@ -69,6 +69,10 @@ deps =
     devdeps: asdf @ git+https://github.com/asdf-format/asdf.git
     devdeps: drizzle @ git+https://github.com/spacetelescope/drizzle.git
     devdeps: gwcs @ git+https://github.com/spacetelescope/gwcs.git
+    numpy123: numpy<1.24.0,>=1.23.0
+    numpy124: numpy<1.25.0,>=1.24.0
+    numpy125: numpy<1.26.0,>=1.25.0
+    numpy126: numpy<2.0.0,>=1.26.0
 use_develop = true
 pass_env =
     CI

EDIT: Tox silently ignored 1.20 through 1.22. Packages in the environment must be forcing it to update to 2.x.

braingram commented 3 weeks ago

Thanks for finding that. I removed those from the envlist in 60bd3b86914202b228cf49b17fd079bee30f3f94 The oldestdeps job should check the lower numpy pin, the "normal" jobs the latest release and the devdeps the dev version so I think we have numpy well covered by those.

jhunkeler commented 3 weeks ago

No problem! I don't see anything else that jumps out at me.