Skip to content

moving python contents around#662

Merged
K20shores merged 8 commits intomainfrom
650-update-python-packaging
Oct 23, 2025
Merged

moving python contents around#662
K20shores merged 8 commits intomainfrom
650-update-python-packaging

Conversation

@K20shores
Copy link
Copy Markdown
Collaborator

@K20shores K20shores commented Oct 22, 2025

closes #650

  • moves the tests and bindings out of python/musica
    • This means we only package up the python code and addresses one of the warning pypi emails us about
  • An integrity check is added to the python actions to ensure this doesn't happen again
  • Fixes a test failing only on macos-latest with python 3.9 by moving the matplotlib import into the function that needs it, which isn't run as part of the test anyway

@K20shores K20shores linked an issue Oct 22, 2025 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown
Contributor

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.24%. Comparing base (2f59d9b) to head (b5d5c21).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #662   +/-   ##
=======================================
  Coverage   78.24%   78.24%           
=======================================
  Files          54       54           
  Lines        6857     6857           
=======================================
  Hits         5365     5365           
  Misses       1492     1492           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@K20shores K20shores marked this pull request as ready for review October 23, 2025 14:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR restructures the Python package by moving tests and bindings outside of the python/musica directory to ensure only Python source code is packaged. This addresses PyPI packaging warnings and includes an integrity check to prevent future violations.

  • Relocates test files and bindings from python/musica to sibling directories
  • Updates CMake configuration to reflect new directory structure
  • Adds wheel integrity validation to CI pipeline

Reviewed Changes

Copilot reviewed 8 out of 45 changed files in this pull request and generated no comments.

Show a summary per file
File Description
python/test/unit/test_parser.py Updates test file paths to reflect relocated test examples
python/musica/examples/sulfate_box_model.py Moves matplotlib import into function scope to fix macOS Python 3.9 test failure
python/musica/CMakeLists.txt Removes CMake configuration (file deleted)
python/bindings/CMakeLists.txt Adds setup_musica_target include and PY_MODULES definition previously in musica/CMakeLists.txt
python/CMakeLists.txt Updates to reference bindings subdirectory instead of musica
pyproject.toml Updates dependencies, build scripts paths, and supported Python versions
.github/workflows/python-wheels.yml Adds wheel RECORD integrity validation step
.github/workflows/python-tests.yml Updates repair_wheel_windows.sh script path

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@K20shores
Copy link
Copy Markdown
Collaborator Author

@boulderdaze do you have a preference for folder names?

Our current structure with this PR is this

Top level has src, javascript c++ code is in javascript/src, but python is python/bindings.

:: tree -L1 src javascript python 
src
├── carma
├── CMakeLists.txt
├── component_versions.cpp
├── micm
├── packaging
├── test
├── tuvx
├── util.cpp
└── version.cpp.in
javascript
├── CMakeLists.txt
└── src
python
├── bindings
├── CMakeLists.txt
├── musica
├── test
└── tools

@boulderdaze
Copy link
Copy Markdown
Collaborator

@boulderdaze do you have a preference for folder names?

Our current structure with this PR is this

Top level has src, javascript c++ code is in javascript/src, but python is python/bindings.

:: tree -L1 src javascript python 
src
├── carma
├── CMakeLists.txt
├── component_versions.cpp
├── micm
├── packaging
├── test
├── tuvx
├── util.cpp
└── version.cpp.in
javascript
├── CMakeLists.txt
└── src
python
├── bindings
├── CMakeLists.txt
├── musica
├── test
└── tools

The code in the bindings directory does binding work, so I think it’s more explicit and clear to keep it named that way. It reflects what the code does.
I’m not entirely sure I understand your question. Are you suggesting using python/src/bindings, or changing bindings to src? If it’s the first option, that’s fine with me. But if it’s the second, I think we should keep the bindings name unless we plan to rename all the files to include binding.

@K20shores
Copy link
Copy Markdown
Collaborator Author

@boulderdaze do you have a preference for folder names?
Our current structure with this PR is this
Top level has src, javascript c++ code is in javascript/src, but python is python/bindings.

:: tree -L1 src javascript python 
src
├── carma
├── CMakeLists.txt
├── component_versions.cpp
├── micm
├── packaging
├── test
├── tuvx
├── util.cpp
└── version.cpp.in
javascript
├── CMakeLists.txt
└── src
python
├── bindings
├── CMakeLists.txt
├── musica
├── test
└── tools

The code in the bindings directory does binding work, so I think it’s more explicit and clear to keep it named that way. It reflects what the code does. I’m not entirely sure I understand your question. Are you suggesting using python/src/bindings, or changing bindings to src? If it’s the first option, that’s fine with me. But if it’s the second, I think we should keep the bindings name unless we plan to rename all the files to include binding.

It would be to rename bindings to src. I agree that the name bindings is clear, it's just different to what we have in javascript. We can have the A&M students rename that folder to bindings to make it clear

@K20shores K20shores merged commit 71339a0 into main Oct 23, 2025
84 checks passed
@K20shores K20shores deleted the 650-update-python-packaging branch October 23, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update python packaging

4 participants