Skip to content

Commit 4f5cd61

Browse files
committed
Docs update
1 parent 2d76830 commit 4f5cd61

4 files changed

Lines changed: 20 additions & 13 deletions

File tree

CONTRIBUTING.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ Creating a Webhook
120120

121121
:obj:`democrasite.webiscite` needs `webhooks`_ to find out about events on
122122
Github. `Create a webhook`_ in your fork of the repository, then generate a
123-
secret key for your hook and store it in your environment (either through your
124-
terminal or ``.env`` file) as ``GITHUB_SECRET_KEY``.
123+
secret key for your hook and store it in ``.envs/.local/.django`` (or your shell) as
124+
``GITHUB_WEBHOOK_SECRET`` so it matches the secret configured on GitHub.
125125

126126
To test your webhook, follow these `instructions`_. (If you have a preferred
127127
tool for exposing your local server, feel free to replace smee with it.) If you

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ following the instructions in the guide.
7474
Understanding the repository
7575
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7676

77-
Check out ``repo_map.txt`` in the root of the repository for a display of the
77+
Check out ``repository_map.txt`` in the root of the repository for a display of the
7878
repository layout and brief explanations for the purpose of each non-obvious file and
7979
directory.
8080

@@ -114,8 +114,8 @@ Setting up your users
114114
how the site behaves for both kinds of users.
115115

116116
.. _`django-allauth`: https://docs.allauth.org/en/latest/introduction/index.html
117-
.. _`GitHub`: https://django-allauth.readthedocs.io/en/latest/providers.html#github
118-
.. _`Google`: https://docs.allauth.org/en/latest/socialaccount/providers/github.html
117+
.. _`GitHub`: https://docs.allauth.org/en/latest/socialaccount/providers/github.html
118+
.. _`Google`: https://docs.allauth.org/en/latest/socialaccount/providers/google.html
119119

120120
Linting
121121
^^^^^^^

docs/howto.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@ How To - Project Documentation
44
Get Started
55
----------------------------------------------------------------------
66

7-
Documentation can be written as rst files in `democrasite/docs`.
7+
Documentation source files live in the ``docs/`` directory at the repository root.
88

99

10-
To build and serve docs, use the commands::
10+
To build and serve docs with live reload, start the local stack (including the ``docs``
11+
service) from the project root::
1112

12-
docker compose -f docker-compose.docs.yml up
13+
just up
1314

15+
The docs container serves Sphinx at http://localhost:9000/ (see ``docker-compose.local.yml``).
1416

15-
Changes to files in `docs` will be picked up and reloaded automatically.
17+
Changes to files under ``docs/`` and under ``democrasite/`` (watched by sphinx-autobuild)
18+
will be picked up and reloaded automatically.
1619

1720
`Sphinx <https://www.sphinx-doc.org/>`_ is the tool used to build documentation.
1821

docs/webiscite.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ creates a :class:`~democrasite.webiscite.models.PullRequest` instance.
2727

2828
If the user who created the pull request has a democrasite account, a new
2929
:class:`~democrasite.webiscite.models.Bill`
30-
is created with the information from the pull request and made visible on the
31-
homepage immediately. A :class:`~django_celery_beat.models.PeriodicTask` is
32-
also scheduled to execute :func:`~democrasite.webiscite.tasks.submit_bill`
33-
once the voting period ends.
30+
is created with the information from the pull request. If the pull request is
31+
still a GitHub draft, the bill stays in ``DRAFT`` status (no voting) until the
32+
PR is marked ready for review, which publishes it via
33+
:meth:`~democrasite.webiscite.webhooks.PullRequestHandler.ready_for_review`.
34+
Otherwise the bill is ``OPEN`` on the homepage. A
35+
:class:`~django_celery_beat.models.PeriodicTask` is scheduled to execute
36+
:func:`~democrasite.webiscite.tasks.submit_bill` once the voting period ends
37+
(enabled when the bill leaves ``DRAFT``).
3438

3539
:func:`~democrasite.webiscite.tasks.submit_bill` verifies that the pull
3640
request is still open and that its SHA has not changed since the bill was

0 commit comments

Comments
 (0)