Skip to content

Improve Deprecation Path for Data-Paths #370

@popescu-v

Description

@popescu-v

Description

Currently, a deprecation path for old-style data-paths (X`Y) is provided, but it is solely based on the presence of the ` character inside the path provided by the user and it only applies to the DictionaryDomain.get_dictionary_at_data_path method.

However, the ` character can still be used in the new-style data paths, as an escapement character for the new-style data path delimiter / when used in table names; or it can be doubly escaped when used in a table name, e.g. MyFirstTable/My``SecondTable.

Hence, we need to ramp-up the data-path deprecation support.

More precisely, there are two sides of this:

  • detection of the old-style data path; criteria:
    • data path contains `;
    • and data path starts with (the first element, after split on ` is):
      • [in DictionaryDomain.get_dictionary_at_data_path]: an existing dictionary name (in [dictionary.name for dictionary in my_domain.dictionaries])
      • [in the Core API methods / additional_data_tables]: the name of the current dictionary (i.e. dictionary_name, or train_dictionary_name).
  • substitution of the old-style data path with the new-style data path, in the Core API methods / additional_data_tables:
    • split on `;
    • if the first element is the current dictionary (dictionary_name / train_dictionary_name), delete it;
    • else, assume external table, whence prefix the path with /; Not done in the current beta.
    • replace the remaining `s with /s.

Metadata

Metadata

Assignees

Labels

Priority/0-HighTo do nowSize/DaysSome days of workStatus/DoneThe issue has been addressed and merged to the dev branch

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions