serious-scaffold / ss-python

An evolving Python project template that covers the full development lifecycle.
https://serious-scaffold.github.io/ss-python/
MIT License
68 stars 7 forks source link

Manage dev-dependencies better. #465

Open huxuan opened 3 months ago

huxuan commented 3 months ago

As discussed in #460

A brief summarization

  1. Standalone tools managed by pipx
    • copier
    • pdm
    • pre-commit
    • toml-sort
    • ruff
    • codespell
    • check-jsonschema
  2. Semi-dependent tools included in dev-dependencies but locked with a different lock file
    • mypy (needs installation of prod dependencies for type checking)
    • sphinx and the whole doc group (needs installation of the project to extract version)
  3. Fully dependent tools included in dev-dependencies and locked with the main pdm.lock
    • pytest and the whole test group

Task list

huxuan commented 1 week ago

I suddenly realize that the doc group is a superset of lint and test group since we need mypy and coverage report when generating documentation. So it seems that we only need two lockfiles, one is the default pdm.lock but only for production (pdm lock --prod), and the other is for dev which can be named as pdm.dev.lock (pdm lock --no-default --lockfile pdm.dev.lock). WDYT? @msclock