taxonomy-editor
taxonomy-editor copied to clipboard
Refactor code to use a label and a path for taxonomies
Currently we have TAXONOMY_NAMES in constants.ts that list name without associating them with a path of the taxonomy.
And then in utils.py taxonomy_path_in_repository we use a hack to add the / at the right place.
This is ugly !
Associate TAXONOMY_NAMES with a path, and use this path in the API to specify the taxonomy location.
Also the available taxonomies (path and names) should be an API. And the list should be configurable.
@alexgarel Do you think we might need to store available taxonomies that can be edited in Neo4j? The frontend can probably fetch from it, and and the corresponding taxonomy paths can also be stored in the db.
@aadarsh-ram I would say that right now this is more like a configuration, so having the list in the code is better.