[Fixes #13512] Create a task that loads required thesauri automatically#14187
[Fixes #13512] Create a task that loads required thesauri automatically#14187Copilot wants to merge 5 commits into
Conversation
…s.py, and entrypoint call Agent-Logs-Url: https://github.com/GeoNode/geonode/sessions/9a26ad60-2d0f-4255-861e-2bd45a3dee10 Co-authored-by: etj <717359+etj@users.noreply.github.com>
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Copilot on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
…ri loading Agent-Logs-Url: https://github.com/GeoNode/geonode/sessions/50827a39-23e0-47b0-9269-7c87c0ed4434 Co-authored-by: etj <717359+etj@users.noreply.github.com>
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @copilot on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
Agent-Logs-Url: https://github.com/GeoNode/geonode/sessions/ca967273-78e4-4330-b1ee-7b10f8f774d9 Co-authored-by: etj <717359+etj@users.noreply.github.com>
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @copilot on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @copilot on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
There was a problem hiding this comment.
Pull request overview
Adds a new thesaurus autoload subcommand and wires it into Docker boot so thesauri shipped by installed apps (via thesauri/*.rdf) are automatically loaded/updated at startup.
Changes:
- Introduces
thesaurus autoloadto discoverthesauri/*.rdfunder installed Django apps and load them with an idempotent update action. - Extends thesaurus loading to support language filtering (
--langs) and reduces log verbosity for autoload runs. - Runs thesauri autoload during container startup via a new
invoke loadthesauritask and documents the boot sequence.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
tasks.py |
Adds invoke loadthesauri task to run python manage.py thesaurus autoload. |
entrypoint.sh |
Calls invoke loadthesauri during non-celery container startup. |
geonode/base/management/commands/thesaurus.py |
Registers autoload subcommand and adds --langs option for load. |
geonode/base/management/commands/thesaurus_subcommands/autoload.py |
Implements app-discovery + RDF loading loop for autoload. |
geonode/base/management/commands/thesaurus_subcommands/load.py |
Adds language filtering + logging control to thesaurus loader. |
geonode/tests/test_autoload_thesaurus.py |
Adds tests validating autoload discovery, idempotency, skipping, and error continuation. |
docs/src/setup/docker/vanilla-docker-installation.md |
Documents thesauri autoload as part of container initialization. |
docs/src/admin/thesauri/thesauri.md |
Documents thesaurus autoload, app convention, and boot-time initialization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| with patch("geonode.base.management.commands.thesaurus.apps.get_app_configs", return_value=app_configs): | ||
| autoload_thesauri() |
| def load_thesaurus(input_file, identifier: str, action: str = ACTION_CREATE, default_lang: str = None, langs: List[str] = [], log_details=True): | ||
| g = Graph() |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #14187 +/- ##
==========================================
- Coverage 74.58% 74.56% -0.03%
==========================================
Files 959 969 +10
Lines 58172 59262 +1090
Branches 7948 8069 +121
==========================================
+ Hits 43390 44190 +800
- Misses 13016 13266 +250
- Partials 1766 1806 +40 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @copilot on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added. |
thesaurus_subcommands/autoload.pywith theautoload_thesauri()functionthesaurus.pyto importautoload_thesaurifrom the new module and remove the inline definition