-
Notifications
You must be signed in to change notification settings - Fork 40
[Guided Setup] Add configuration for default trees in guided setup #7647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: issue-2931-1
Are you sure you want to change the base?
Conversation
|
Preloading Taxon trees seems to generally work for me but sometimes if you edit the defaults the tree won't upload. I also ran into an issue where I preloaded the botany tree and all ranks uploaded are checked as enforced, but when uploaded there's no node in the phylum which causes an error for the node in the Class rank. 01-16_12.24.mp4Also I have just a few concerns with the preloading taxon trees in general. First, if we do not have the taxon defaults for a discipline can we remove the preload tree checkbox? I feel like making it appear like a tree can be preloaded and then nothing happens could be very confusing. Second, as I said above sometimes when editing the taxon tree setup and then checking preload tree it doesn't upload even for a tree that has defaults. I think it might have to do with either checking enforced for ranks that aren't a part of the defaults or with removing ranks that are included in the defaults, but I am not sure which. I think we need to find someway either for the tree to upload anyway or to prevent the user from continuing if the tree isn't going to upload. I am not sure what the best solution here is but I think something needs to be done so the user won't be led to believe a tree will be preloaded if it's not going to be. |
Yes, that should not be present if the user will end up needing to populate it after the discipline is created.
@CarolineDenis has changed the work plan for this feature, so for now I think that option will be removed. It will be handled in the fix for #7641. For now the user will have to go to the taxon tree viewer to populate it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing with the Geology and Botany databases...
- Configure ranks for the geography and taxon trees.
- Modifications to ranks applied correctly
- After the setup, make sure the default tree creation process started for the trees you selected to pre-load. (You will see notifications)
- Verified in notifications, however Taxon did not pre-load a tree (Geography, Storage, and Chronostrat did pre-load)
- If you chose a paleo/geo database then a chronostrat tree should also be imported automatically.
- Verified with Geology database
- If you chose to -not- pre-load the taxon tree, the taxon tree that was created should not have a root node.
- After the setup, check all the new trees, make sure the ranks respect your configuration.
- Creating a new discipline with the configuration tool should create an empty taxon tree.
- An empty taxon tree should have an import button
- Make sure you can import a taxon tree into the existing empty tree
- Make sure you can still create a new populated tree
Add collapsible tree rank sections Add separator to Geography tree Add description to pre-load tree option
As @grantfitzsimmons mentioned I have now hidden the option to pre-load the taxon tree.
Note from discussion: this might be because its still being created
I believe this is because of the schema config creation, which would be solved by this: #7615 |
acwhite211
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Barring the known issues and front-end unit tests, the setup tool is functioning as expected.
- Configure ranks for the geography and taxon trees.
- Test the new pre-load tree check box for geography and taxon trees.
- After the setup, make sure the default tree creation process started for the trees you selected to pre-load. (You will see notifications)
- If you chose a paleo/geo database then a chronostrat tree should also be imported automatically.
- Note: A taxon tree will only be preloaded if defaults exist. If there exists no default tree, it will do nothing.
- If you chose to -not- pre-load the taxon tree, the taxon tree that was created should not have a root node.
- After the setup, check all the new trees, make sure the ranks respect your configuration.
- Configuration tool and existing trees
- Creating a new discipline with the configuration tool should create an empty taxon tree.
- An empty taxon tree should have an import button
- Make sure you can import a taxon tree into the existing empty tree
- Make sure you can still create a new populated tree
I noticed that there are now two “default tree” creation implementations now:
- backend/setup_tool/tree_defaults.py has create_default_tree() and a TODO “Preload tree: pass”
- backend/trees/utils.py adds initialize_default_tree()
We could maybe write some functions for their shared functionality, but not something I want to hold this release up for.
|
The following simplifications have been implemented:
@emenslin With these changes all your issues should have been addressed (aside from trees randomly not preloading, haven't recreated that yet so hopefully its fixed)
@acwhite211 Yeah I agree its kind of bad. I renamed the setup tool-specific ones to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Test with the setup page
- Use a blank database
- Pre-load all the trees you can and complete the setup
- Make sure the trees were pre-loaded correctly.
- Test in the taxon tree viewer
- Add a new taxon tree and choose to import a populated one.
- Make sure the tree was created correctly. An easy way to check is to compare it with the same tree created before the speed ups.
- Configure ranks for the geography.
- Test the new pre-load tree check box for geography and taxon trees.
I find it unintuitive that the tree configuration options are hidden behind a collapsed element that is just called "Details". For a user, what are these details of?
I would much prefer this where we display it as a table (concept):
- The pre-load checkbox for taxon trees should only be enabled if your discipline has a default tree (EX: Mammalogy has one, Geology doesn't).
Note, Botany doesn't have 'Phylum' or 'Subphylum', this is supposed to be 'Division' and 'Subdivision'. Despite this, the default tree ranks show this:
Using the 'Pre-load Tree' checkbox leaves some issues here:
-
The user does not know what the source of these defaults are. This is important for many disciplines (Botany and Entomology, for example) where the focus can be radically different depending on the work being done in the collection. This is not enough.
-
The ranks need to match those that make sense for the discipline. Bizarrely, we've already solved this problem per discipline, but we are not using those definitions. See here:
specify7/config/botany/taxon_botany_tree.json
Lines 23 to 32 in 5f5f386
"name": "Division", "enforced": true, "infullname": false, "rank": 30 }, { "name": "Subdivision", "enforced": false, "infullname": false, "rank": 40 -
"Pre-loading" (which I would prefer to be named "Populate with default taxonomy" or something much more intuitive) here fails as it doesn't recognize Phylum, therefore it completely skips populating that rank. There simply isn't any information now in the 'Phylum' rank despite there being data in the defaults.
After trying to run the build on a new Botany discipline and collection, I see this:
MissingSchema("Invalid URL 'None': No scheme supplied. Perhaps you meant https://None?")
Checking or unchecking "Pre-load Tree" makes no difference here.
Also problematic, we are not handling the case where
- There are multiple default trees for a single discipline (provided by CoL or WoRMs, for example)
- The default trees have ranks that are not included in the definition the user can customize

Fixes #7593, #7641
Changes:
Checklist
self-explanatory (or properly documented)
Testing instructions