Skip to content

Commit 319f051

Browse files
committed
fix groups and add docs to makefile
1 parent d47179e commit 319f051

4 files changed

Lines changed: 2211 additions & 12 deletions

File tree

Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,27 @@ test: .state/db-initialized ## Run test suite
6464

6565
ci: lint fmt test ## Run lint, fmt, then tests
6666

67+
# =============================================================================
68+
# Documentation
69+
# =============================================================================
70+
71+
##@ Documentation
72+
73+
docs: docs-clean ## Build documentation
74+
@echo "=> Building documentation"
75+
@uv sync --group docs
76+
@uv run sphinx-build -M html docs/source docs/_build/ -E -a -j auto --keep-going
77+
78+
docs-serve: docs-clean ## Serve documentation with live reload
79+
@echo "=> Serving documentation"
80+
@uv sync --group docs
81+
@uv run sphinx-autobuild docs/source docs/_build/ -j auto --port 0
82+
83+
docs-clean: ## Clean built documentation
84+
@echo "=> Cleaning documentation build assets"
85+
@rm -rf docs/_build
86+
@echo "=> Removed existing documentation build assets"
87+
6788
.PHONY: help serve migrations migrate manage shell docker_shell clean
6889
.PHONY: lint fmt test ci
90+
.PHONY: docs docs-serve docs-clean

docs/source/commands.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ Management Commands
88
create_initial_data
99
-------------------
1010

11-
This command creates initial data for the app using factories.
11+
.. program:: manage.py create_initial_data
12+
13+
This command creates initial data for the app using factories.
1214
You can run it like::
1315

1416
$ ./manage.py create_initial_data
1517

16-
If you want to remove all existing data in the database before creating
18+
If you want to remove all existing data in the database before creating
1719
new one, specify :option:`--flush` option::
1820

1921
$ ./manage.py create_initial_data --flush
2022

21-
If you want to specify any label to create any app specific data,
23+
If you want to specify any label to create any app specific data,
2224
specify :option:`--app-label` option::
2325

2426
$ ./manage.py create_initial_data --app-label jobs
2527

2628
Command-line options
2729
^^^^^^^^^^^^^^^^^^^^
2830

29-
.. program:: manage.py create_initial_data
30-
3131
.. option:: --flush
3232

3333
Remove existing data in the database before creating new data.

pyproject.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ dependencies = [
5959
]
6060

6161
[project.optional-dependencies]
62+
prod = [
63+
"gunicorn==23.0.0",
64+
"sentry-sdk[django]==2.40.0",
65+
"Whitenoise==6.11.0",
66+
"django-storages==1.14.4",
67+
"boto3==1.26.165",
68+
]
69+
70+
[dependency-groups]
6271
dev = [
6372
"factory-boy==3.3.1",
6473
"Faker==0.8.1",
@@ -72,16 +81,10 @@ dev = [
7281
]
7382
docs = [
7483
"sphinx",
84+
"sphinx-autobuild",
7585
"myst-parser",
7686
"furo",
7787
]
78-
prod = [
79-
"gunicorn==23.0.0",
80-
"sentry-sdk[django]==2.40.0",
81-
"Whitenoise==6.11.0",
82-
"django-storages==1.14.4",
83-
"boto3==1.26.165",
84-
]
8588

8689
[tool.coverage.run]
8790
branch = true
@@ -175,3 +178,4 @@ known-first-party = [
175178

176179
[tool.ruff.format]
177180
quote-style = "double"
181+

0 commit comments

Comments
 (0)