Skip to content

Commit 740c0ac

Browse files
committed
Update pyproject.toml for new dependency group handling for poetry
Dependency groups are now a thing, and the old `dev-dependencies` section will soon be deprecated according to the poetry docs. So, this updates pyproject.toml to use the new format. Please note that poetry v1.2+ is now required for this project, but there's currently no way to specify or enforce that in poetry, so the contributing docs have been updated to get that point across. see: https://python-poetry.org/docs/master/managing-dependencies/#dependency-groups see: python-poetry/poetry#3316
1 parent c1eb0c5 commit 740c0ac

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

docs/contributing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ When discussing new features, please keep in mind our design goals. jrnl strives
7070

7171
### Getting your environment set up
7272

73-
You will need to install [poetry](https://python-poetry.org/) to develop jrnl. It will take care of all of the project's other dependencies.
73+
You will need to install [poetry v1.2+](https://python-poetry.org/) to develop jrnl. It will take care of all of the project's other dependencies.
7474

7575
### Understanding the branches
7676

@@ -88,7 +88,7 @@ You can find an inventory of commands in the `pyproject.toml`. Users can run the
8888
A typical development workflow includes:
8989

9090
* Installing dependencies:
91-
* `poetry install`
91+
* `poetry install` (or `poetry install --with docs` for optional dependencies)
9292
* Activate virtual environment:
9393
* `poetry shell`
9494
* Running the source in a virtual environment:

pyproject.toml

+15-7
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,31 @@ rich = "^12.2.0"
4242
# dayone-only deps
4343
tzlocal = ">=4.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt
4444

45-
[tool.poetry.dev-dependencies]
45+
[tool.poetry.group.dev.dependencies]
46+
ipdb = "*"
47+
poethepoet = "*"
48+
49+
[tool.poetry.group.lint.dependencies]
4650
black = { version = ">=21.5b2", allow-prereleases = true }
4751
flakeheaven = ">=3.0"
4852
flake8-black = ">=0.3.3"
4953
flake8-isort = ">=5.0.0"
5054
flake8-type-checking = ">=2.2.0"
51-
ipdb = "*"
5255
isort = ">=5.10"
53-
mkdocs = ">=1.0,<1.3"
54-
poethepoet = "*"
56+
57+
[tool.poetry.group.test.dependencies]
58+
tox = "*"
5559
pytest = ">=6.2"
5660
pytest-bdd = ">=4.0.1,<6.0"
57-
pytest-clarity = "*"
5861
pytest-xdist = ">=2.5.0"
59-
requests = "*"
6062
toml = ">=0.10"
61-
tox = "*"
63+
64+
[tool.poetry.group.docs]
65+
optional = true
66+
[tool.poetry.group.docs.dependencies]
67+
# For docs: don't forget to run `npm install`
68+
mkdocs = ">=1.0,<1.3"
69+
requests = "*"
6270
xmltodict = "*"
6371

6472
[tool.poetry.scripts]

0 commit comments

Comments
 (0)