Skip to content

python packages: src layout & pure namespace packages#21977

Open
mr-c wants to merge 3 commits intogalaxyproject:devfrom
mr-c:pure_py_namespace_packages
Open

python packages: src layout & pure namespace packages#21977
mr-c wants to merge 3 commits intogalaxyproject:devfrom
mr-c:pure_py_namespace_packages

Conversation

@mr-c
Copy link
Contributor

@mr-c mr-c commented Mar 3, 2026

only directories in lib/galaxy & packages/*/src/galaxy
All other files removed or moved to their own module
All references to those files updated, especially galaxy/version.py

See #21938

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@mr-c mr-c force-pushed the pure_py_namespace_packages branch from 1f5a4ec to 648455c Compare March 3, 2026 18:00
@mr-c mr-c changed the title python packages: convert to pure namespace packages python packages: src layout & pure namespace packages Mar 3, 2026
@mr-c mr-c force-pushed the pure_py_namespace_packages branch 12 times, most recently from d7ea04e to c48c854 Compare March 10, 2026 16:32
@mr-c mr-c force-pushed the pure_py_namespace_packages branch 4 times, most recently from a463842 to a8d3f94 Compare March 12, 2026 17:28
@mr-c
Copy link
Contributor Author

mr-c commented Mar 13, 2026

It appears that the Selenium/Playwright tests are known-flaky.

  • lib/galaxy_test/selenium/test_admin_app.py::TestAdminApp::test_html_allowlist timed out?

remaining issue is the test disabled in 1380873

@mr-c mr-c marked this pull request as ready for review March 13, 2026 11:13
@github-actions github-actions bot added this to the 26.1 milestone Mar 13, 2026
@mr-c mr-c force-pushed the pure_py_namespace_packages branch from 1380873 to f6642e8 Compare March 13, 2026 12:27
@mr-c
Copy link
Contributor Author

mr-c commented Mar 13, 2026

local testing/review:

# from this PR
cd packages
SOURCE_DATE_EPOCH=1773409251 ./package-build-install.sh -b tool_shed
# SOURCE_DATE_EPOCH minimizes noise from time differences
find . -name "*.whl" -o -name "*.tar.gz" | grep dist | xargs -I{} cp {} ~/src/galaxyPR/new_pkgs/
# repeat for a checkout of the `dev` branch, but into the folder "new_pkgs"
diffoscope ~/src/galaxyPR/{old,new}_pkgs --html-dir ~/src/galaxyPR/pkg_report

Additions confirmed from all binary wheels and source distributions:

  1. package classifiers in their metadata
  2. many referenced non-Python files that were previously missing
  3. many entry point scripts that were previously missing

@mr-c mr-c force-pushed the pure_py_namespace_packages branch from f6642e8 to 91600c6 Compare March 13, 2026 16:49
mr-c added 3 commits March 13, 2026 19:26
only directories in `lib/galaxy` & `packages/*/galaxy`
All other files removed or moved to their own module
All references to those files updated, especially galaxy/version.py
As suggested at https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#native-namespace-packages

Use setuptools-scm to automatically adds all the SCM-managed files to the sdist
instead of manually listing them in packages/*/MANIFEST.in
@mr-c mr-c force-pushed the pure_py_namespace_packages branch from 91600c6 to 024d8ad Compare March 13, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

2 participants