-
Notifications
You must be signed in to change notification settings - Fork 40
Consolidate Setup Tool, Configuration Tool, and Preloaded Tree Creation #7674
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: main
Are you sure you want to change the base?
Conversation
Remove debug logging
* Add a new treeDefault import feature Fixes #6294 * Remove import * init create_default_trees_view * create_default_trees_view api change * add create_default_trees_view fixes * Add api to onClick fct * init create_default_trees_task * create_default_trees_task fix * bypass tree validation to speedup default tree upload * Lint code with ESLint and Prettier Triggered by d4d2c5d on branch refs/heads/issue-6294 * Lint code with ESLint and Prettier Triggered by 99d9de5 on branch refs/heads/issue-6294 * Lint code with ESLint and Prettier Triggered by 1b79f85 on branch refs/heads/issue-6294 * test * Lint code with ESLint and Prettier Triggered by 9f9994f on branch refs/heads/issue-6294 * Lint code with ESLint and Prettier Triggered by 832b665 on branch refs/heads/issue-6294 * Use frontend collection name * Lint code with ESLint and Prettier Triggered by 441d301 on branch refs/heads/issue-6294 * Add notification formatting to frontend * Update API schema and name * WIP Poll for tree creation progress * Add label to progress bar * Fix task error handling Refactor CSV url getting * Fix continous progress polling after errors * Generalize initial taxon tree creation code * Generalize add_default_taxon function * WIP Add Geography and GeologicTimePeriod schemas * Fix geography and geologictimeperiod mapping * Fix: Always get treedef by name * WIP retry failed rows * Improve readability * WIP accept row_count and mapping_url * Improve success notification * Add localization * Fetch tree mapping from url * Lint code with ESLint and Prettier Triggered by 85e43e5 on branch refs/heads/issue-6294 * Remove non-background execution * Fix provided colleciton name not being used * Add stop button * Lint code with ESLint and Prettier Triggered by 43368ed on branch refs/heads/issue-6294 * Fix task_id in notifications Add cancel button in default tree notification * Lint code with ESLint and Prettier Triggered by 7736f98 on branch refs/heads/issue-6294 * Use tree title as tree name * Lint code with ESLint and Prettier Triggered by d2f110d on branch refs/heads/issue-6294 * Add comments for lines_iter * Use tree mapping for rank count Accept mapping directly instead of just mappingUrl * Update tree rank debug logs * Get rank by column name * Add default isenforced and isinfullname values * WIP update tree mapping schema for rank config * Update rank mapping schema * Fix tree mapping * Fix rank in mapping schema * Add fullnameseparator to schema * Add "fullnameseparator" to schema * Add full name direction Remove print statements * Fix transaction * WIP Increase timeout * Fix automatic titles * Add root node names per tree Increase retries * Remove close button from Default Tree creation dialog Refactor * Lint code with ESLint and Prettier Triggered by 11a4d60 on branch refs/heads/issue-6294 * Simplify notifications Add back in close button to tree creation dialog. Add spacing between populated trees and empty trees * Close add tree dialog on progress dialog close * fix tests --------- Co-authored-by: alec_dev <acwhite211@gmail.com> Co-authored-by: alesan99 <alesanesp99@gmail.com> Co-authored-by: Grant Fitzsimmons <37256050+grantfitzsimmons@users.noreply.github.com>
* Create a configuration page * Start to adapt backend def for system config * Fix new discipline def * Reload page after addition * Remove parent id * Fetch data system after creation * Simplify and comment backend defs * Handle second call on backedn creation def * efetch all system data after addition * Simplify handle save * Remove comment from type * Lint code with ESLint and Prettier Triggered by 6f46015 on branch refs/heads/issue-6213-1 * Add webonly view for discipline and div * Feat: Add data check to define if geo is global & if tree def is present * Feat: Add geo tree config dialog * Fix: add handleSave * Feat: Add taxon and geo config dialog for disciplines * Fix: fix typos * Feat: add collapsible arrows * Feat: Add an edit option for each resource * Refactor: Break the system config tool in smaller component * Refactor: Exctract resource renderer * type * Import * Refactor: Extract add button * Fix type * Lint code with ESLint and Prettier Triggered by 7755ec2 on branch refs/heads/issue-6213-1 * Comment * Fix: Update all info for hierarchy onDelete and onSave * Feat: Allow to delete empty resources * Fix: typo in api * Fix: Typo * Lint code with ESLint and Prettier Triggered by 17d9759 on branch refs/heads/issue-6213-1 * Comment: Suggestion for userscopeid crash * Lint code with ESLint and Prettier Triggered by 9061ca6 on branch refs/heads/issue-6213-1 * Fix: Use new API to avoid UserGroupScopeId issues * Fix: tests * Fix: Improve spacing * Refactor: Remove unnecessary dialog * Feat: New icon for system config menu item * Fix: improve collections margins * Refactor: Remove imports * Lint code with ESLint and Prettier Triggered by 7794c7c on branch refs/heads/issue-6213-1 * fix: change chevron direction Matches the collapse direction elsewhere in the app * Lint code with ESLint and Prettier Triggered by d48352f on branch refs/heads/issue-6213-1 * [UI]: Add a backgrounf behind the hierarchy * Feat: Add tool list under ea ch resource * Fix: Chnage edit tool to a link * Fix: Add migrations for delete.CASCADE chnages * [UI]: Add height to container * [Fix]: Remove import and unused strings * Lint code with ESLint and Prettier Triggered by f94e933 on branch refs/heads/issue-6213-1 * fix: add hierarchy feat: add visual for table view When a change is made (delete or new), it also updates the visual immediately feat: add option to switch orientation fix: use schema captions instead fix: fix the inverted vertical/horizontal visual fix: make spacing more compact fix: put the hierarchy on the left and svg on the right feat: add color distinctions fix(accessibility): fix positioning * fix: sort out spacing and positioning * fix(tests): remove unused import * fix(localization): remove unused text * fix: form when selecting a block * fix: failing test * fix(colors): make custom colors important * Lint code with ESLint and Prettier Triggered by e7d943c on branch refs/heads/visual-hierarchy * fix: use correct forms * Lint code with ESLint and Prettier Triggered by 7360933 on branch refs/heads/visual-hierarchy * Lint code with ESLint and Prettier Triggered by 117c57c on branch refs/heads/issue-6213-1 * [Fix]: Add deletion cascade to preptype and cotype * [Fix]: Add casdace to COGtyp * [Fix]: Clear cache when deleting resources * fix: handle long names for hierarchy nodes * fix: key uniqueness and refresh process * Lint code with ESLint and Prettier Triggered by 7550b74 on branch refs/heads/issue-6213-1 * fix: reduce network requests * fix: update imports * Lint code with ESLint and Prettier Triggered by f5cb5ce on branch refs/heads/issue-6213-1 * fix(ux): make the institutional hierarchy fit the view * Lint code with ESLint and Prettier Triggered by 21a847d on branch refs/heads/issue-6213-1 * fix: change colors... I couldn't resist. * fix: missing colors * Lint code with ESLint and Prettier Triggered by 238af20 on branch refs/heads/issue-6213-1 * Lint code with ESLint and Prettier Triggered by a1e073b on branch refs/heads/issue-6213-1 * feat: add d3Zoom and improve sizing * fix: remove unused import and add typing * Lint code with ESLint and Prettier Triggered by 8b2a849 on branch refs/heads/issue-6213-1 * fix: update migration number * WIP fix: add cascade delete to remaining trees * Revert "WIP fix: add cascade delete to remaining trees" This reverts commit abcd291. --------- Co-authored-by: alec_dev <acwhite211@gmail.com> Co-authored-by: alesan99 <alesanesp99@gmail.com> Co-authored-by: Grant Fitzsimmons <37256050+grantfitzsimmons@users.noreply.github.com>
…ees import + guided setup (#7647) * Remove root node * Add rank field configuration to forms Fix nested objects in forms * Add a new treeDefault import feature Fixes #6294 * create_default_trees_task fix * Add label to progress bar * Lint code with ESLint and Prettier Triggered by 7736f98 on branch refs/heads/issue-6294 * fix tests * Update default files Update field names * WIP create trees using user's rank configuration * Fix storage tree default file * WIP Add default tree files for remaining trees * Fix default files * Fix applying user rank configuration * fix(trees): increase tectonicunit rankids * show province/state * WIP allow pre-loading trees * Create Geography tree on startup Refactor default tree importing * Preload taxon tree according to discipline type * Create empty default tree for new disciplines * Remove root from new taxon trees * Add button to import tree into an empty tree * fix tests * Don't create root if it already exists * Fix: Chnage full name separator to be a space * Remove pre-load taxon tree option Add collapsible tree rank sections Add separator to Geography tree Add description to pre-load tree option * Fix: Update localization * correct parent ranks when creating a new tree * Update tree defaults * Lint code with ESLint and Prettier Triggered by 29e0916 on branch refs/heads/issue-7593 * Rename setup tool tree functions * Update tree defaults * Remove taxon tree configuration Disable preload checkbox if there is no tree to preload Fix tests * Lint code with ESLint and Prettier Triggered by a45eb04 on branch refs/heads/issue-7593 * WIP use table for tree rank config * WIP add taxon tree selector * Enable pre-loading when selecting taxon tree * Fix tests * Fix tests * Lint code with ESLint and Prettier Triggered by ad19264 on branch refs/heads/issue-7593 * Fix labels Improve styling * Make table rounded * Fix table borders * [Guided Setup] Optimize default tree creation (#7669) * optimize tree creation * Fix duplication * Renumber tree and set full names * Lint code with ESLint and Prettier Triggered by cb60fbc on branch refs/heads/issue-7641-1 * Improve tree selector formatting Clean up backend code for trees in setup tool * Lint code with ESLint and Prettier Triggered by a75062b on branch refs/heads/issue-7593 * Fix tree preview in overview * Fallback to mammal tree if taxon tree has no default ranks * Fix UnboundLocalError * try supporting multiple tree config formats with _extract_levels * Update all tree default to use same schema --------- Co-authored-by: Caroline D <108160931+CarolineDenis@users.noreply.github.com> Co-authored-by: alec_dev <acwhite211@gmail.com> Co-authored-by: Grant Fitzsimmons <37256050+grantfitzsimmons@users.noreply.github.com>
Triggered by be389c3 on branch refs/heads/issue-2931-1
Triggered by fd7cb4b on branch refs/heads/issue-2931-1
Triggered by ae7e81c on branch refs/heads/issue-2931-2
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.
Starting with this, adding new reviews as I can:
4. Configuration Tool
Institution Tree Viewer
- Users can click and drag to view all nodes in the institution tree.
- Clicking a resource node opens the resource form.
- Users can:
- Edit a resource
- Create new resources
- Delete collections
When I create a new collection, discipline, or division by clicking + Add {level} under the appropriate parent, it fails:
specify7 | [29/Jan/2026 14:26:26] [ERROR] [django.request:246] Internal Server Error: /api/specify/division/
specify7 | Traceback (most recent call last):
specify7 | File "/opt/specify7/ve/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
specify7 | response = get_response(request)
specify7 | ^^^^^^^^^^^^^^^^^^^^^
specify7 | File "/opt/specify7/ve/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
specify7 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
specify7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
specify7 | File "/opt/specify7/specifyweb/specify/views.py", line 32, in wrapped
specify7 | return view(request, *args, **kwargs)
specify7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
specify7 | File "/opt/specify7/ve/lib/python3.12/site-packages/django/views/decorators/cache.py", line 40, in _cache_controlled
specify7 | response = viewfunc(request, *args, **kw)
specify7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
specify7 | File "/opt/specify7/specifyweb/specify/views.py", line 68, in view
specify7 | return dispatch_func(request, *args, **kwargs)
specify7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
specify7 | File "/opt/specify7/specifyweb/specify/api/dispatch.py", line 97, in collection_dispatch
specify7 | obj = post_resource(request.specify_collection,
specify7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
specify7 | File "/usr/lib/python3.12/contextlib.py", line 81, in inner
specify7 | return func(*args, **kwds)
specify7 | ^^^^^^^^^^^^^^^^^^^
specify7 | File "/opt/specify7/specifyweb/specify/api/crud.py", line 96, in post_resource
specify7 | obj = create_obj(collection, agent, name, data)
specify7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
specify7 | File "/opt/specify7/specifyweb/specify/api/crud.py", line 62, in create_obj
specify7 | result = CREATE_MODEL_REDIRECTS[model_name](normalize_keys(data))
specify7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
specify7 | File "/opt/specify7/specifyweb/backend/setup_tool/api.py", line 170, in create_division
specify7 | institution = resolve_uri_or_fallback(institution_url, None, Institution)
specify7 | ^^^^^^^^^^^^^^^^^^^^^^^
specify7 | NameError: name 'resolve_uri_or_fallback' is not defined
Specify 7 Crash Report - 2026-01-29T20_24_28.542Z.txt
Note that I am unable to delete an empty collection using this since it was made in 6 (it contains a autonumsch_coll link, which Specify 7 doesn't recognize as a data model table):
IntegrityError at /api/specify/collection/786433/ (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`specify`.`autonumsch_coll`, CONSTRAINT `FK46F04F2A8C2288BA` FOREIGN KEY (`CollectionID`) REFERENCES `collection` (`UserGroupScopeId`))')
- An empty configuration is created automatically for new disciplines.
- Users can collapse and expand sections in the left panel.
- Users can switch between vertical and horizontal views in the institution tree viewer.
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.
1. Setup Flow
Setup Forms
- All setup forms must display correctly in both light mode and dark mode (based on system settings).
- Users can only progress to the next form once all required fields are completed.
- User selections must be reflected in the Overview sidebar in real time.
- The setup flow must be submittable at the end.
I can't proceed with the database creation:
specify7 | [29/Jan/2026 14:43:59] [DEBUG] [specifyweb.backend.setup_tool.api:112] Starting Database Setup.
specify7 | [29/Jan/2026 14:43:59] [ERROR] [specifyweb.backend.setup_tool.api:124] name 'normalize_keys' is not defined
specify7 | Traceback (most recent call last):
specify7 | File "/opt/specify7/specifyweb/backend/setup_tool/api.py", line 114, in setup_database
specify7 | data = normalize_keys(raw_data)
specify7 | ^^^^^^^^^^^^^^
specify7 | NameError: name 'normalize_keys' is not defined
specify7 | [29/Jan/2026 14:43:59] [ERROR] [django.request:246] Internal Server Error: /setup_tool/setup_database/create/
There are also some strange issues:
-
You can have a rank that isn't included as "enforced". If it isn't included, it should prevent the user from choosing any other option:

-
The "Tree Ranks" heading shows twice, once in the table and once above the table.
- Users must be able to log into the database after setup completes.
Fixes #7673
See issue description
(Cloned from #6671)