Skip to content

Commit 3c3a667

Browse files
authored
Add architecture decision records (#6)
* Add architecture decision records * Update version, changelog, versioning ADR
1 parent 43ed03a commit 3c3a667

9 files changed

Lines changed: 117 additions & 3 deletions

.adr-dir

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/architecture/decisions/

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## Unreleased
9+
10+
## [0.0.2] - 2023-11-07
11+
12+
### Fixed
13+
14+
- Update help text to reflect repo-man program name
15+
- Remove useless help text epilog
16+
17+
## [0.0.1] - 2023-11-07
18+
19+
### Added
20+
21+
- List repositories configured with a given flavor
22+
- List repositories configured with more than one flavor
23+
- List repositories with no configured flavor
24+
- List configured flavors
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 1. Record architecture decisions
2+
3+
Date: 2023-11-07
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 [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
16+
17+
## Consequences
18+
19+
See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools).
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 2. Use alpha versioning during initial development
2+
3+
Date: 2023-11-07
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
Semantic versioning is a (sometimes) helpful communication tool to help users know when to expect they'll need to respond to, or at least be aware of, changes that break an API. Semantic versioning communicates a different set of concepts altogether than calendar versioning, and although it leaves room for subjectivity and human error is currently the prevailing approach.
12+
13+
During initial development of a project, many changes may be breaking changes. If semantic versioning is followed well during this phase, the outcome is a fast-increasing version number. By the time the project stabilizes, there may already have been tends or even hundreds of breaking changes.
14+
15+
Choosing the right semantic version also carries a mild cognitive burden and can create points of drawn out discussion. Left to these devices, initial development can be slowed by too much back-and-forth.
16+
17+
## Decision
18+
19+
Use alpha versioning during initial development such that all versions are monotonically increasing versions of the form `0.0.XYZ`.
20+
21+
## Consequences
22+
23+
- Consumers won't know when a change is breaking, and should assume *every* change is breaking
24+
- This decision will need to be amended once the project matures into a stable release pattern
25+
- There is sometimes confusion about versions like `0.0.996` and people try to install `0.99.6` or similar instead
26+
- Every released change during initial development will simply increase the last portion of the version string by one
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 3. Use a configuration file to store repository flavors
2+
3+
Date: 2023-11-07
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
Common approaches to tagging on file systems are filename embedding and sidecars[^1]. When working with repositories under version control, these approaches don't work well because they require changing file names or adding new files to the repository, both of which incur additional repository actions to commit, ignore, or otherwise manage the changes. Other approaches such as [macOS tags](https://support.apple.com/guide/mac-help/tag-files-and-folders-mchlp15236/mac) and [extended attributes](https://www.man7.org/linux/man-pages/man7/xattr.7.html) are either too platform-specific or don't work well at the command line.
12+
13+
These approaches mainly seek to be able to abstract the tagging implementation completely from the consumer. The consumer using repo-man is trusted instead to know a bit about the tagging system because if they have the problems repo-man solves they're already more likely to care about or be accepting of a mild level of configuration burden.
14+
15+
## Decision
16+
17+
Use a separate configuration file for tagging directories.
18+
19+
## Consequences
20+
21+
- No repository has to know about the details of repo-man at all
22+
- Consumers will need to know about and manage repo-man configuration, the burden of which can be mitigated by tooling
23+
- The repo-man file is prone to loss because it isn't under version control
24+
25+
[^1]: [https://unix.stackexchange.com/a/388201](https://unix.stackexchange.com/a/388201)

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3636
# ones.
3737
extensions = [
38+
'myst_parser',
3839
'sphinx.ext.intersphinx',
3940
'sphinx.ext.autodoc',
4041
'sphinx.ext.autodoc.typehints',

docs/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ Manage repositories of different flavors.
1010

1111
reference/modules
1212

13+
.. toctree::
14+
:glob:
15+
:caption: Architecture decision records:
16+
:hidden:
17+
18+
architecture/decisions/*
19+
1320
If you work in open source or as a cross-team individual contributor in your organization,
1421
you may have dozens of repositories cloned to your local machine.
1522
Those repositories may be of several different *flavors*, exhibiting a particular file structure or purpose.

setup.cfg

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = repo-man
3-
version = 0.0.1
3+
version = 0.0.2
44
description = Manage repositories of different flavors.
55
long_description = file: README.md
66
long_description_content_type = text/markdown
@@ -9,7 +9,18 @@ author = Dane Hillard
99
author_email = "Dane Hillard" <github@danehillard.com>
1010
license = MIT License
1111
license_files = LICENSE
12+
project_urls =
13+
Documentation=https://repo-man.readthedocs.org
14+
Source=https://github.com/easy-as-python/repo-man
15+
Tracker=https://github.com/easy-as-python/repo-man/issues
1216
classifiers =
17+
Development Status :: 5 - Production/Stable
18+
Intended Audience :: Developers
19+
Programming Language :: Python
20+
Programming Language :: Python :: 3.9
21+
Programming Language :: Python :: 3.12
22+
Programming Language :: Python :: 3
23+
Programming Language :: Python :: 3 :: Only
1324
License :: OSI Approved :: MIT License
1425

1526
[options]
@@ -31,6 +42,7 @@ console_scripts =
3142
[options.extras_require]
3243
docs =
3344
furo
45+
myst-parser
3446
sphinx
3547
sphinx-autobuild
3648

src/repoman/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@ def main():
100100
check_if_allowed(path)
101101

102102
parser = argparse.ArgumentParser(
103-
prog="./thing",
103+
prog="repoman",
104104
description="Manage repositories of different types",
105-
epilog="Cool, man.",
106105
)
107106

108107
configure_arguments(parser)

0 commit comments

Comments
 (0)