briancaffey / django-step-by-step

A Django + Vue reference project that focuses on developer tooling and CI/CD + IaC
https://briancaffey.github.io/django-step-by-step/
174 stars 37 forks source link

Poetry - Separate test dependencies from dev dependencies #34

Open codyfletcher opened 1 year ago

codyfletcher commented 1 year ago

2 Parts to this issue:

Part 1

It seems the latest idiomatic way to define dependencies is:

[tool.poetry.group.dev.dependencies]

instead of:

[tool.poetry.dev-dependencies]

See: "A note about defining a dev dependencies group" here

Part 2

To separate dev and test dependencies—after the above change is made—we would simply need to move some items in the pyproject.toml into a new [tool.poetry.group.test.dependencies] group. I have found it helpful to separate out the test dependencies for github actions / CI purposes.