Title: Infer dependencies from `setup.cfg` by Copilot · Pull Request #1795 · usethis-python/usethis-python · GitHub
Open Graph Title: Infer dependencies from `setup.cfg` by Copilot · Pull Request #1795 · usethis-python/usethis-python
X Title: Infer dependencies from `setup.cfg` by Copilot · Pull Request #1795 · usethis-python/usethis-python
Description: Create src/usethis/_file/setup_cfg/deps.py with get_setup_cfg_project_deps() and get_setup_cfg_dep_groups() functions Update src/usethis/_deps.py to read from setup.cfg and merge those deps with pyproject.toml deps Update docstrings in _deps.py to mention setup.cfg Create tests/usethis/_file/setup_cfg/test_deps.py with 17 unit tests (100% coverage) Update tests/usethis/test_deps.py to add SetupCFGManager() to all relevant test contexts and add integration tests for setup.cfg Auto-generated docs updated (AGENTS.md, functions.txt, module-tree.txt) Fix type annotations and clarify docstrings in setup.cfg dep inference All static checks pass (prek + basedpyright) Fix tests/usethis/test_init.py::TestWriteSimpleRequirementsTxt by adding SetupCFGManager() context (CI failure #1) Fix tests/conftest.py: reset usethis_config.backend and usethis_config.inferred_backend in autouse fixture to prevent test pollution (CI failure #2) Fix src/usethis/_config.py: add try-finally to UsethisConfig.set() so config state is always restored even when exceptions are raised inside with blocks (CI failure #3 — root cause of cascading "empty output" failures) Fix tests/usethis/_tool/test_base.py: add SetupCFGManager() to TestIsUsed and TestIsDeclaredAsDep tests Fix tests/usethis/_core/test_core_tool.py: add SetupCFGManager() to ~28 tests missing it (TestCoverage, TestDeptry, TestRequirementsTxt, TestPyprojectFmt) Remove # pragma: no cover comments and # type: ignore[union-attr] comments from setup_cfg/deps.py; simplify code to use raw_value or "" Replace double backticks (\`...```) with single backticks in all docstrings written in this PR; filed issue #1822 for a prek hook to enforce this
Open Graph Description: Create src/usethis/_file/setup_cfg/deps.py with get_setup_cfg_project_deps() and get_setup_cfg_dep_groups() functions Update src/usethis/_deps.py to read from setup.cfg and merge those deps with p...
X Description: Create src/usethis/_file/setup_cfg/deps.py with get_setup_cfg_project_deps() and get_setup_cfg_dep_groups() functions Update src/usethis/_deps.py to read from setup.cfg and merge those deps with p...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1795
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:af471699-a935-8301-7ec3-593bda2a677d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D43E:327B79:254A279:34AECD6:6A4CE97D |
| html-safe-nonce | 186d768206d17bad193d0bc5c4b6139bb5f6666ce375c2fc67b25dbe7706042d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDNFOjMyN0I3OToyNTRBMjc5OjM0QUVDRDY6NkE0Q0U5N0QiLCJ2aXNpdG9yX2lkIjoiOTkyNTI0NzA3MTgwNjM2NTQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 157b8e71a3b1e51542470108c63852a31706f999d995be57df31b4b21e1ef6db |
| hovercard-subject-tag | pull_request:3487908595 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1795/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | Create src/usethis/_file/setup_cfg/deps.py with get_setup_cfg_project_deps() and get_setup_cfg_dep_groups() functions Update src/usethis/_deps.py to read from setup.cfg and merge those deps with p... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c5a57f04eeb310f57c73fd6d751d957e2ca27ed2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width