Skip to content

Update packaging practices#83

Merged
banesullivan merged 7 commits intomainfrom
maint/packaging
Feb 18, 2026
Merged

Update packaging practices#83
banesullivan merged 7 commits intomainfrom
maint/packaging

Conversation

@banesullivan
Copy link
Member

@banesullivan banesullivan commented Feb 17, 2026

Also fixes a bug/testing issue with Pandas 3.0, which enables copy-on-write by default. This is a breaking change where:

pd.Index() (the constructor) now copies numpy arrays by default instead of sharing memory
xarray uses pandas.Index internally for dimension coordinates (coordinates whose name matches their sole dimension, like z in coords={'z': (['z'], z_array)})
This broke the memory sharing chain: original numpy array → xarray (via pandas Index) → pvxarray → VTK/PyVista
The key distinction: non-dimension coordinates (like lon: (['x'], lon_array) where the coord name "lon" differs from the dimension name "x") are NOT stored in a pandas Index, so they still share memory.

Fix
Updated the shared memory tests to verify zero-copy between what xarray provides (da["coord"].values) and the PyVista mesh (which pvxarray controls), rather than between the original numpy array and the mesh (which depends on pandas internal behavior).

This properly validates that pvxarray doesn't introduce any copies in the xarray → VTK/PyVista chain, while accepting that pandas 3.0's Index behavior is outside pvxarray's control.

@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.77%. Comparing base (abd1111) to head (2575f1b).

Files with missing lines Patch % Lines
pvxarray/points.py 0.00% 3 Missing ⚠️
pvxarray/_version.py 0.00% 2 Missing ⚠️
pvxarray/accessor.py 50.00% 2 Missing ⚠️
pvxarray/io.py 50.00% 2 Missing ⚠️
pvxarray/vtk_source.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
+ Coverage   43.09%   43.77%   +0.68%     
==========================================
  Files          11       11              
  Lines         478      466      -12     
==========================================
- Hits          206      204       -2     
+ Misses        272      262      -10     

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

@banesullivan banesullivan merged commit bc1bb8a into main Feb 18, 2026
6 checks passed
@banesullivan banesullivan deleted the maint/packaging branch February 18, 2026 18:12
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

Comments