Consolidate Setup Tool, Configuration Tool, and Preloaded Tree Creation#7674
Consolidate Setup Tool, Configuration Tool, and Preloaded Tree Creation#7674CarolineDenis wants to merge 330 commits intomainfrom
Conversation
…to issue-2931-1
Triggered by 2054b7d on branch refs/heads/issue-2931-1
…to issue-2931-1
Triggered by 2f77e8f on branch refs/heads/issue-2931-1
…to issue-2931-1
…to issue-2931-1
Triggered by 9a9ead3 on branch refs/heads/issue-2931-1
…to issue-2931-1
Triggered by 8042f69 on branch refs/heads/issue-2931-1
…to issue-2931-1
Fix setup task errors
fix(defaults): add geology and cleanup defaults
kwhuber
left a comment
There was a problem hiding this comment.
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.
- Users must be able to log into the database after setup completes.
Default Data & Configuration
- Default schema configuration captions and descriptions must be populated (not blank).
- Default picklists must be created correctly.
- Note: The Agent Type picklist does not exist in the schema config, this is expected.
- Default preparation types must be created correctly.
- All tree viewer pages must load without errors.
- The admin user’s agent must be created correctly and must always include a last name.
- An empty Global Preferences file must be created in App Resources.
2. Tree Configuration During Setup
Storage Tree
- Users must be able to modify the storage tree configuration during setup.
- Changes must be correctly reflected in the application after setup.
Geography Tree
- Users must be able to modify the geography tree configuration during setup.
- [] Both options must work:
Preloaded tree
Empty tree
After switching between preloading a not preloading a few times locally, I noticed that when I did select preload, I had to wait a few minutes and refresh my page before it loaded successfully. I believe on the first iteration it was already loaded when I clicked into the tree.
Taxon Tree
- Users must be able to select a preloaded default tree when one exists.
- The selected tree must be correctly preloaded and visible when the app opens.
Similar to the Geography tree, I had load issues with Taxon. I had to wait and refresh to eventually get it to load after multiple guided setup iterations.
Geology Discipline
- Relevant tectonic and chronostratigraphic (chrono) trees must be created automatically.
3. Tree Viewer: Preloaded & Empty Trees
- Users can create an empty tree from the tree viewer.
- Users can modify rank configuration in the tree viewer.
- Users can create a preloaded tree from the tree viewer.
- Empty trees now have an upload button. The Upload Tree icon under root creation must work as expected.
- Users can delete a rank with no associated nodes.
- If ranks are deleted and a tree is then loaded, the tree configuration must be respected.
- Users receive notifications for:
Tree creation start
Successful completion
Errors or cancellation
Minor comment: Even though it is obvious, it might be helpful to indicate which tree got cancelled for verification. In the screenshot, I cancelled the creation of a Fungi tree but that is not explicitly declared.

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 (created in 7)
Upon deletion of a collection, I received the following error:
Details
Environment:Request Method: GET
Request URL: http://localhost/specify/
Django Version: 4.2.27
Python Version: 3.12.3
Installed Applications:
('django.contrib.sessions',
'django.contrib.staticfiles',
'django.contrib.contenttypes',
'django.contrib.auth',
'specifyweb.specify',
'specifyweb.backend.permissions',
'specifyweb.backend.accounts',
'specifyweb.backend.stored_queries',
'specifyweb.backend.businessrules',
'specifyweb.backend.express_search',
'specifyweb.backend.context',
'specifyweb.backend.attachment_gw',
'specifyweb.frontend',
'specifyweb.backend.barvis',
'specifyweb.backend.patches',
'specifyweb.backend.report_runner',
'specifyweb.backend.interactions',
'specifyweb.backend.workbench',
'specifyweb.backend.notifications',
'specifyweb.backend.export',
'specifyweb.backend.setup_tool',
'specifyweb.backend.raven_placeholder',
'specifyweb.backend.stats',
'specifyweb.backend.inheritance',
'specifyweb.backend.trees',
'specifyweb.backend.backup_tool',
'specifyweb.backend.merge',
'specifyweb.backend.locality_update_tool',
'specifyweb.backend.bulk_copy',
'specifyweb.backend.series',
'specifyweb.backend.delete_blockers',
'specifyweb.backend.table_rows')
Installed Middleware:
['django.middleware.gzip.GZipMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'specifyweb.backend.context.middleware.ContextMiddleware',
'specifyweb.backend.permissions.middleware.PermissionsMiddleware',
'specifyweb.middleware.general.GeneralMiddleware']
Traceback (most recent call last):
File "/opt/specify7/ve/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/specify7/ve/lib/python3.12/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = middleware_method(
File "/opt/specify7/specifyweb/backend/permissions/middleware.py", line 20, in process_view
if not skip_collection_access_check and user != None and col != None:
^^^^^^^^^^^
File "/opt/specify7/ve/lib/python3.12/site-packages/django/utils/functional.py", line 266, in inner
self._setup()
^^^^^^^^^^^^^
File "/opt/specify7/ve/lib/python3.12/site-packages/django/utils/functional.py", line 419, in _setup
self._wrapped = self._setupfunc()
^^^^^^^^^^^^^^^^^
File "/opt/specify7/specifyweb/backend/context/middleware.py", line 57, in
request.specify_collection = SimpleLazyObject(lambda: get_cached('_cached_collection', get_collection, request))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/specify7/specifyweb/backend/context/middleware.py", line 15, in get_cached
setattr(request, attr, func(request))
^^^^^^^^^^^^^
File "/opt/specify7/specifyweb/backend/context/middleware.py", line 36, in get_collection
return qs.get(id=collection_id)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/specify7/ve/lib/python3.12/site-packages/django/db/models/query.py", line 639, in get
raise self.model.DoesNotExist(
^
Exception Type: DoesNotExist at /specify/
Exception Value: Collection matching query does not exist.
- Users can collapse and expand sections in the left panel.
- Users can switch between vertical and horizontal views in the institution tree viewer.
|
@grantfitzsimmons
I haven't been able to recreate this, if its not varying times from downloading trees of different sizes then it may be a worker-related issue. I'll try to investigate if this keeps on happening.
For technical reasons adding the name would complicate the implementation of the cancel button (The only identifying feature of the background task is its id). If time permits I may be able to fix this.
It looks like collection deletion is a little too easy. Some restrictions were removed to allow deleting empty collections in the Configuration Tool PR, we perhaps need to discuss how to add back in some guard rails |

Fixes #7673
See issue description
(Cloned from #6671)