Skip to content

Conversation

@zacharyburnett
Copy link
Collaborator

@zacharyburnett zacharyburnett commented Dec 12, 2024

moves pytest_crds plugin from jwst to here. pytest_crds is a PyTest plugin that reports the CRDS context in the pytest output if you add the --report-crds-context flag

corresponding PR in jwst:

Tasks

  • update or add relevant tests
  • update relevant docstrings and / or docs/ page
  • Does this PR change any API used downstream? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see below for change types)
    • run regression tests with this branch installed ("git+https://github.com/<fork>/stpipe@<branch>")
news fragment change types...
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.misc.rst: infrastructure or miscellaneous change

@zacharyburnett zacharyburnett self-assigned this Dec 12, 2024
@zacharyburnett zacharyburnett added the no-changelog-entry-needed does not require an entry in `CHANGES.rst` label Dec 12, 2024
@codecov
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.

Project coverage is 95.08%. Comparing base (a2a8d46) to head (11fbb09).
Report is 44 commits behind head on main.

Files with missing lines Patch % Lines
src/stpipe/pytest_crds/plugin.py 28.57% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #211      +/-   ##
==========================================
- Coverage   95.22%   95.08%   -0.15%     
==========================================
  Files          37       38       +1     
  Lines        3165     3172       +7     
==========================================
+ Hits         3014     3016       +2     
- Misses        151      156       +5     

☔ View full report in Codecov by Sentry.
📢 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.

@braingram
Copy link
Collaborator

braingram commented Dec 13, 2024

As this package is used by romancal (and we've heard about uses for other projects) I think jwst (or another package) is the right home for this plugin (if the plugin is still useful).

EDIT: after discussion about potential usefulness for roman my vote is to update this PR to be compatible with both packages and for uses where crds might not be used.

@pllim
Copy link
Contributor

pllim commented Jun 17, 2025

Why not just always enable the reporting? Not like romancal can run without CRDS. I don't think you need a whole plugin to just control a test header.

if config.getoption("report_crds_context"):
from stpipe.crds_client import get_context_used

return f"crds_context: {get_context_used('jwst')}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be "jwst" anymore here if you decide to keep it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog-entry-needed does not require an entry in `CHANGES.rst`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants