Repository navigation
chore: bump ruff, pyright and pytest, and add uv.lock - #283
Merged
winstonliu1111 merged 11 commits intoNov 24, 2026
Merged
Conversation
A typo in a marker name only gave a warning, and the test ran unmarked. --strict-markers makes it an error. testpaths lets bare `pytest` find tests/. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Two tests import `src.…`. `python -m pytest` finds the package, because it adds the current folder to the path. Bare `pytest` did not, and it could not collect those tests. pythonpath = ["."] fixes it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ruff 0.17 flags if/return True/return False (SIM103) in KinetoOperator.is_cpu_op. pyright 1.1.414 flags the HostTrace constructor: the default HostNode is not a Type[N]. Both fixes also pass with the pinned ruff 0.3.7 and pyright 1.1.359, so every commit stays green. A test pins the ProfilerStep name rule. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The newer ruff joins implicit f-string concatenations that fit in 120 columns. This commit holds only that output, so that .git-blame-ignore-revs can list it. The pinned ruff 0.3.7 also accepts the result. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ruff 0.3.7 -> 0.17.6, pyright 1.1.359 -> 1.1.414, pytest 8.1.1 -> 9.2.0. The commits before this one already fix what the new versions report. vulture, build and twine stay. pyproject.toml and requirements-dev.txt must name the same versions (test_dev_group_pins_equal_requirements_dev). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The lock file records every package of the environment, so two people get the same one. Generated with `uv lock` (140 packages, all from pypi.org, resolved for Python 3.11 to 3.14 on all platforms). Pyright, pytest and ruff are locked at the pins from the previous commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`uv run` and `uv sync` rewrite a stale uv.lock without a warning. `just lock-check` runs `uv lock --check` and fails instead. The gate runs it first, before any recipe that runs uv. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
git blame skips the listed commit and shows the earlier author of each line. GitHub reads this file by its name. Two tests check that every line is a full hash, and that each commit is in the history. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add a lock file section, a git blame section, and steps for a conflict in uv.lock. Say that pip does not read uv.lock. Remove the stale claim that bare pytest cannot collect the tests (the pytest settings fixed it), in the justfile and in a test comment. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
git cat-file only proves that the commit object exists. After a rebase the old commit stays in the local store but HEAD no longer reaches it. Use git merge-base --is-ancestor instead. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
test_justfile_does_not_say_that_bare_pytest_fails only checked that a comment stayed deleted. It protected no behavior. The test of the pytest settings already guards what the comment was about. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
MLCommons CLA bot: All contributors are covered by the MLCommons CLA ✍️ ✅ |
winstonliu1111
requested review from
danmih-ixia,
jinsun-yoo,
mihncalo,
razvcris and
theodorbadea
November 24, 2026 03:10
theodorbadea
approved these changes
Nov 24, 2026
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.
Closes #262. Part of Goal 0 (#260), Phase 2.
What this PR does
[tool.pytest.ini_options].uv.lock. It records the exact version of every package, so two people get the same environment..git-blame-ignore-revswith the format commit.just lock-checkand runs it first injust gate.The
paramgroup and its pin test are not in this PR. #257 already removed them.Commits
Each commit passes the checks that apply to it. The fixes pass with the old and the new tools, so the history stays green.
test: run pytest on tests/ and reject unknown markerstestpaths,--strict-markers.fix: let bare pytest import the src packagepythonpath = ["."]. Barepytestcould not collect 2 test files.fix: clear what newer ruff and pyright reportis_cpu_op. TheHostTrace.__init__overload. A test for theProfilerStepname rule.style: format with ruff 0.17.6chore: bump ruff, pyright and pytestpyproject.tomlandrequirements-dev.txt.chore: add uv.lock and stop ignoring itchore: add a lock-check recipe and run it first in the gateuv lock --check.chore: add .git-blame-ignore-revs for the ruff format commitdocs: explain the lock file and the blame-ignore filedoc/DEVELOPMENT.md.fix:andtest:What changes for contributors
requirements-dev.txt. Your PR can show new ruff or pyright messages. Runjust lintandjust typesto see them.uv.lockis committed. After you changedependenciesor[dependency-groups], runuv lockand commit the file.just lock-checkfails when you forget.uv runanduv syncwould change an old lock without a warning.uv.lockby hand. Take the file frommain, then runuv lock.git config blame.ignoreRevsFile .git-blame-ignore-revsonce. GitHub reads the file by itself..mdfiles already pass.pip install -r requirements-dev.txtinstalls the new versions.pipdoes not readuv.lock.Acceptance criteria
uv sync --lockedpasses in a fresh cloneuv.lockwas unchanged.just gatepasses with the new tool versions598b749: exit 0.uv lock --check:Resolved 140 packages.49 files already formatted.All checks passed!.0 errors, 4 warnings.269 passed, 2 skipped. Slow tests:2 passed.wheel_check: the wheel is complete and works with protobuf 6.31.1 and the newest protobuf..git-blame-ignore-revssrc/trace_link/trace_linker.py. Without the flag:c7d613ce (winstonliu1111 2026-11-24). With--ignore-revs-file:a6590feb (Taekyung Heo 2024-07-12). The GitHub blame API showsa6590fefor the same line on this branch.Merge test against the open PRs
lock-check.doc/DEVELOPMENT.md. For #282 also thegate:line injustfile. Keep both sides.mainalready, in the same files. This PR adds no conflict.Other checks
just actwithpython_lint.yml,python_tests.ymlandend_to_end_tests.ymlon commit 9: allJob succeeded. The two later commits change onlytests/test_tooling.py.lock-check: withruff==0.17.5in a copy ofpyproject.tomland the old lock,uv lock --checkfails:The lockfile at uv.lock needs to be updated, but --check was provided.HEADreaches it. Commit 10 fixes it.Not tested
uv.lockat each bump. I did not test it.uv.lockyet. Run CI through the just recipes #263 makes CI useuv sync --locked.Generated with Claude Code