-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Issue
CSVSampleStore has had two fields ("constitutivePropertyColumns", "propertyMap") deprecated for a while, and an upgrade path is in place until version 1.6.0:
ado/orchestrator/core/samplestore/csv.py
Lines 99 to 141 in 03f9f99
| @pydantic.model_validator(mode="before") | |
| @classmethod | |
| def migrate_old_format(cls, data: dict) -> dict: | |
| """Migrate old CSVSampleStoreDescription format to new format | |
| Old format (the only one stored before these changes): | |
| - constitutivePropertyColumns at top level (list) | |
| - experiments list with propertyMap (not observedPropertyMap) | |
| - No constitutivePropertyMap in experiment descriptions | |
| Migration: | |
| - Remove constitutivePropertyColumns from top level | |
| - For each experiment desc dict, add constitutivePropertyMap = constitutivePropertyColumns | |
| - For each experiment desc dict, rename propertyMap to observedPropertyMap | |
| """ | |
| if not isinstance(data, dict): | |
| return data | |
| # Check if this is old format (has constitutivePropertyColumns at top level) | |
| if "constitutivePropertyColumns" not in data: | |
| return data | |
| # Old format detected - emit warning and perform migration | |
| warn_deprecated_csv_sample_store_model_in_use( | |
| deprecated_from_version="1.3.5", | |
| removed_from_version="1.6.0", | |
| deprecated_fields=["constitutivePropertyColumns", "propertyMap"], | |
| ) | |
| constitutive_columns = data.pop("constitutivePropertyColumns") | |
| # Migrate experiments if present | |
| if "experiments" in data and isinstance(data["experiments"], list): | |
| for exp in data["experiments"]: | |
| if isinstance(exp, dict): | |
| # Rename propertyMap to observedPropertyMap | |
| if "propertyMap" in exp: | |
| exp["observedPropertyMap"] = exp.pop("propertyMap") | |
| # Add constitutivePropertyMap from top-level constitutivePropertyColumns | |
| exp["constitutivePropertyMap"] = constitutive_columns | |
| return data |
At the same time, however, some examples YAMLs and some markdown files reference these old keys. Given that the next version will be 1.6.0, we should make sure these are updated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working