Context
DatasetCollection's in-memory template factory was named create_cube, which (a) uses the outdated "cube" term for a
class now called DatasetCollection, and (b) sits apart from the from_* reader family (from_files, from_stac,
from_zarr, from_point, from_archive). Its first parameter was the generic src.
Problem / Current Behaviour
DatasetCollection.create_cube(src, time_length) is inconsistent with every other constructor and easy to confuse with
Dataset.create (a different classmethod).
Affected locations
| File |
Symbol |
Notes |
src/pyramids/dataset/collection.py |
DatasetCollection.create_cube |
rename to from_dataset; src -> dataset |
tests, docs/pyramids.drawio, tutorials |
call sites |
update to the new name |
Proposed Solution
DatasetCollection.from_dataset(dataset: Dataset, time_length: int) -> DatasetCollection
Hard rename (no deprecation alias); Dataset.create is untouched.
Out of Scope
Any behavioural change to the in-memory scaffold; only the name/param.
Effort Estimate
Size: XS — mechanical rename + call-site sweep.
Definition of Done
Implemented in PR #951.
Context
DatasetCollection's in-memory template factory was namedcreate_cube, which (a) uses the outdated "cube" term for aclass now called
DatasetCollection, and (b) sits apart from thefrom_*reader family (from_files,from_stac,from_zarr,from_point,from_archive). Its first parameter was the genericsrc.Problem / Current Behaviour
DatasetCollection.create_cube(src, time_length)is inconsistent with every other constructor and easy to confuse withDataset.create(a different classmethod).Affected locations
src/pyramids/dataset/collection.pyDatasetCollection.create_cubefrom_dataset;src->datasetdocs/pyramids.drawio, tutorialsProposed Solution
Hard rename (no deprecation alias);
Dataset.createis untouched.Out of Scope
Any behavioural change to the in-memory scaffold; only the name/param.
Effort Estimate
Size:
XS— mechanical rename + call-site sweep.Definition of Done
create_cuberenamed tofrom_dataset,src->datasetImplemented in PR #951.