Add support for the poetry backend#1601
Conversation
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/baa09519-c675-414b-ae8d-5cb4103e962a Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/baa09519-c675-414b-ae8d-5cb4103e962a Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/baa09519-c675-414b-ae8d-5cb4103e962a Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/baa09519-c675-414b-ae8d-5cb4103e962a Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
poetry backend
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
@copilot there is a lot of test coverage missing. please aim for 100% code coverage on the new code. Please make sure to add poetry as a test dependency so that it can be used in the test suite. |
…y backend Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/0eab9e13-33e4-4646-90c9-93dc238b1830 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Added |
…s to deduplicate pre-commit install functions Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/468e006f-e4cb-4f88-9126-9e0bf30067af Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
|
@copilot try testing the user experience again - this time be more rigorous to stay on the happy path |
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/155a4a8e-7612-4058-b5d9-62e8201e77d2 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Applied rigorous user testing following the Bug found: Fix: All happy-path commands verified in fresh projects:
|
|
@copilot I noticed during my testing that the E.g. for a package named
And |
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/6c00df21-6aba-4ba3-b75f-245867fdaaa5 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Fixed in Verified via user testing in a fresh temp dir: |
nathanjmcdougall
left a comment
There was a problem hiding this comment.
@copilot we've got a big gap at the moment - we're not supporting poetry's custom dependency specification standard
Read about it here:
https://python-poetry.org/docs/dependency-specification/
We need to support this for determining/interactive with deps & dev deps, etc.
Add reading from [tool.poetry.dependencies] and [tool.poetry.group.*.dependencies] sections when the poetry backend is active. Sync docs/functions.txt and AGENTS.md. Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/f5887a53-6698-4d40-b8b6-e38f81ac0dde Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Fixed in When the poetry backend is active,
This means |
|
@copilot also add support for detecting poetry usage via see https://python-poetry.org/docs/main/configuration#installerbuild-config-settingspackage-name |
…ackends.md Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/6ad57cf4-0b2b-4914-860c-5fd63fa07256 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
Detection via |
poetrytoBackendEnumin_types/backend.pyinferred_backendtype in_config.py_backend/dispatch.pyto returnBackendEnum.poetrycall_backend_subprocess/BackendSubprocessFailedError_prepare_pyproject_writeto shared_file/pyproject_toml/write.pybackendparameter pass-throughs — internal functions useget_backend()from global configcall_uv_subprocess/call_poetry_subprocessdirectly in uninstall instead of generic dispatchoptional = trueconfiguration via[tool.poetry.group.GROUPNAME]_depsimport from_integrationsadd_dep_to_group_via_poetryandremove_dep_from_group_via_poetrydocs/functions.txtand AGENTS.md functions reference--no-interactionbefore subcommand incall_poetry_subprocess()(Poetry global option ordering)docs/about/backends.mdto document the poetry backendTestPoetrywithin existing test classes_deps.py, sync doc references, fix basedpyright warnings in test_call.pyrequires-python(>=3.X,<4.0) to prevent resolver failuressrc/<pkg>/__init__.py,py.typed, andREADME.mdmatching uv's project structurepoetry.tomlpresence (already in code/tests, updated docs)📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.