Repository navigation
dev: move every check into one noxfile - #4208
Open
oresttokovenko wants to merge 8 commits into
Open
oresttokovenko wants to merge 8 commits into
oresttokovenko wants to merge 8 commits into
Conversation
The Makefile, the pre-commit config, and the CI workflows each described the same checks in their own way, and tool versions were pinned in two of them. One noxfile now holds the sessions, the justfile names them, and CI runs the same sessions a developer runs locally.
The sdist carries no .gitignore, and release verification loads the noxfile from an unpacked sdist, so the read must tolerate its absence.
The justfile is a convenience for local runs. CI has no reason to install a task runner to reach the sessions it already names.
`uv run` syncs the project environment on demand, and the test and coverage sessions build their own environments from uv.lock, so the explicit install only synced the extras a second time.
The wrapper named every member after the string it held, and only two of the six reached a call site, so it added a lookup without removing a literal.
Those files are not new: the Makefile ran coverage with --parallel-mode as well, and noxfile's clean session still removes them.
coverage already reads [tool.coverage.run] source from pyproject.toml, so the session stops repeating --source, and the 85 default moves next to it as [tool.coverage.report] fail_under. COVERAGE_FAIL_UNDER still overrides it, because the integration job accepts lower coverage than the unit suite.
mypy finds the config file on its own, so --config-file was redundant, and --scripts-are-modules is a setting rather than an invocation choice.
This was referenced Oct 30, 2026
Collaborator
|
Part of the CI failures will be fixed by #4216 |
This branch has not been deployed
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.
What
This change replaces
Makefileand.pre-commit-config.yamlwith a singlenoxfile.py, and leaves thejustfileas a thin entry point with one command line per recipe. CI now calls the same nox sessions that a developer runs locally, so there is one place to look when a check fails.noxfile.pydefines 24 sessions, six of which form the gate while the rest are test suites and local actionsjustfileholds no logic and is 141 lines longpyproject.tomlanduv.lockonly, so each session installs the dependency group it needs by namepyproject.tomlrather than from a workflow matrixThis is not the shortest way to write this file, because I copied the old behaviour first: the pre-commit hooks let
pre-commitchoose the files to check, which nox does not do, sonoxfile.pycarries helpers that walk the tree, read.gitignore, and separate text files from binary ones. A native tool does that work itself, and if we move to tools that scan its own paths or already contains the search logic, I expect the file to shrink to about half. That is not this pull request, whose goal is narrow, to show that one file describes the same checks as the two old files while behaving the same way, all in Python. The shorter version can follow once this merges.Also, I've had add two dependencies move into the project.
mypyand its four stub packages become part of atypesdependency group, because the pre-commit hook used to install them in an environment of its own and nothing else made them available. Thetyconfiguration is untouched, since the type-checker work lands separately in #4207 (WIP), which adds thetests/exclusion and the stricter rules; until that merges,just typecheck-tywill fail as it down now upstreamWhy
This is an effort to modernize/centralize dev tooling, reduce version drift, and make the project easier to reason about. Currently three files described the same checks in three different ways, so learning what CI runs meant opening the
Makefile, then.pre-commit-config.yaml, and then the workflow. Even worse, versions lived in two places for the same reason, since the hook configuration pinned every tool withrev:, and the CI used the Makefile directly which is clunky. Sometimes, commands were nested, likemake lintranprek run -a, which ran a hook, which ran a tool in an environment that pre-commit had built, etc. This introduces lots of place of misalignment of results locally vs CI. Now the logic exists in one single place, in Python and reads native dependencies, so a version bump touchespyproject.tomlanduv.lockand nothing else.Where the old recipes and checks live now
Makefile targets:
helpjust --listinstall-uvjust install-uvinstalljust installinstallcheck-licensejust check-licensedev/check-licenseunchangedlintjust check,just fixtestjust testtests-3.11totests-3.14test-integrationjust test-integrationintegrationtest-integration-setupjust test-integration_start_servicestest-integration-execjust test-integration_pytesttest-integration-cleanupjust test-integration_stop_servicestest-integration-rebuildjust test-integration-rebuildintegration-rebuildtest-s3just test-s3s3test-adlsjust test-adlsadlstest-gcsjust test-gcsgcstest-coveragejust test-coveragetests,integration,s3,adls,gcs, thencoveragecoverage-reportjust coverage-reportcoveragetest-notebookjust test-notebooktest-notebookdocs-servejust docs-servedocs-servedocs-buildjust docs-builddocs-buildnotebookjust notebooknotebooknotebook-infrajust notebook-infranotebook-infracleanjust cleancleanPre-commit hooks:
trailing-whitespacehygieneend-of-file-fixerhygienecheck-yamlhygienecheck-asthygienerufflintruff-formatformatnbqa-rufflintmypytypecheck-mypytytypecheck-ty, local and experimentalmarkdownlintmarkdownlintcodespellcodespelluv-lockjust lock-checkBehaviour changes
just checkbefore you push, which is exactly what CI runs.just checkwrites no files, whilejust fixapplies the fixes.just install --force-python 3.12.default=False, so a new check session joins it by default instead of needing a second registration.rumdlfrom PyPI, which reads the existing.markdownlint.yamland avoids a Node.js install. RuleMD057stays off because thereference/pages are generated by mkdocstrings at build time.check-yamlruns with--unsafebecausemkdocs/mkdocs.ymluses the!!python/name:tag.mypychecks every tracked Python file again, 215 in total and with--scripts-are-modules; an earlier draft of this change had narrowed it to the package alone.hive-kerberosextra, which pullskerberos, a package that publishes no Windows wheels and would need MIT Kerberos headers the runner does not have.pyiceberg.avro.decoder_fast.notebook-infrastops the Docker services when JupyterLab exits, unlessKEEP_COMPOSE=1asks to keep them.Small fixes the port needed
.gitignoreonly if the file is there, because the sdist does not ship one anddev/release/verify_rc.shrunsjust installandjust test-coveragefrom inside an unpacked sdist.Tests
just checkruns six sessions in about 13 seconds and is green.just testruns the four interpreters in parallel: 37 seconds on a cold tree, and the full unit suite on 3.13 takes a minute.just install --force-python 3.12 -- --dry-runprintsuv sync --all-extras --python 3.12while the plain form leaves the environment alone, andjust docs-buildbuilds in seven seconds.just cleanthenjust installrebuilds from an empty tree, an unpacked sdist lets nox read the noxfile, and a deliberately dirty Markdown file failsjust checkwhile a clean one passes.The integration and cloud suites, CI on GitHub, and
dev/release/verify_rc.shend to end were not run, because they need Docker services and a real runner.typecheck-tyis tagged experimental and stays out of the gate; on the current base it reports 894 diagnostics, which #4207 reduces once its exclusions and rules are in place.