You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
They check whether there are unused or missing dependencies.
Use cases include:
My code works but I rely on a transitive dependency, and that could bite me in the future
My tests pass, but one of my dependencies is specified as a test dependency
I am wasting time/space installing a dependency which I do not need
My uninformed guess/hope is that with uv, astral-sh now has the tooling to understand the project's requirements, and with existing ruff rules, there is an understanding of the project's imports.
Context: I took over responsibility for pip-check-reqs a few years ago as a user of the project as it was breaking.
The text was updated successfully, but these errors were encountered:
+1 on the request. Deptry latest alpha is already using a bit of rust to parse the AST. ruff alone could perform these kind of checks, I guess. The biggest roadblock is that some packages are installed as something and imported as something_else.
I think the main challenges here aren't technical, but more-so that it requires deeper coupling to Python, since we need to know the sys.path in order to look for installed packages (at least for some of these rules, and to resolve the issue around something being imported as something_else). That also means we need to be running within a virtual environment, or have a path to a .venv provided by the user (like in Pyright).
deptry and pip-check-reqs are similar tools.
They check whether there are unused or missing dependencies.
Use cases include:
My uninformed guess/hope is that with
uv
,astral-sh
now has the tooling to understand the project's requirements, and with existingruff
rules, there is an understanding of the project's imports.Context: I took over responsibility for
pip-check-reqs
a few years ago as a user of the project as it was breaking.The text was updated successfully, but these errors were encountered: