fix: migrate CI off legacy isee-based workflow onto wads-managed uv CI - #11
Merged
Merged
Conversation
Fixes #8: the legacy .github/workflows/ci.yml pinned Python 3.8 and installed an unpinned isee (which pulls in wads); the currently-published wads uses dict[str, Any] at module level, a TypeError on 3.8. Every push/PR has shown red CI for this reason regardless of what changed, since before #9 landed (gated on a local pytest run instead, per that PR's own notes). Migration (durable fix option from #8, following the wads-migrate skill): - setup.cfg/setup.py -> pyproject.toml (wads-migrate setup-to-pyproject), with the known rough edges fixed by hand: SPDX license string instead of the deprecated [project.license] text table; project_name set to "oplot"; testpaths widened to ["oplot", "tests"] (the old CI actually ran `pytest --doctest-modules $PROJECT_NAME`, i.e. the package itself, so this preserves that doctest coverage rather than narrowing it to tests/ only); disabled the dead [tool.wads.ci.metrics] gate (config_path points at a file that doesn't exist, same pattern already fixed in git2py/focal). - .github/workflows/ci.yml -> the modern uv-based template (wads-migrate ci-to-uv). Widening test collection to the package surfaced two real, pre-existing bugs invisible under the broken CI: - oplot/my.py: `import nympy as np` (typo) made an already-orphaned, unimported module fail to even import. Fixed the typo; the module is still dead code (not referenced from oplot/__init__.py), out of scope here. - oplot/plot_stats.py: smooth_scores's doctest asserted numpy<2.0's bare scalar repr (`[1.5]`, `[2, 3]`); currently-installed numpy 2.x reprs scalars as `np.float64(1.5)` / `np.int64(2)`. Not a logic bug -- updated the expected values to match current numpy's actual (correct) behavior. Also applied `ruff format` fleet-wide (quote style, blank lines) to satisfy the new CI's format-check gate -- no logic changes. Dependents check: oplot's one known local dependent, `shaded`, only imports `oplot.plot_data_set.scatter_and_color_according_to_y` (a module untouched by this change); its test suite runs clean (2 skipped, needs audio fixtures not present, 0 failed) against this branch. Closes #8 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The Windows leg (just enabled by this branch's CI migration -- the old workflow never had a Windows job at all) hung indefinitely instead of completing: several oplot modules' doctests call plt.show(), and with no non-interactive backend forced, matplotlib picked a GUI backend on the Windows runner that blocked rather than no-op'ing (unlike Linux, which has no DISPLAY and falls back to Agg automatically). Set MPLBACKEND=Agg via [tool.wads.ci.env.defaults] (re-ran wads-migrate ci-to-uv to wire it into the generated workflow's env: block). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
Fixes #8: the legacy
.github/workflows/ci.ymlpinned Python 3.8 and installed an unpinnedisee(which pulls inwads); the currently-publishedwadsusesdict[str, Any]at module level, aTypeErroron 3.8. Every push/PR has shown red CI for this reason regardless of what changed (since before #9 landed, gated on a localpytestrun instead per that PR's own notes).Migration (the durable-fix option from #8, following the
wads-migrateskill):setup.cfg/setup.py→pyproject.toml(wads-migrate setup-to-pyproject), with the known rough edges fixed by hand: SPDX license string instead of the deprecated[project.license]table;project_nameset to"oplot";testpathswidened to["oplot", "tests"](the old CI actually ranpytest --doctest-modules $PROJECT_NAME, i.e. the package itself, so this preserves that doctest coverage); disabled the dead[tool.wads.ci.metrics]gate (config_pathpoints at a file that doesn't exist, same pattern already fixed ingit2py/focal)..github/workflows/ci.yml→ the modern uv-based template (wads-migrate ci-to-uv).Widening test collection to the package surfaced two real, pre-existing bugs invisible under the broken CI:
oplot/my.py:import nympy as np(typo) made an already-orphaned, unimported module fail to even import. Fixed the typo; the module is still dead code (not referenced fromoplot/__init__.py) and its one function (vlines) is still broken at runtime for an unrelated reason (a removed matplotlibhold=kwarg) — filed as a separate follow-up, oplot/my.py: vlines() is dead code and still broken (hold= kwarg removed from matplotlib) #10, rather than fixed here.oplot/plot_stats.py:smooth_scores's doctest asserted numpy<2.0's bare scalar repr ([1.5],[2, 3]); currently-installed numpy 2.x reprs scalars asnp.float64(1.5)/np.int64(2). Not a logic bug — updated the expected values to match current numpy's actual (correct) behavior.Also applied
ruff formatfleet-wide (quote style, blank lines) to satisfy the new CI's format-check gate — no logic changes.Review
Independently reviewed by a second agent before landing. It ran the full suite (87 passed), spot-checked every format-only diff for semantic changes (none found), verified the numpy repr fix empirically (values unchanged, only display differs), confirmed all of
wads-migrate's documented rough edges were actually addressed, and diffed the old vs. new CI workflow for dropped functionality (none beyond intentional, in-file-documented changes — Pages publish step restructuring and PyPI auth method, both called out in the new workflow's ownMIGRATION NOTEcomments). It flaggedoplot/my.py's deeper brokenness (not blocking, dead code) — filed as #10.Dependents check: oplot's one known local dependent,
shaded, only importsoplot.plot_data_set.scatter_and_color_according_to_y(untouched by this change); its test suite runs clean (2 skipped — missing audio fixtures, unrelated — 0 failed) against this branch.Test plan
wads ci-local: 87 passed, format/lint green (3.10 + 3.12)./tmpat 100%), not a defect —uv buildis standard and expected to succeed on a GitHub Actions runner.gh pr checks --watchgreen before merge.Closes #8
🤖 Generated with Claude Code
https://claude.ai/code/session_011HSBVhDjRU4apSLcRkavv9