Skip to content

Commit abb3f16

Browse files
committed
Add ADRs to documentation
1 parent 0ec5428 commit abb3f16

8 files changed

+136
-1
lines changed

.adr-dir

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/source/design

docs/source/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
'sphinx.ext.intersphinx',
3939
'sphinx.ext.napoleon',
4040
'sphinx.ext.viewcode',
41+
'recommonmark'
4142
]
4243

4344
# Add any paths that contain templates here, relative to this directory.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# 1. Record architecture decisions
2+
3+
Date: 2021-03-01
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
We need to record the architectural decisions made on this project.
12+
13+
## Decision
14+
15+
We will use Architecture Decision Records, as
16+
[described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
17+
18+
## Consequences
19+
20+
See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's
21+
[adr-tools](https://github.com/npryce/adr-tools).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# 2. Choose STAC library
2+
3+
Date: 2021-03-01
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
We would like to use an existing Python library for working with STAC objects as Python objects. Ideally this library
12+
will meet the following requirements:
13+
14+
* **Actively maintained** to ensure that it is up-to-date with the latest STAC spec
15+
* **Well-documented** to reduce the documentation burden for this library
16+
* **Easily extensible** to allow us to take advantage of existing STAC object functionality
17+
18+
The 2 most obvious choices for Python STAC clients are
19+
[`PySTAC`](https://github.com/stac-utils/pystac) and [`sat-stac`](https://github.com/sat-utils/sat-stac).
20+
21+
### `PySTAC`
22+
23+
`PySTAC` is an actively maintained STAC client for Python 3. Its last release was less than 2 months ago and its last
24+
commit was less than 2 weeks ago. It has had 15 contributors within the last year and it supports the latest release
25+
candidate for the STAC spec (as well as previous releases). `PySTAC` hosts
26+
[documentation on ReadTheDocs](https://pystac.readthedocs.io/en/latest/) that includes a description of programming
27+
concepts related to the library, quickstart instructions, tutorials, and an API reference.
28+
29+
`PySTAC` supports both reading and writing of STAC objects. Extending `PySTAC` classes through inheritance is made a
30+
bit more difficult by the fact that some class methods (like ``from_dict``) have references to specific classes
31+
(like ``Catalog``) rather than using the ``cls`` argument. This will require us to overwrite some of these methods to
32+
implement inheritance. It has robust support for traversing catalogs using links. There is no existing support for the
33+
STAC API spec in `PySTAC` or any related tooling.
34+
35+
### `sat-stac`
36+
37+
`sat-stac` is an actively maintained STAC client for Python 3. Its last release was less than 2 months ago and its
38+
last commit was at that same time. It has had 2 contributors within the last year and it supports the latest release
39+
candidate for the STAC spec (as well as previous releases). `sat-stac` has installation documented in the GitHub repo's
40+
main README and has 2 tutorials in the form of Jupyter Notebooks in that repo.
41+
42+
`sat-stac` supports reading STAC catalogs (support for writing STAC catalogs was removed in v0.4.0). There is also an
43+
existing library for working with STAC API - Item Search results called
44+
[sat-search](https://github.com/sat-utils/sat-search) that uses `sat-stac` as its backend.
45+
46+
## Decision
47+
48+
We will use `PySTAC` as our "backend" for working with STAC objects in Python. While both libraries are well-maintained,
49+
`PySTAC` has more thorough documentation and seems to be more widely supported through community contribution.
50+
51+
## Consequences
52+
53+
We will need to create our own implementation of a STAC API - Item Search client since there is not existing tooling
54+
based on `PySTAC`. We will be able to point to the hosted documentation for `PySTAC` to guide users through existing
55+
functionality for navigating STAC Catalogs. Special care should be taken to ensure that we do not break any of
56+
`PySTAC`'s functionality through inheritance.

docs/source/design_decisions.rst

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Design Decisions
2+
================
3+
4+
`Architectural Design Records (ADRs)
5+
<https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions>`__ for major design decisions related to the
6+
library.
7+
8+
.. toctree::
9+
:glob:
10+
:maxdepth: 1
11+
12+
design/*

docs/source/index.rst

+11
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ with ``stac_api_client``.
6565

6666
api
6767

68+
Design Decisions
69+
----------------
70+
71+
We document significant design decisions using Architectural Design Records (ADRs), as described by Michael Nygard
72+
`here <https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions>`__.
73+
74+
.. toctree::
75+
:maxdepth: 2
76+
77+
design_decisions
78+
6879

6980
Indices and tables
7081
==================

poetry.lock

+33-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pytest-cov = "^2.11.1"
4141
pytest-recording = "^0.11.0"
4242
isort = "^5.7.0"
4343
vulture = "^2.3"
44+
recommonmark = "^0.7.1"
4445

4546
[build-system]
4647
requires = ["poetry-core>=1.0.0"]

0 commit comments

Comments
 (0)