Skip to content

Implement --local flag for deploy command#165

Merged
virtuald merged 6 commits into
mainfrom
local-deploy
Jun 23, 2026
Merged

Implement --local flag for deploy command#165
virtuald merged 6 commits into
mainfrom
local-deploy

Conversation

@virtuald

Copy link
Copy Markdown
Member

In support of #164. This is 100% slop courtesy of GPT 5.5, but it works. Will need to do some refactoring.

This was tested with a venv on systemcore using Python 3.11. It expects a fully loaded robotpy cache on the robot. Run the following commands to create the cache:

  • robotpy installer download-python --cache-root /path/to/cache
  • robotpy installer download robotpy --cache-root /path/to/cache

Copy the /path/to/cache to /opt/blocks/cache on systemcore.

To perform a local deploy, as the systemcore user run robotpy deploy --local on systemcore from the robot project's directory.

main_file = tmp_path / "robot.py"
main_file.write_text("print('robot')")

fake_installer = MagicMock()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

.. man I hate mocks

@virtuald
virtuald force-pushed the local-deploy branch 3 times, most recently from e273ffb to d42a754 Compare June 14, 2026 05:35
@virtuald
virtuald requested review from alan412 and auscompgeek June 14, 2026 05:36

@alan412 alan412 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.

I didn't review the code for correctness, but I can say that it works along with blocks for our use case.

@virtuald
virtuald merged commit 59c8ac0 into main Jun 23, 2026
20 checks passed
@virtuald
virtuald deleted the local-deploy branch June 23, 2026 06:14
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.

2 participants