Skip to content

Add codegen check CI job - #5681

Open
emilykl wants to merge 3 commits into
v7.0from
add-ci-codegen-check
Open

Add codegen check CI job#5681
emilykl wants to merge 3 commits into
v7.0from
add-ci-codegen-check

Conversation

@emilykl

@emilykl emilykl commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Link to issue

Closes #5680

Description of change

Adds a CI job which runs the Python codegen script and fails if the generated files do not match what's committed in the repo.

Also adds a [dev_codegen] extra in pyproject.toml which installs only the packages needed to run the codegen. This is used in the CI job. uv.lock is also updated accordingly.

This will ensure that the generated Python files (python/graph_objs/) are always up-to-date.

Testing

The job fails on this PR because the codgen files are currently out of date on v7.0.

See #5682 for a demo of the job passing and failing.

Guidelines

@emilykl
emilykl changed the base branch from main to v7.0 July 28, 2026 16:58
@emilykl emilykl mentioned this pull request Jul 28, 2026

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 a dedicated GitHub Actions workflow to ensure Plotly’s Python code-generated artifacts remain in sync with what’s committed, and introduces a focused dependency extra to run codegen in CI.

Changes:

  • Add a new CI workflow that runs python commands.py codegen and fails if it produces any repo diffs.
  • Introduce a dev_codegen extra in pyproject.toml to install only codegen-required dependencies (and wire it into dev_optional).
  • Update uv.lock to reflect the new extra and dependency graph.

Reviewed changes

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

File Description
uv.lock Adds/updates the locked dependency set to include the new dev-codegen extra.
pyproject.toml Defines the dev_codegen extra (and updates dev_optional to include it).
.github/workflows/check-codegen.yml New workflow to run codegen and fail CI when generated files don’t match committed files.

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

Comment thread .github/workflows/check-codegen.yml
Comment thread .github/workflows/check-codegen.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

[chore] Add CI step to check that Python codegen files are up to date

3 participants