Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit ae67553

Browse files
committed
adding some ADRs
1 parent c5d01fc commit ae67553

13 files changed

+263
-11
lines changed

docs/developer/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ side-bar.
4343
:caption: Explanations
4444
:maxdepth: 1
4545

46-
explanations/decisions
47-
4846
+++
4947

5048
Explanations of how and why the architecture is why it is.

docs/developer/explanations/decisions/0001-record-architecture-decisions.rst renamed to docs/user/explanations/decisions/0001-record-architecture-decisions.rst

File renamed without changes.

docs/user/explanations/docs-structure.rst renamed to docs/user/explanations/decisions/0003-docs-structure.rst

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
About the documentation
2-
-----------------------
1+
3. Standard documentation structure
2+
===================================
3+
4+
Date: 2023-01-18
5+
6+
Status
7+
------
8+
9+
Accepted
10+
11+
Context
12+
-------
13+
14+
Skeleton based project's documentation requires organizing.
15+
16+
Decision
17+
--------
18+
19+
Use the approach proposed by David Laing.
320

421
:material-regular:`format_quote;2em`
522

@@ -16,3 +33,8 @@ approaches to their creation. Understanding the implications of this will help
1633
improve most documentation - often immensely.
1734

1835
`More information on this topic. <https://documentation.divio.com>`_
36+
37+
Consequences
38+
------------
39+
40+
See article linked above.

docs/user/explanations/why-src.rst renamed to docs/user/explanations/decisions/0004-why-src.rst

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1-
Why use a source directory
2-
==========================
1+
4. Use a source directory
2+
=========================
33

4-
This skeleton repo has made the decision to use a source directory. The reasons
5-
for this are set out in `Hynek's article`_ and summarized below.
4+
Date: 2023-01-18
5+
6+
Status
7+
------
8+
9+
Accepted
10+
11+
Context
12+
-------
13+
14+
We need to decide how to structure the source code in skeleton based projects.
15+
16+
17+
Decision
18+
--------
19+
20+
As per `Hynek's article`_ and summarized below.
621

722
.. _Hynek's article: https://hynek.me/articles/testing-packaging/
823

@@ -26,3 +41,8 @@ This is tested in CI in the following way:
2641
checks that all files needed for the tests are packaged with the distribution.
2742

2843
.. _editable install: https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs
44+
45+
Consequences
46+
------------
47+
48+
See the article linked above.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
5. Use pyproject.toml
2+
=====================
3+
4+
Date: 2023-01-18
5+
6+
Status
7+
------
8+
9+
Accepted
10+
11+
Context
12+
-------
13+
14+
Need a decision on where to put the python project configuration.
15+
16+
Decision
17+
--------
18+
19+
Use pyproject.toml as per https://peps.python.org/pep-0518/
20+
21+
22+
Consequences
23+
------------
24+
25+
See article linked above.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
6. Use setuptools_scm
2+
=====================
3+
4+
Date: 2023-01-18
5+
6+
Status
7+
------
8+
9+
Accepted
10+
11+
Context
12+
-------
13+
14+
We require a mechanism for generating version numbers in python.
15+
16+
Decision
17+
--------
18+
19+
Generate the version number from git tags using setuptools scm.
20+
21+
See https://github.com/pypa/setuptools_scm/
22+
23+
Consequences
24+
------------
25+
26+
Versions are generated automatically from git tags. This means you can
27+
can verify if you are running a released version of the code as
28+
setup tools scm adds a suffix to untagged commits.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
7. Installing developer environment
2+
===================================
3+
4+
Date: 2023-01-18
5+
6+
Status
7+
------
8+
9+
Accepted
10+
11+
Context
12+
-------
13+
14+
We need to provide a way to setup a developer environment for a skeleton based
15+
project.
16+
17+
Decision
18+
--------
19+
20+
Use optional dependencies in pyproject.toml.
21+
22+
PEP 621 provides a mechanism for adding optional dependencies in pyproject.toml
23+
https://peps.python.org/pep-0621/#dependencies-optional-dependencies.
24+
25+
We supply a list of developer dependencies under the title "dev". These
26+
developer dependencies enable building and testing the project and
27+
its documentation.
28+
29+
Consequences
30+
------------
31+
32+
Any developer can update their virtual environment in order to work on
33+
a skeleton based project with the command:
34+
35+
```bash
36+
pip install -e .[dev]
37+
```
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
8. Use tox and pre-commit
2+
=========================
3+
4+
Date: 2023-01-18
5+
6+
Status
7+
------
8+
9+
Accepted
10+
11+
Context
12+
-------
13+
14+
We require an easy way to locally run the same checks as CI. This provides a
15+
rapid inner-loop developer experience.
16+
17+
Decision
18+
--------
19+
20+
Use tox and pre-commit.
21+
22+
tox is an automation tool that we use to run all checks in parallel,
23+
see https://tox.wiki/en/latest/.
24+
25+
pre-commit provides a hook into git commit which runs some of the checks
26+
against the changes you are about to commit.
27+
28+
29+
Consequences
30+
------------
31+
32+
Running ``tox -p`` before pushing to GitHub verifies that the CI will *most
33+
likely* succeed.
34+
35+
Committing changes to git will run all of the non-time critical checks and
36+
help avoid some of the most common mistakes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
9. Sphinx Theme
2+
===============
3+
4+
Date: 2023-01-18
5+
6+
Status
7+
------
8+
9+
Accepted
10+
11+
Context
12+
-------
13+
14+
Documentation requires a theme as well as a structure.
15+
16+
Decision
17+
--------
18+
19+
Use the pydata theme defined here https://pydata-sphinx-theme.readthedocs.io/
20+
21+
Consequences
22+
------------
23+
24+
The documentation looks nice and has good navigation features.

0 commit comments

Comments
 (0)