Loading CHANGELOG +3 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added - to_feather and from_feather method overwrites to DMT.DataFrame ### Fixed - hidden bug in naming.get_specifier_from_string when a specifier is repeated in a non-convertable string ## [2.1.0] - 2024.05.16 This is an overall update release for DMT-core. The package has been enhanced on all ends. Loading DMT/core/naming.py +3 −3 Original line number Diff line number Diff line Loading @@ -1030,12 +1030,12 @@ def get_specifier_from_string(string, nodes=None): ) # test if everything is inside the new specifier rest = string.replace(str(specifier_in_string), "") rest = string.replace(str(specifier_in_string), "", 1) if nodes_in_string: rest = rest.replace("_" + "".join(nodes_in_string), "") rest = rest.replace("_" + "".join(nodes_in_string), "", 1) if sub_specifiers_in_string: for sub_spec in sub_specifiers_in_string: rest = rest.replace("|" + sub_spec, "") rest = rest.replace("|" + sub_spec, "", 1) if rest: return string Loading test/test_core_no_interfaces/test_specifiers.py +4 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,10 @@ def test_specifier_from_string(): assert isinstance(SpecifierStr.string_from_load("FREQ"), str) assert not isinstance(SpecifierStr.string_from_load("FREQ"), SpecifierStr) # hidden bug in specifier autoconversion when specifier is repeated assert isinstance(get_specifier_from_string("VV"), str) assert not isinstance(get_specifier_from_string("VV"), SpecifierStr) def column_save_load(): a = DataFrame({SpecifierStr("V", "B"): [1]}) Loading Loading
CHANGELOG +3 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added - to_feather and from_feather method overwrites to DMT.DataFrame ### Fixed - hidden bug in naming.get_specifier_from_string when a specifier is repeated in a non-convertable string ## [2.1.0] - 2024.05.16 This is an overall update release for DMT-core. The package has been enhanced on all ends. Loading
DMT/core/naming.py +3 −3 Original line number Diff line number Diff line Loading @@ -1030,12 +1030,12 @@ def get_specifier_from_string(string, nodes=None): ) # test if everything is inside the new specifier rest = string.replace(str(specifier_in_string), "") rest = string.replace(str(specifier_in_string), "", 1) if nodes_in_string: rest = rest.replace("_" + "".join(nodes_in_string), "") rest = rest.replace("_" + "".join(nodes_in_string), "", 1) if sub_specifiers_in_string: for sub_spec in sub_specifiers_in_string: rest = rest.replace("|" + sub_spec, "") rest = rest.replace("|" + sub_spec, "", 1) if rest: return string Loading
test/test_core_no_interfaces/test_specifiers.py +4 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,10 @@ def test_specifier_from_string(): assert isinstance(SpecifierStr.string_from_load("FREQ"), str) assert not isinstance(SpecifierStr.string_from_load("FREQ"), SpecifierStr) # hidden bug in specifier autoconversion when specifier is repeated assert isinstance(get_specifier_from_string("VV"), str) assert not isinstance(get_specifier_from_string("VV"), SpecifierStr) def column_save_load(): a = DataFrame({SpecifierStr("V", "B"): [1]}) Loading