Skip to content

rel: try to test v0.2.0#431

Draft
HaoZeke wants to merge 40 commits intometatensor:mainfrom
HaoZeke:test/metatensor-v0.2.0
Draft

rel: try to test v0.2.0#431
HaoZeke wants to merge 40 commits intometatensor:mainfrom
HaoZeke:test/metatensor-v0.2.0

Conversation

@HaoZeke
Copy link
Copy Markdown
Member

@HaoZeke HaoZeke commented Apr 8, 2026

........ WIP.

HaoZeke added 30 commits April 6, 2026 05:19
Rust changes:
- as_array() -> as_ndarray(), as_array_mut() -> as_ndarray_mut(),
  to_array_mut() -> to_ndarray_mut() across all source files
- move_samples_from -> move_data with mts_data_movement_t
- Array trait: removed data(), added device(), dtype(), as_dlpack()
- create() now takes fill_value: MtsArray parameter
- keys_to_samples/keys_to_properties now require fill_value argument
- Added dlpk dependency for DLPack types
- Cargo.toml points metatensor at git branch

C/C++ changes:
- calculator.cpp: rewrote all mts_labels_t usage for opaque API
  (mts_labels_create, mts_labels_dimensions, mts_labels_values, DLPack)
- helpers.cpp: updated empty_array vtable with device/dtype/create
- compute-soap.c, profiling.c: migrated data() -> as_dlpack,
  keys_to_samples/properties to new pointer-based labels API

tox.ini: metatensor deps point to labels-values-array-clean branch
… .into()

LabelValue changed from newtype to `type LabelValue = i32`.
- LabelValue::new(x) -> (x as i32)
- val.usize() -> val as usize
- val.i32() -> val (identity)
- usize_var.into() -> usize_var as i32
…ze to i32

- iter_fixed_size now yields [&i32; N], use & in destructuring patterns
- builder.add with usize args needs explicit as i32 cast
- .into() on usize/integer literals replaced with as i32 or _i32 suffix
- Fix all iter_fixed_size &i32 destructuring patterns
- Fix all builder.add usize->i32 casts
- Fix ArrayD -> ArcArray for TensorBlock::new (.into_shared())
- Fix remaining .into() and LabelValue::from() calls
- Fix range expressions with &i32
This reverts commit 4ad7260.
HaoZeke added 10 commits April 8, 2026 12:06
Removes the direct dlpk git dependency from Cargo.toml (which caused
cargo package to fail since dlpk has no crates.io version). Instead,
use metatensor's re-export of the dlpk crate.
Reverts tox.ini to loose version constraints. CI workflows clone
the labels-values-array-clean branch and pre-install metatensor
packages before running tox. Disables build-wheels (packaging
requires released metatensor).
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.

1 participant