feat(repo): Add task runner for common operations

Set up poethepoet for quarto rendering and previewing.
Can be invoked through `poetry preview` or `poetry render`.
Will for now only preview the main scoping review file.
This commit is contained in:
Marty Oehme 2023-12-07 09:30:16 +01:00
parent fae59c5a7d
commit 52f9d8635f
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 52 additions and 2 deletions

44
poetry.lock generated
View file

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand.
[[package]]
name = "anyio"
@ -1862,6 +1862,17 @@ files = [
qa = ["flake8 (==3.8.3)", "mypy (==0.782)"]
testing = ["docopt", "pytest (<6.0.0)"]
[[package]]
name = "pastel"
version = "0.2.1"
description = "Bring colors to your terminal."
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
files = [
{file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"},
{file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"},
]
[[package]]
name = "pexpect"
version = "4.8.0"
@ -1958,6 +1969,24 @@ files = [
docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"]
test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"]
[[package]]
name = "poethepoet"
version = "0.24.4"
description = "A task runner that works well with poetry."
optional = false
python-versions = ">=3.8"
files = [
{file = "poethepoet-0.24.4-py3-none-any.whl", hash = "sha256:fb4ea35d7f40fe2081ea917d2e4102e2310fda2cde78974050ca83896e229075"},
{file = "poethepoet-0.24.4.tar.gz", hash = "sha256:ff4220843a87c888cbcb5312c8905214701d0af60ac7271795baa8369b428fef"},
]
[package.dependencies]
pastel = ">=0.2.1,<0.3.0"
tomli = ">=1.2.2"
[package.extras]
poetry-plugin = ["poetry (>=1.0,<2.0)"]
[[package]]
name = "prometheus-client"
version = "0.18.0"
@ -2800,6 +2829,17 @@ webencodings = ">=0.4"
doc = ["sphinx", "sphinx_rtd_theme"]
test = ["flake8", "isort", "pytest"]
[[package]]
name = "tomli"
version = "2.0.1"
description = "A lil' TOML parser"
optional = false
python-versions = ">=3.7"
files = [
{file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
{file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
]
[[package]]
name = "tornado"
version = "6.3.3"
@ -2981,4 +3021,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
[metadata]
lock-version = "2.0"
python-versions = "<3.13,>=3.11"
content-hash = "c6d3a6c040fdd27185ced86fa52507d53e4dc4a5e40c1020de21881eaf0289ac"
content-hash = "e02d73a52358bb9ed8da5e6d5cc8c55992ee449a429c820105610f6c484066e3"

View file

@ -17,6 +17,7 @@ tabulate = "^0.9.0"
[tool.poetry.group.dev.dependencies]
pynvim = "^0.4.3"
pyperclip = "^1.8.2"
poethepoet = "^0.24.4"
[build-system]
requires = ["poetry-core"]
@ -24,3 +25,12 @@ build-backend = "poetry.core.masonry.api"
[tool.ruff]
ignore = ["E402"]
[tool.poe]
poetry_command = ""
[tool.poe.tasks.preview]
help = "Preview the main review in the browser"
cmd = "quarto preview scoping_review.qmd --to=html"
[tool.poe.tasks.render]
help = "Render all project files"
cmd = "quarto render"