Skip to content

Recognize uv global options before run in Python workflow checks - #333

Open
KingEmma7 wants to merge 1 commit into
DiffCI:mainfrom
KingEmma7:feat/python-check-uv-global-options
Open

KingEmma7 wants to merge 1 commit into
DiffCI:mainfrom
KingEmma7:feat/python-check-uv-global-options

Conversation

@KingEmma7

Copy link
Copy Markdown
Contributor

Addresses item 3 of #330.

DiffCI now recognizes uv --directory dify-agent run --project . pyrefly check as a Python type check. A Python change schedules the original command, including its directory and project arguments. A README-only change skips it. A Make target whose recipe contains that literal check can make the same decision.

Before run, the planner accepts --directory and --project with simple repository-relative paths, plus --offline and --no-progress. Unsupported options or missing operands leave a direct command out. If a Make variable can supply part of the new invocation, the target still runs as written. A uv.toml change runs the newly recognized checks because that file can change the environment uv selects.

The synthetic regression models the literal Dify command from the issue. Running the same three Git changes through diffci verify and its planner on upstream and the patch confirmed the Python, README and uv.toml decisions, including the missing-runner explanation. Two regression tests fail on upstream and pass with the patch. The full Core run passed 1,405 tests. Its 16 skipped Go and Cargo cases passed in a separate run with the toolchains on PATH. Typecheck, build, release boundary, agent packaging and benchmark also passed.

Signed-off-by: Emmanuel Mawulolo Tagbor <etagbor@gmail.com>
@adityankale190895

Copy link
Copy Markdown
Member

Thanks, this looks good: the fail-closed cases are well covered and CI is green.

One simplification before merging: instead of the new configNames field, could you add uv\.toml to PY_CONFIG? It is Python configuration like uv.lock and .python-version, and it would also cover plain uv run mypy, which today ignores a uv.toml change even though uv reads it there too. That removes the configNames plumbing in makeCheck, toolCheck and narrowPythonChecks, and pythonOnlyRecipe no longer needs to return uvGlobals. The cost is that a uv.toml change runs every Python-only check, which is fine since that file rarely changes.

The existing dify-agent/uv.toml → RUN assertion should keep passing as is.

This branch has not been deployed

No deployments
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