Repository navigation
Add Python provider with click and pretalx corpus - #10
Merged
Merged
Conversation
Python is pulled forward from post-v0 using the same corpus shape as Ruby: a focused python-django fixture, pallets/click as a framework-free library, and pretalx/pretalx as a production Django application. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Skip named pip installs as CI tool provisioning, matching the gem install rule, and keep setup-python version files from treating pyproject.toml table headers as versions. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Retain requirements.txt and prefixed-tool sources, parse only setup.py dependency fields, honor explicit manager tables, unwrap nested runners, keep relative pip installs, and detect Django tests.py modules. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Accept tests.py without treating helper modules such as testing.py as tests, drop an unused manager helper, and fix setup.py parse lint. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Keep uv --directory/-C when unwrapping runners, infer pip install only for installable Python identities, read PDM dev-dependencies, limit prefix tool matching to pytest plugins, and accept Ruby engine aliases in shared version-file parsing. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
factValues only collected tool.configured facts; name the helper for that purpose instead of keeping an unused parameter. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Read setup.py and Pipfile alongside pyproject.toml, stop treating pip/uv /Poetry -v as version probes, unwrap uv global options, apply captured uv directories in Semaphore, skip env and site-packages trees, accept GraalPy version-file pins, and describe mixed manager ambiguities as signals rather than lockfiles. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Emit uv/poetry/pipenv/pdm run for test and server commands, cite the actual Python version declaration source, consume uv run value flags such as --env-file, and treat pip -c as a constraint rather than an installable requirements file. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
firstNonEmpty was only used by the old Pipfile version fallback. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Recognize uv/poetry/pipenv/pdm/pip installs in ClassifyManager so a CI poetry install conflicts with inferred uv sync, and skip named pip installs that carry uv directory or pip index-url options. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Parse dotted pyproject keys, treat pytest-* plugins as pytest signals, cite the selected manager (Pipfile) on inferred installs, and keep expression-valued uv --directory on the enclosing project. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Evaluate requires-python with PEP 440 comma bounds and ~= compatible releases so CI versions are not falsely merged or conflicted. Preserve dependency-group provenance and activate extras or groups on inferred installs. Interpret only unqualified tox and nox runs as tests, and unwrap poetry/pipenv/pdm global directory flags before run. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Ignore sibling pytest plugins when choosing extras or groups, so Click keeps uv sync. Pretalx now installs the dev extra that provides pytest, and tox run -e typing is no longer labeled a test. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Keep extras and groups on requirements-based pip installs, honor optional Poetry groups, use PDM -G for extras, quote pip extras, and parse legacy Poetry dev-dependencies plus setup.cfg pytest settings. Consume pip value flags and unresolved targets so --group and variable wheels stay visible, and classify poetry/pipenv sync as dependency installation. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Do not skip every directory named env; treat uv --project as a project directory; preserve setup.py and Poetry extra scopes; ingest uv dev-dependencies; and leave prerelease Python bounds unevaluable. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
…ection. Keep requirements.txt dependencies installable only under pip so Poetry, uv, PDM, and Pipenv do not claim pytest from that file. Compare exact PEP 440 releases with zero padding, and read setup.cfg/tox.ini sections for flake8, mypy, isort, pylint, and pytest. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
gofumpt dropped extra blank lines left by conflict resolution. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/python-provider-532e
branch
from
August 19, 2026 08:26
872fa16 to
9fbd03c
Compare
main's constraint matcher takes (runtime, declared, version); the rebased Python cases still used the two-argument form. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
Expression-valued directory flags still go through expandDirectories so
composer --working-dir=\${{ matrix.dir }} can fan out. clap's pre-commit
workflow now reports the setup-python 3.x pin that GHA already observed.
Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
markoa
marked this pull request as ready for review
August 19, 2026 08:32
firstPythonTest no longer cites the first lexicographic test_*.py file. Configured pytest testpaths and test/tests directories are searched first so Django settings modules such as test_settings.py are not treated as the project's test suite. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.com>
The inferred pytest command now points at src/tests instead of the Django test_settings module that sorted first by filename. Co-authored-by: Marko Anastasov <markoa@users.noreply.github.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.
Pulls Python support forward from post-v0, using the same corpus shape as Ruby.
Canonical test repos
Python has several first-class project shapes (pip / Poetry / uv / Pipenv, pytest vs unittest, Django vs Flask vs FastAPI). Not every shape gets a remote corpus entry:
python-djangofixturepallets/clickpretalx/pretalxrequirements.txt-only treesThis matches Ruby:
ruby-railsfixture,ruby/rakelibrary,basecamp/once-campfireapp.Provider
pyproject.toml,setup.py, orPipfile, merged when they coexist[tool.poetry|uv|pdm]; competing signals are an ambiguity.python-version,.tool-versions,requires-python, with source/pointer from the declaring filemanage.py test/ Django/Flask server prefixed withuv run,poetry run,pipenv run, orpdm runwhen that manager is selectedtool.configuredwhen no matching command existsactions/setup-python, including GraalPy version-file pinspip install <package>in CI is tool provisioning, including option-prefixed forms such asuv --directory . pip install ruffidea.mdandplan.mdrecord the decision to pull Python into v0 as milestone 8.Accuracy and evidence-contract fixes
requirements.txt(including prefixed tools such aspytest-cov) instead of a fallback manifestinstall_requires/tests_require/setup_requires/extras_requireinsetup.py[tool.poetry|uv|pdm]as the manager even whenrequirements.txtis also presentrequirements.txtdependencies scoped to pip so Poetry/uv/PDM/Pipenv do not claim packages that file never installsuv run python -m pytestis pytest../shared,packages/widget) as repository commandstests.pywithout treating helper modules such astesting.pyas testsuv run --directory/-C/--projectso CI commands are attributed to that working directory, including Semaphoreuv --directory packages/api run pytestanduv -C … tool run--env-fileand--with-requirementspip install -e .only for installable identities, not tool-only pyproject filessetup.py/Pipfilewithpyproject.tomlso build-system-only or tool-only pyproject files do not hide installable identitypython_version[tool.pdm.dev-dependencies]so pytest/Ruff declared there are not missedmypy-extensionsis nottool.configured=mypy-vas a version probepip install -c constraints.txt <pkg>as remote tool provisioninguv --directory . pip install ruff,pip --index-url … install tox)ClassifyManagerso CIpoetry installconflicts with inferreduv syncinstead of emitting two preparation commandspyvenv.cfgorsite-packages, not every directory namedenvproject.name,project.dependencies) as nested tablespytest-covas pytest command signalsuv --directoryon the enclosing project instead of fabricating a pathrequires-pythonwith PEP 440 comma bounds and~=compatible releases==3.12matches CI3.12.0>=3.13rc1unevaluable instead of treatingrctokens as zerorequirements.txtpip install -e '.[test]') so zsh nomatch does not fail the commandsetup.pyextras_requireextra names and does not treattests_requireas a main extraoptional = trueextras via[tool.poetry.extras], optional groups with--with, and[tool.poetry.dev-dependencies][tool.uv] dev-dependenciesas the defaultdevgroup-Gfor both extras and groupspip install --groupand unresolved/$VARwheel targets as visible CI commandspoetry syncandpipenv syncas dependency installationsetup.cfgandtox.inifor pytest, flake8, mypy, isort, and pylinttox/tox run/noxas testspoetry -C/pdm --project/uv --projectglobals beforerunmake checkpasses.requirements.txtpytest no longer producespoetry run pytest.==3.12folds CI3.12.0instead of conflicting.setup.cfg/tox.inisections configure flake8, mypy, isort, and pylint.