Skip to content

Add configurable pre-deploy actions - #169

Closed
onlinerj wants to merge 1 commit into
robotpy:mainfrom
onlinerj:feature/pre-deploy-actions-257
Closed

onlinerj wants to merge 1 commit into
robotpy:mainfrom
onlinerj:feature/pre-deploy-actions-257

Conversation

@onlinerj

@onlinerj onlinerj commented Sep 11, 2026 •

Copy link
Copy Markdown

Summary

  • parse repeatable [[tool.robotpy.deploy]] actions from pyproject.toml
  • run configured commands locally before uploading robot code
  • stop on required command failures and continue after optional failures
  • validate malformed action configuration and document the new syntax
  • preserve --no-install for projects whose pyproject.toml has no RobotPy table

Addresses robotpy/mostrobotpy#257.

Verification

  • .venv/bin/python -m pytest — 87 passed
  • .venv/bin/python -m mypy --show-column-numbers robotpy_installer — no issues in 21 source files
  • .venv/bin/python -m black --check --diff . — passed
  • required and optional failure paths are covered by unit tests

Evidence

Before: the issue specification and unimplemented configuration:

Issue specification before implementation

After: the corrected implementation, including the review-requested --no-install regression coverage:

Corrected implementation after review

Copilot AI lite review requested due to automatic review settings September 11, 2026 03:07

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e21696f0f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +198 to +199
if pyproject.toml_path(project_path).exists():
project = pyproject.load(project_path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the --no-install escape hatch

When --no-install is used in a project with an ordinary pyproject.toml that lacks [tool.robotpy], this unconditional load raises PyprojectError before the no_install branch is reached, so deployment now aborts. Previously --no-install deliberately bypassed parsing the file—and the existing error message explicitly recommends that flag—so pre-deploy discovery needs to tolerate a missing RobotPy section or retain the bypass when installation is disabled.

Useful? React with 👍 / 👎.

@virtuald virtuald closed this Sep 11, 2026
@onlinerj

Copy link
Copy Markdown
Author

I addressed the CI formatting failure and the review finding about preserving the --no-install escape hatch in 9204703. The branch now passes Black, mypy, and all 87 tests, including a regression test for an unrelated pyproject.toml without [tool.robotpy]. Would you be open to reopening this PR, or would you prefer a different implementation direction?

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