Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fawltydeps (dependency checker) as a linter. #525

Open
samcunliffe opened this issue Mar 11, 2025 · 2 comments
Open

Add fawltydeps (dependency checker) as a linter. #525

samcunliffe opened this issue Mar 11, 2025 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers website Related to https://github-pages.arc.ucl.ac.uk/python-tooling

Comments

@samcunliffe
Copy link
Member

samcunliffe commented Mar 11, 2025

Is Your Feature Request Related to a Problem? Please Describe

In FOSDEM I saw a talk by the developers of fawltydeps which was quite compelling: they argue that software reproducibility is in "crisis". I.e. dependencies are missing or unneeded in many codebases. They angled it to data science software, but I guess that == research software for these purposes.

Describe the Solution You'd Like

I propse to add this as a 🟢 tool to linters table and the template's linters.

Describe Alternatives You've Considered

AFAIK there are no other tools that do this (yet...?) 👀 .

Additional Context

Publicity terminal-cast:

@samcunliffe samcunliffe added enhancement New feature or request good first issue Good for newcomers website Related to https://github-pages.arc.ucl.ac.uk/python-tooling labels Mar 11, 2025
@paddyroddy
Copy link
Member

Running on this repo:

ERROR:fawltydeps.extract_deps.pyproject_toml_parser:Failed to parse {{cookiecutter.project_slug}}/pyproject.toml: Invalid initial character for a key part (at line 16, column 6)

These imports appear to be undeclared dependencies:
- 'pytest_venv'

These dependencies appear to be unused (i.e. not imported):
- 'build'
- 'mkdocs'
- 'mkdocs-include-markdown-plugin'
- 'mkdocs-material'
- 'mkdocstrings'
- 'mkdocstrings-python'
- 'pytest-cov'

For a more verbose report re-run with the `--detailed` option.

Running on a generated project from the cookiecutter

These dependencies appear to be unused (i.e. not imported):
- 'build'
- 'mkdocs'
- 'mkdocs-include-markdown-plugin'
- 'mkdocs-material'
- 'mkdocstrings'
- 'mkdocstrings-python'
- 'pytest-cov'

For a more verbose report re-run with the `--detailed` option.

Can it be configured? Like the mkdocs stuff is being used...

@samcunliffe
Copy link
Member Author

samcunliffe commented Mar 11, 2025

Oh interesting. Yes, we can configure it, plus they are responsive to feature requests. pytest-cov will be fixed in version 1 (+ pytest_venv at a guess) and we'll also be able to add a mkdocks-* wildcard to the ignore lists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers website Related to https://github-pages.arc.ucl.ac.uk/python-tooling
Projects
None yet
Development

No branches or pull requests

2 participants