Skip to content

Feat/python select#80

Merged
mathleur merged 12 commits intofeature/rustfrom
feat/python_select
Mar 17, 2026
Merged

Feat/python select#80
mathleur merged 12 commits intofeature/rustfrom
feat/python_select

Conversation

@mathleur
Copy link
Member

Description

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

Copy link

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 extends the Rust Qube functionality with dimension-removal utilities and exposes additional APIs in the Python bindings, including selection and introspection helpers.

Changes:

  • Added Qube::drop() (dimension splicing/removal) and Qube::squeeze() (drop dimensions with only one coordinate), plus Rust unit tests.
  • Added PyQube.select(), PyQube.all_unique_dim_coords(), and PyQube.compress() to the Python bindings.
  • Added Python tests for select, all_unique_dim_coords, and compress, and updated the arena JSON roundtrip test to match the current JSON envelope shape.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
qubed/src/qube.rs Adds dimension dropping/splicing (drop, squeeze) and associated Rust tests.
py_qubed/src/lib.rs Exposes new Python APIs (select, all_unique_dim_coords, compress) over the Rust core.
py_qubed/tests/test_select_api.py Adds pytest coverage for Python select and related APIs.
py_qubed/tests/test_qubed_api.py Updates JSON parsing expectations for to_arena_json() output shape.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mathleur and others added 7 commits March 17, 2026 14:48
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link

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 extends the core qubed functionality with dimension-removal utilities (drop/squeeze) and exposes the existing Rust select API to Python, aligning Python tests and coordinate parsing behavior with the ASCII “/-separated” coordinate format used across the codebase.

Changes:

  • Added Qube::drop() (dimension splicing) and Qube::squeeze() (drop dimensions with only one unique coordinate) plus Rust unit tests.
  • Fixed Coordinates::from_string() to split on / (matching to_string() and ASCII conventions).
  • Added Python bindings and tests for select, all_unique_dim_coords, compress, drop, and squeeze; updated arena JSON test expectations.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
qubed/src/qube.rs Implements drop/squeeze via subtree splicing + compression; adds unit tests.
qubed/src/coordinates/mod.rs Makes from_string parse /-separated coordinates to match serialization/ASCII.
py_qubed/src/lib.rs Adds Python-facing select, all_unique_dim_coords, compress, drop, squeeze bindings.
py_qubed/tests/test_select_api.py New pytest coverage for Python select/drop/squeeze/etc APIs.
py_qubed/tests/test_qubed_api.py Updates arena JSON test to expect {version, qube} object shape.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mathleur and others added 3 commits March 17, 2026 15:25
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mathleur mathleur merged commit cc8371e into feature/rust Mar 17, 2026
1 check failed
@mathleur mathleur deleted the feat/python_select branch March 17, 2026 14:27
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.

2 participants