Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable namespace package discovery, rename pytest plugin #1562

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Dec 13, 2024

The romancal wheel currently contains a few namespaced packaged:

  • changes
  • docs
  • pytest_plugin

where when a user install romancal their site-packages directory will contain docs, changes etc. The easiest way to see this is to download the romancal wheel from pypi and unzip it in a directory. Notice the empty folder for changes and the docs containing the docs folder from romancal.

This PR disables the namespace package discovery to prevent including these in the wheel files and adds includes for romancal and pytest_romancal (renamed from pytest_plugin).

With this PR the wheel no longer contains changes and docs. This can be seen by running:

pip wheel . -w wheels
zipinfo wheels/romancal*.whl

Note that you may need to do this in a fresh clone that has not be development installed as that appears to leave behind package data that messes with the wheel building.

Regression tests all pass: https://github.com/spacetelescope/RegressionTests/actions/runs/12321831282

Tasks

  • request a review from someone specific, to avoid making the maintainers review every PR
  • add a build milestone, i.e. 24Q4_B15 (use the latest build if not sure)
  • Does this PR change user-facing code / API? (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)
    • update or add relevant tests
    • update relevant docstrings and / or docs/ page
    • start a regression test and include a link to the running job (click here for instructions)
      • Do truth files need to be updated ("okified")?
        • after the reviewer has approved these changes, run okify_regtests to update the truth files
  • if a JIRA ticket exists, make sure it is resolved properly
news fragment change types...
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change
  • changes/<PR#>.docs.rst
  • changes/<PR#>.stpipe.rst
  • changes/<PR#>.associations.rst
  • changes/<PR#>.scripts.rst
  • changes/<PR#>.mosaic_pipeline.rst
  • changes/<PR#>.patch_match.rst

steps

  • changes/<PR#>.dq_init.rst
  • changes/<PR#>.saturation.rst
  • changes/<PR#>.refpix.rst
  • changes/<PR#>.linearity.rst
  • changes/<PR#>.dark_current.rst
  • changes/<PR#>.jump_detection.rst
  • changes/<PR#>.ramp_fitting.rst
  • changes/<PR#>.assign_wcs.rst
  • changes/<PR#>.flatfield.rst
  • changes/<PR#>.photom.rst
  • changes/<PR#>.flux.rst
  • changes/<PR#>.source_detection.rst
  • changes/<PR#>.tweakreg.rst
  • changes/<PR#>.skymatch.rst
  • changes/<PR#>.outlier_detection.rst
  • changes/<PR#>.resample.rst
  • changes/<PR#>.source_catalog.rst

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Dec 13, 2024
@braingram braingram force-pushed the no_namespaces branch 2 times, most recently from a10cba9 to 1a8d975 Compare December 13, 2024 19:15
@braingram braingram marked this pull request as ready for review December 13, 2024 19:37
@braingram braingram requested a review from a team as a code owner December 13, 2024 19:37
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.94%. Comparing base (603f285) to head (46ea510).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1562   +/-   ##
=======================================
  Coverage   77.94%   77.94%           
=======================================
  Files         115      115           
  Lines        7622     7622           
=======================================
  Hits         5941     5941           
  Misses       1681     1681           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@braingram braingram requested review from zacharyburnett and removed request for a team December 13, 2024 19:49
Copy link
Collaborator

@zacharyburnett zacharyburnett left a comment

Choose a reason for hiding this comment

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

this LGTM, now we don't have to remember to update this when webbpsf changes their package name

@braingram braingram merged commit b2aa8e0 into spacetelescope:main Dec 16, 2024
30 checks passed
@braingram braingram deleted the no_namespaces branch December 16, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file no-changelog-entry-needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants