-
Notifications
You must be signed in to change notification settings - Fork 0
ADR-338: Wire mypy --strict static analysis into ml/ build #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jodavis-claude
wants to merge
4
commits into
feature/ADR-191-ml-pipeline
Choose a base branch
from
dev/claude/ADR-338-mypy-strict-ml-gate
base: feature/ADR-191-ml-pipeline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7c35f80
ADR-338: Wire mypy --strict static analysis into ml/ build
jodavis b1164ba
ADR-338: Fix dotnet build failure from unsupported git worktree exten…
jodavis 681954e
Stop tracking .claude/settings.local.json
jodavis f4b8403
Allow automated GitHub PR review posting without prompting
jodavis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
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
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
Empty file.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # mypy --strict configuration (ADR-281). Scoped to ml/pipeline/ and ml/test/ only — | ||
| # see scripts/validate-ml-build.sh/.cmd, which run `mypy --strict pipeline test` from | ||
| # this directory so this config file is auto-discovered. | ||
| [tool.mypy] | ||
| files = ["pipeline", "test"] | ||
| strict = true |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,4 @@ numpy==2.5.0 | |
| pandas==3.0.3 | ||
| tensorflow==2.21.0 | ||
| dvc==3.67.1 | ||
| mypy==2.3.0 | ||
Empty file.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| @echo off | ||
| pushd %~dp0..\ml | ||
| mypy --strict pipeline test | ||
| if %ERRORLEVEL% neq 0 ( popd & exit /b %ERRORLEVEL% ) | ||
| popd |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
| cd "$SCRIPT_DIR/../ml" | ||
| echo 'Running mypy --strict over ml/pipeline and ml/test...' | ||
| mypy --strict pipeline test |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,14 @@ | ||
| @echo off | ||
| echo Checking required tools... | ||
| for %%T in (dotnet pwsh node python3 claude) do ( | ||
| for %%T in (dotnet pwsh node python3 mypy claude) do ( | ||
| where %%T >nul 2>&1 || ( | ||
| echo ERROR: Required tool '%%T' is not installed or not on PATH. | ||
| exit /b 1 | ||
| ) | ||
| ) | ||
| call "%~dp0validate-build.cmd" | ||
| if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% | ||
| call "%~dp0validate-ml-build.cmd" | ||
| if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% | ||
| call "%~dp0validate-tests.cmd" | ||
| if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script (or validate-ml-build.sh, whichever works better in GitHub actions) should be added to the build-and-test workflow so it is validated on CI and PR builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wired the mypy --strict gate into CI: added a Python setup step,
pip install -r ml/requirements.txt, and ascripts/validate-ml-build.cmdstep to.github/workflows/build-and-test.yml, running after the dotnetBuildstep (commit 65a18d8). This gate now runs on every CI and PR build, not just locally/in the devcontainer.