OneZoom / tree-build

Scripts for assembling the tree, metadata and downstream data products such as popularity and popular images
MIT License
1 stars 2 forks source link

Move oz_tree_build/tree_build/token_to_oz_tree_file_mapping.py to tree directory? #52

Open hyanwong opened 4 months ago

hyanwong commented 4 months ago

The file token_to_oz_tree_file_mapping.py is specific to the AllLife tree in data/OZTreeBuild/. So it probably belongs in data/OZTreeBuild/AllLife/?

davidebbo commented 4 months ago

Indeed, it would conceptually belong there. Though I worry that putting code in the data folder is a bit quirky. The import line from build_oz_tree.py currently looks like this (same folder import):

from .token_to_oz_tree_file_mapping import token_to_file_map

If it were in data/OZTreeBuild/AllLife/, we'd have to do some import gymnastic.

It's worth noting that this very concept of having those mappings may not be used outside of the main tree. e.g. for the extinct case based on wikipedia, hopefully we can stay away from having bespoke trees saved in the repo.

Long story short, while a bit quirky, this may not be worth changing at this time.