jwst
jwst copied to clipboard
JP-3552: use tmp_path instead of tmpdir, enable no:legacypath as a tox factor
Resolves JP-3552
Closes #8311
This PR replaces all instances tmpdir and tmpdir_factory pytest fixtures with tmp_path and tmp_path_factory fixtures, as recommended by pytest (see here), so that these are returning standard pathlib.Path instances instead of legacy py.path.local instances.
Checklist for maintainers
- [ ] added entry in
CHANGES.rst
within the relevant release section - [ ] updated or added relevant tests
- [ ] updated relevant documentation
- [ ] added relevant milestone
- [ ] added relevant label(s)
- [ ] ran regression tests, post a link to the Jenkins job below. How to run regression tests on a PR
- [ ] Make sure the JIRA ticket is resolved properly
Codecov Report
Attention: Patch coverage is 55.55556%
with 4 lines
in your changes are missing coverage. Please review.
Project coverage is 53.21%. Comparing base (
4cc0ac1
) to head (06b0731
). Report is 27 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
jwst/scripts/okify_regtests.py | 0.00% | 3 Missing :warning: |
jwst/regtest/conftest.py | 75.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #8327 +/- ##
===========================================
- Coverage 75.15% 53.21% -21.95%
===========================================
Files 470 389 -81
Lines 38604 38463 -141
===========================================
- Hits 29014 20468 -8546
- Misses 9590 17995 +8405
Flag | Coverage Δ | |
---|---|---|
nightly | ? |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@emolter What's the status of all the suggestions from @jdavies-st ? Do you think they're reasonable?
For some reason, I did not get (or missed) the notification that @jdavies-st reviewed this! Thanks for doing that @jdavies-st, and thanks for the bump @hbushouse. I think the comments are all reasonable and I'll start going through them one by one now.
stpipe.Step
parameter validation prevents some file paths being validated when passed pathlib.Path
objects. Fine to work around that in this PR. Issue opened here
https://github.com/spacetelescope/stpipe/issues/147
new regtest run started here
Hopefully a final, successful regression test run after fixing two failures: here
edit: all tests ran successfully - jump test failure is unrelated
New regtest run started here.
edit: Regression tests are failing for the two test_nirspec_ifu_spec2
tests where there seemed to be an implicit scope mismatch before. Of course it Works On My MachineTM so I started this run that only runs tests in that file.
Finally, regression tests for just nirspec_ifu_spec2 passed here. Between this and the previous regtest run, hopefully everything is working now, but I started this new full run just in case.
Latest full regtest run has failures that are all unrelated to this PR (they're due to a separate update to datamodels). So this looks good. I'm approving and merging. Nice work everyone - that's a wrap.