You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Port to the plain-string trait profiles from mlwp-data-specs#42 #51
mlwp-tools/mlwp-data-specs#42 replaced the Space, Time and Uncertainty enums with classes whose members are plain strings. Time.FORECAST is now the str"forecast". The classes can't be called, and their members have no .value, so mxalign fails wherever it does either.
refactor/alignment (1eb4d7f) with mlwp-data-specs at
The failures come from Time() takes no arguments, Space() takes no arguments and 'str' object has no attribute 'value'.
CI doesn't show this because [tool.uv.sources] pins mlwp-data-specs to 059f382. It appears in a dev environment with a local mlwp-data-specs checkout on main, and it will appear at the next pin bump.
main is affected too, but less: its 3 tests pass because they don't reach update_*_trait, which still calls new_trait.value.
What needs changing
On refactor/alignment:
Location
Now
Change
src/mxalign/accessor/mx.py:75
Space(self._trait(SPACE_TRAIT_ATTR))
Return the attribute value, after checking it
src/mxalign/accessor/mx.py:91
Time(self._trait(TIME_TRAIT_ATTR))
Same
src/mxalign/alignment/time.py:307
Time.OBSERVATION.value
Time.OBSERVATION
src/mxalign/alignment/time.py:382
Time.FORECAST.value
Time.FORECAST
src/mxalign/utils/traits.py:46, 69, 92
new_trait.value
new_trait
On main, the traits.py lines are 24, 30 and 36.
Space(value) and Time(value) also raised ValueError on an unknown value, so the accessors need an explicit check to keep that, for example:
Activity