Skip to content

Comments

[SCSB-223] align dependencies with explicit imports#626

Open
zacharyburnett wants to merge 1 commit intospacetelescope:mainfrom
zacharyburnett:scsb-223
Open

[SCSB-223] align dependencies with explicit imports#626
zacharyburnett wants to merge 1 commit intospacetelescope:mainfrom
zacharyburnett:scsb-223

Conversation

@zacharyburnett
Copy link
Collaborator

@zacharyburnett zacharyburnett commented Feb 13, 2026

Resolves SCSB-223

used valimdep to find unimported dependencies and undepended imports:

  • removed asdf-astropy
  • added pyyaml
  • sorted imports alphabetically

Tasks

  • Update or add relevant roman_datamodels tests.
  • Update relevant docstrings and / or docs/ page.
  • Does this PR change any API used downstream? (If not, label with no-changelog-entry-needed.)
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
Copy link
Collaborator Author

@braingram just making sure, asdf-astropy isn't required to be imported somewhere without being explicitly imported, right?

@zacharyburnett zacharyburnett marked this pull request as draft February 13, 2026 16:57
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.55%. Comparing base (087a60d) to head (2f32cd2).
⚠️ Report is 237 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #626      +/-   ##
==========================================
- Coverage   97.56%   94.55%   -3.01%     
==========================================
  Files          30       26       -4     
  Lines        2788     2681     -107     
==========================================
- Hits         2720     2535     -185     
- Misses         68      146      +78     

☔ 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.

"astropy >=6.0.0",
# "rad >=0.29.1",
"rad @ git+https://github.com/spacetelescope/rad.git",
"asdf-standard >=1.1.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can remove this one since rdm has no schemas.

@braingram
Copy link
Collaborator

@braingram just making sure, asdf-astropy isn't required to be imported somewhere without being explicitly imported, right?

Since asdf-astropy (and other asdf extensions) use entry points that are handled by asdf it's not required that this package import asdf-astropy for this package to use (and require) the features provided by asdf-astropy.

@zacharyburnett zacharyburnett force-pushed the scsb-223 branch 2 times, most recently from 48b06b0 to c16de13 Compare February 13, 2026 17:51
@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented Feb 13, 2026

for py311-oldestdeps the tests are failing because the current lowest allowed version of pytest_doctestplus uses pkg_resources which is no longer available:

  File "/home/runner/work/roman_datamodels/roman_datamodels/.tox/py311-oldestdeps-cov/lib/python3.11/site-packages/pytest_doctestplus/utils.py", line 3, in <module>
    import pkg_resources

https://github.com/spacetelescope/roman_datamodels/actions/runs/21997034193/job/63559649298?pr=626#step:10:142

EDIT: pytest_doctestplus>=1.3.0

@zacharyburnett zacharyburnett marked this pull request as ready for review February 13, 2026 17:59
@braingram
Copy link
Collaborator

for py311-oldestdeps the tests are failing because the current lowest allowed version of pytest_doctestplus uses pkg_resources which is no longer available:

  File "/home/runner/work/roman_datamodels/roman_datamodels/.tox/py311-oldestdeps-cov/lib/python3.11/site-packages/pytest_doctestplus/utils.py", line 3, in <module>
    import pkg_resources

https://github.com/spacetelescope/roman_datamodels/actions/runs/21997034193/job/63559649298?pr=626#step:10:142

EDIT: pytest_doctestplus>=1.3.0

Why is oldestdeps trying to install an old test dependency? Under what condition do we want to be using an old pytest plugin?

@zacharyburnett
Copy link
Collaborator Author

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants