Skip to content

[Fixes #633][5.1.x] Handle thesauri autoload and packaging#635

Merged
giohappy merged 1 commit into
5.1.xfrom
633_51x_thesauri
Jun 17, 2026
Merged

[Fixes #633][5.1.x] Handle thesauri autoload and packaging#635
giohappy merged 1 commit into
5.1.xfrom
633_51x_thesauri

Conversation

@etj

@etj etj commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@etj etj requested a review from mattiagiupponi June 17, 2026 15:09
@etj etj self-assigned this Jun 17, 2026
Copilot AI review requested due to automatic review settings June 17, 2026 15:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to ensure thesauri are automatically loaded during container startup and that thesauri RDF assets are included when the project is packaged/distributed (Fixes #633 on 5.1.x).

Changes:

  • Added an invoke task to run python manage.py thesaurus autoload.
  • Hooked thesauri autoload into the production entrypoint startup sequence.
  • Updated setuptools configuration to exclude test packages and include thesauri/*.rdf files as package data.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/tasks.py Adds an invoke loadthesauri task that runs the Django thesaurus autoload command.
src/entrypoint.sh Calls invoke loadthesauri during non-celery startup after static collection.
src/pyproject.toml Adjusts packaging to exclude tests* and include **/thesauri/*.rdf package data.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pyproject.toml Outdated
Comment on lines +28 to +31
exclude = ["tests*"]

[tool.setuptools.package-data]
"*" = ["**/thesauri/*.rdf"]
Comment thread src/tasks.py
Comment on lines +394 to +400
try:
ctx.run(
f"python manage.py thesaurus autoload --settings={_localsettings()}",
pty=True,
)
except Exception:
pass
@etj etj force-pushed the 633_51x_thesauri branch from a9be546 to 53941db Compare June 17, 2026 15:15
@giohappy giohappy self-requested a review June 17, 2026 16:02
@giohappy giohappy merged commit 7102b9e into 5.1.x Jun 17, 2026
1 check passed
@giohappy giohappy deleted the 633_51x_thesauri branch June 17, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants