feat(cli): migrate flow command to cyclopts (wave 3a)#20672
Draft
feat(cli): migrate flow command to cyclopts (wave 3a)#20672
Conversation
8547753 to
e3fcc07
Compare
Native cyclopts implementation of `flow ls` and `flow serve` with deferred imports for all heavy dependencies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
e3fcc07 to
43a7ad0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native cyclopts implementation of
flow lsandflow serve, replacing the delegation stub that forwarded to typer.What changed
src/prefect/cli/_cyclopts/flow.py— nativelsandservecommands with deferred imports_cyclopts/__init__.pywith native import, removed"flow"from_DELEGATED_COMMANDS, added to_CYCLOPTS_COMMANDSmock_runner_startfixture patchesRunner.starton the class directly (works for both import paths);test_flow_serve_cli_requires_entrypointhandles different framework error messages/codesflow_appusesversion_flags=[]to prevent cyclopts from intercepting--version 1.0.0inflow serveTest plan
uv run pytest tests/cli/test_flow.py— 7 passed (typer)PREFECT_CLI_FAST=1 uv run pytest tests/cli/test_flow.py— 7 passed (cyclopts)uv run pytest tests/cli/test_cyclopts_parity.py— 18 passed🤖 Generated with Claude Code