-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
329 additions
and
399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Architectural Decision Records | ||
|
||
Architectural decisions are made throughout a project's lifetime. As a way of keeping track of these decisions, we record these decisions in Architecture Decision Records (ADRs) listed below. | ||
|
||
```{toctree} | ||
:glob: true | ||
:maxdepth: 1 | ||
decisions/* | ||
``` | ||
|
||
For more information on ADRs see this [blog by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). |
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
docs/explanations/decisions/0001-record-architecture-decisions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# 1. Record architecture decisions | ||
|
||
Date: 2022-02-18 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
We need to record the architectural decisions made on this project. | ||
|
||
## Decision | ||
|
||
We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). | ||
|
||
## Consequences | ||
|
||
See Michael Nygard's article, linked above. To create new ADRs we will copy and | ||
paste from existing ones. |
26 changes: 0 additions & 26 deletions
26
docs/explanations/decisions/0001-record-architecture-decisions.rst
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 2. Make a skeleton repository | ||
|
||
Date: 2022-06-18 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
Many projects start from some kind of template. These define some basic structure, customized with project specific variables, that developers can add their code into. One example of this is [cookiecutter](https://cookiecutter.readthedocs.io). | ||
|
||
The problem with this approach is that it is difficult to apply changes to the template into projects that have been cut from it. Individual changes have to be copy/pasted into the code, leading to partially applied fixes and missed updates. | ||
|
||
## Decision | ||
|
||
We will use a skeleton structure as defined in [Jaraco's blog](https://blog.jaraco.com/a-project-skeleton-for-python-projects/), using git to keep the downstream projects up to date. | ||
|
||
## Consequences | ||
|
||
We will need a cli module to ease the adoption of this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
(src)= | ||
|
||
# 4. Use a source directory | ||
|
||
Date: 2023-01-18 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
We need to decide how to structure the source code in skeleton based projects. | ||
|
||
## Decision | ||
|
||
As per [Hynek's article] and summarized below. | ||
|
||
The main advantage is that the source directory cannot shadow installed packages | ||
as it would if it was in the root of the repository. This means that if you | ||
install the package, then run the tests, they will run against the installed | ||
package and not the source directory, testing for packaging bugs. | ||
|
||
A secondary advantage is symmetry, sources go in `src/`, tests go in | ||
`tests\`, docs go in `docs`. | ||
|
||
This is tested in CI in the following way: | ||
|
||
- `wheel` job creates a wheel, then installs it in an isolated environment and | ||
runs the cli. This checks `install_requirements` are sufficient to run the | ||
cli. | ||
- `test` job with `lock: true` does an [editable install] of the | ||
package. This is the mode that is used at development time, as modifications | ||
to sources can be tested without reinstalling. | ||
- `test` job with `lock: false` does a regular install, which | ||
checks that all files needed for the tests are packaged with the distribution. | ||
|
||
## Consequences | ||
|
||
See the article linked above. | ||
|
||
[editable install]: https://pip.pypa.io/en/stable/cli/pip_install/#editable-installs | ||
[hynek's article]: https://hynek.me/articles/testing-packaging/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 5. Use pyproject.toml | ||
|
||
Date: 2023-01-18 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
Need a decision on where to put the python project configuration. | ||
|
||
## Decision | ||
|
||
Use pyproject.toml as per <https://peps.python.org/pep-0518/> | ||
|
||
## Consequences | ||
|
||
See article linked above. |
This file was deleted.
Oops, something went wrong.
17 changes: 6 additions & 11 deletions
17
...nations/decisions/0006-setuptools-scm.rst → ...anations/decisions/0006-setuptools-scm.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 8 additions & 13 deletions
21
...tions/decisions/0007-dev-dependencies.rst → ...ations/decisions/0007-dev-dependencies.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,32 @@ | ||
7. Installing developer environment | ||
=================================== | ||
# 7. Installing developer environment | ||
|
||
Date: 2023-01-18 | ||
|
||
Status | ||
------ | ||
## Status | ||
|
||
Accepted | ||
|
||
Context | ||
------- | ||
## Context | ||
|
||
We need to provide a way to setup a developer environment for a skeleton based | ||
project. | ||
|
||
Decision | ||
-------- | ||
## Decision | ||
|
||
Use optional dependencies in pyproject.toml. | ||
|
||
PEP 621 provides a mechanism for adding optional dependencies in pyproject.toml | ||
https://peps.python.org/pep-0621/#dependencies-optional-dependencies. | ||
<https://peps.python.org/pep-0621/#dependencies-optional-dependencies>. | ||
|
||
We supply a list of developer dependencies under the title "dev". These | ||
developer dependencies enable building and testing the project and | ||
its documentation. | ||
|
||
Consequences | ||
------------ | ||
## Consequences | ||
|
||
Any developer can update their virtual environment in order to work on | ||
a skeleton based project with the command: | ||
|
||
```bash | ||
`` `bash | ||
pip install -e .[dev] | ||
``` | ||
` `` |
Oops, something went wrong.