Skip to content

Centralize institutions and acknowledgments data in single JSON source#699

Merged
cristian-tamblay merged 9 commits into
developfrom
feat/institutions-data
Jun 15, 2026
Merged

Centralize institutions and acknowledgments data in single JSON source#699
cristian-tamblay merged 9 commits into
developfrom
feat/institutions-data

Conversation

@Irozuku

@Irozuku Irozuku commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Centralizes the project's collaborating institutions and funding acknowledgments into a single source of truth: docs/static/institutions/institutions.json. The docs homepage (en and es) imports it at build time, the website repository fetches it at build time from the raw GitHub URL, and a script regenerates the README acknowledgments section from it including a combined logo banner with all logos at uniform size. Adding or removing an institution now means editing one JSON file and rerunning one script.

Also updates the institution list per team decision: University of Chile (Leading Institution), CENIA (Associated Institution), IMFD (Collaborator), Unholster (Industry Partner, new logo). ANID appears via funding text and logo; UTFSM is credited in the text only.


Type of Change

Check all that apply like this [x]:

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

  • docs/static/institutions/institutions.json: new canonical data file institutions (name, role, URL, logo) and acknowledgments (text in en/es/pt, grant ids, funder logos). Consumed by the docs homepage, the README generator script, and the website repository.
  • scripts/render_institutions.py: new script that regenerates the README acknowledgments block and composes images/logos.png (each logo trimmed and scaled to a uniform cell on a transparent banner). --check mode verifies only the README text block, since PNG bytes vary across platforms/Pillow versions.
  • README.rst: acknowledgments section replaced by an auto-generated block between INSTITUTIONS-BLOCK markers; shows the institution list with roles, the English funding text, and the combined banner.
  • docs/src/pages/index.js: hardcoded logo array and funding paragraph replaced by the JSON import; text picks the current locale with English fallback.
  • docs/i18n/es/docusaurus-plugin-content-pages/index.js: same refactor for the Spanish homepage copy (it had drifted: still listed UTFSM, missing Unholster).
  • docs/static/img/institutions/unholster-logo.png: new logo.
  • images/logos.png: now generated by the script (transparent background, uniform logo sizes).
  • .pre-commit-config.yaml: new institutions-readme-sync hook fails the commit if README drifts from the JSON.
  • .github/workflows/pre-commit.yaml: installs Pillow so the hook's script can run in CI.

Testing

  • python scripts/render_institutions.py is idempotent; --check passes after a run and fails when the JSON changes without regenerating.
  • Docs built for both locales: en shows the English text, es shows the Spanish translation; both render the 5 logos (DCC/UChile, CENIA, IMFD, Unholster, ANID) from the JSON.
  • Pre-commit passes on all touched files.

Notes

  • The website repository should fetch https://raw.githubusercontent.com/DashAISoftware/DashAI/develop/docs/static/institutions/institutions.json at build time (not at runtime, to avoid GitHub rate limiting on visitors) and read acknowledgments.text.<locale> the text field is an object keyed by en/es/pt, not a plain string. Portuguese exists only for the website; the docs have no pt locale. Logo image URLs resolve against the same base path (.../develop/docs/static/ + the entry's logo field).
  • University of Chile currently uses dcc-logo.png (the only UChile logo in the repo) swap the file if a central university logo is preferred.
  • utfsm-logo.png is now unreferenced but left in place in case the decision reverses.
  • README banner is transparent; if dark-mode legibility on GitHub turns out to be a problem, the fallback is a white background (one line in the script).

Irozuku added 9 commits June 12, 2026 12:39
Add docs/static/institutions/institutions.json as canonical source for
collaborating institutions and acknowledgments (funding + development
credit). Docs homepage imports it at build time, GitHub Pages publishes
it for the website repo to consume, and scripts/render_institutions.py
regenerates the README.rst acknowledgments block. Pre-commit hook fails
when README drifts from the JSON.

Institutions: UChile (Leading), CENIA (Associated), IMFD (Collaborator),
Unholster (Industry Partner). ANID appears via funding text and logo;
UTFSM only mentioned in the acknowledgment text, no logo.
Individual RST image substitutions showed each logo at its native
proportions, which looked inconsistent. The render script now trims
each logo, scales it to a uniform cell, composes images/logos.png with
Pillow, and the README displays that single banner. --check also
detects a stale banner.
The acknowledgments text in institutions.json is now an object keyed by
locale (en/es/pt). Docs homepages (en and the es translated copy) pick
the current locale with English fallback; the es copy also drops its
hardcoded logo list in favor of the JSON. README keeps English only.
Portuguese exists for the website repository.
The institutions readme sync hook imports PIL to verify images/logos.png
is in sync; the CI runner only installed pre-commit. Also trigger the
hook when images/logos.png itself changes.
PNG bytes differ across platforms and Pillow versions, so comparing
logos.png in --check made CI fail on banners generated locally. The
check now verifies only the README text block; normal runs still
regenerate the banner.
@Irozuku Irozuku added documentation Improvements or additions to documentation front Frontend work chore Quality enhancement of the code, infrastructure, CI/CD, etc... labels Jun 12, 2026
@cristian-tamblay cristian-tamblay merged commit e44a549 into develop Jun 15, 2026
19 checks passed
@cristian-tamblay cristian-tamblay deleted the feat/institutions-data branch June 15, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Quality enhancement of the code, infrastructure, CI/CD, etc... documentation Improvements or additions to documentation front Frontend work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants