Skip to content

Automate ReadTheDocs model page updates#704

Open
darrylong wants to merge 1 commit into
PreferredAI:masterfrom
darrylong:feature/add-automated-model-docs
Open

Automate ReadTheDocs model page updates#704
darrylong wants to merge 1 commit into
PreferredAI:masterfrom
darrylong:feature/add-automated-model-docs

Conversation

@darrylong

Copy link
Copy Markdown
Member

Description

Adds a GitHub Actions workflow (.github/workflows/update-model-table.yml) that automatically regenerates the models table (docs/source/_static/models/data.js) by running docs/generate_model_js.py whenever relevant files change. The workflow triggers on pushes to master that touch README.md or the generation script, and on published releases. It only commits if the output actually changed, using [skip ci] to avoid recursive runs.

The page is viewable at https://cornac.readthedocs.io/en/latest/models/

This removes the need for contributors to manually run the script and push the generated file after each change.

Related Issues

Fixes #647

Checklist:

  • I have added tests.
  • I have updated the documentation accordingly.
  • I have updated README.md (if you are adding a new model).
  • I have updated examples/README.md (if you are adding a new example).
  • I have updated datasets/README.md (if you are adding a new dataset).

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

Adds automation to keep the ReadTheDocs “Models Available” page’s backing data (docs/source/_static/models/data.js) up-to-date by introducing a GitHub Actions workflow that regenerates and commits the generated file when relevant sources change.

Changes:

  • Introduce a new workflow to run docs/generate_model_js.py on pushes to master (scoped by path filters) and on published releases.
  • Auto-commit and push docs/source/_static/models/data.js only when the generated output differs.

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

Comment on lines +18 to +19
- uses: actions/checkout@v4

Comment on lines +6 to +8
paths:
- 'README.md'
- 'docs/generate_model_js.py'
Comment on lines +9 to +12
release:
types: [published]

jobs:
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.

[FEATURE] Automated Model Table Updating

3 participants