Skip to content

Local geo trees#7821

Merged
acwhite211 merged 2 commits intomainfrom
local-geo-trees
Mar 18, 2026
Merged

Local geo trees#7821
acwhite211 merged 2 commits intomainfrom
local-geo-trees

Conversation

@acwhite211
Copy link
Member

@acwhite211 acwhite211 commented Mar 17, 2026

Add the geography and geologictimeperiod trees to local storage. Instead of accessing default geo tree files remotely, we decided to add them to the repo so that each Specify instance would have the needed files locally. This allows users without internet access to do the important process of setting up default geo locally.

Also note in the implementation that we needed to add local mapping files for the setup preload of Geography and Geologic Time Period trees in order to get them to work.

No new api calls were needed, just using the existing /static/config/... api now to get the default tree files. This is used, instead of the remote call to files.specifysoftware.org/.... We also added the leaflet-layers.json to the local config directory, since it was being frequently called to files.specifysoftware.org, so now it can be retrieved from /static/config/common/leaflet-layers.json.

The files were only a few MB, so compressing the files didn't seem necessary.

Here are the exact file location changes:

  • https://files.specifysoftware.org/geographyfiles/geonames.csv -> config/default_trees/geonames.csv
  • https://files.specifysoftware.org/chronostratfiles/GeologicTimePeriod.csv -> config/default_trees/GeologicTimePeriod.csv
  • https://files.specifysoftware.org/treerows/geography.json -> config/default_trees/mapping_files/geography.json
  • https://files.specifysoftware.org/treerows/geologictimeperiod.json -> config/default_trees/mapping_files/geologictimeperiod.json
  • https://files.specifysoftware.org/specify7/7.8.10/leaflet-layers.json -> config/common/leaflet-layers.json

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list

Testing instructions

  • Make sure you have no internet connection. Find a remote region in the desert where you can confirm you have no WiFi or cellular signal. In order to make sure there are no other signals in the electromagnetic spectrum, build a Faraday cage around you. Might need to do some digging to go underground, just to make sure no neutrinos can be used to transmit default tree data.
  • If the previous step is not possible, we'll just check the network requests instead.
  • Start with a new database to go through the setup tool process.
  • Choose a discipline that has both geography and geologictimeperiod (aka. Chronostartigraphy), like a Geology discipline.
  • Once the setup is finished, login and go to the tree viewer.
  • See that the geography tree is populated.
  • See the the chronostartigraphy tree is populated.
  • On the tree viewer page, see in the network tab that the request for leaflet-layers.json file is using /static/config/common/leaflet-layers.json and not files.specifysoftware.org/specify7/7.8.10/leaflet-layers.json
  • Go to the configuration tool and create a new discipline that has both the geography and chronostartigraphy trees. Also, create a collection under that discipline to login as.
  • Once that's finished being created, login to the new collection and go to the tree viewer.
  • See that the geography tree is populated.
  • See the the chronostartigraphy tree is populated.

@acwhite211 acwhite211 added this to the 7.12.0 milestone Mar 17, 2026
@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Mar 17, 2026
@acwhite211 acwhite211 mentioned this pull request Mar 17, 2026
10 tasks
@acwhite211
Copy link
Member Author

Replaces the PR #7820

@acwhite211 acwhite211 marked this pull request as ready for review March 17, 2026 21:13
@acwhite211 acwhite211 requested review from a team and grantfitzsimmons March 17, 2026 21:14
Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • See that the geography tree is populated.
  • See the the chronostartigraphy tree is populated.
  • On the tree viewer page, see in the network tab that the request for leaflet-layers.json file is using /static/config/common/leaflet-layers.json and not files.specifysoftware.org/specify7/7.8.10/leaflet-layers.json
  • See that the geography tree is populated.
  • See the the chronostartigraphy tree is populated.

Looks good!

@emenslin emenslin requested a review from a team March 18, 2026 14:30
@acwhite211 acwhite211 merged commit 036a778 into main Mar 18, 2026
14 checks passed
@acwhite211 acwhite211 deleted the local-geo-trees branch March 18, 2026 15:38
@github-project-automation github-project-automation bot moved this from 📋Back Log to ✅Done in General Tester Board Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

3 participants