Skip to content

Commit 626b142

Browse files
committed
chg: dev: update doc and project files, add minimal doorstop stub docs
* note readme needs an intro to doorstop and some normative items Signed-off-by: Stephen L Arnold <[email protected]>
1 parent debc615 commit 626b142

File tree

14 files changed

+231
-21
lines changed

14 files changed

+231
-21
lines changed

.gitchangelog.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
ignore_regexps = [
6262
r'^([cC]i)\s*:',
6363
r'dependabot',
64+
r'automated change',
6465
r'@minor', r'!minor',
6566
r'@cosmetic', r'!cosmetic',
6667
r'@refactor', r'!refactor',

README.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ with your own:
1919

2020
* change the project name at the top of ``pyproject.toml``
2121
* change the project name in ``docs/source/conf.py`` *and* ``docs/source/index.rst``
22+
* change the author and copyright names in all the doorstop doc and config files, ie
23+
+ ``find . -name .doorstop.yml`` and review/edit all files
24+
2225
* change the author details in ``pyproject.toml`` *and* ``docs/source/conf.py``
2326
* change the package directory name under the ``src`` folder
2427
* change the github URL paths in ``pyproject.toml``
@@ -267,10 +270,10 @@ specifications.
267270
:target: https://www.python.org/downloads/
268271
:alt: Python
269272

270-
.. |reuse| image:: https://api.reuse.software/badge/git.fsfe.org/reuse/api
271-
:target: https://api.reuse.software/info/git.fsfe.org/reuse/api
273+
.. |reuse| image:: https://img.shields.io/badge/REUSE-compliant-blue.svg
274+
:target: https://reuse.software/spec-3.3/
272275
:alt: REUSE status
273276

274277
.. |pre| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
275-
:target: https://github.com/pre-commit/pre-commit
276-
:alt: pre-commit
278+
:target: https://github.com/pre-commit/pre-commit
279+
:alt: pre-commit

docs/source/conf.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33

44
from datetime import datetime
55

6-
if sys.version_info < (3, 8):
7-
from importlib_metadata import version
8-
else:
9-
from importlib.metadata import version
6+
from importlib.metadata import version
107

118
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
129

@@ -49,14 +46,20 @@
4946
'sphinx.ext.coverage',
5047
'sphinx.ext.viewcode',
5148
'myst_parser',
49+
#'sphinxcontrib.mermaid',
5250
]
5351

52+
#myst_fence_as_directive = ["mermaid"]
53+
myst_suppress_warnings = ["myst.header"]
54+
myst_enable_extensions = ["attrs_inline", "deflist", "fieldlist", "substitution",]
55+
5456
# sphinxcontrib.apidoc
5557
apidoc_module_dir = f'../../src/{project}'
5658
apidoc_output_dir = 'api'
5759
apidoc_excluded_paths = ['scripts', 'tests']
5860
apidoc_module_first = True
5961
apidoc_separate_modules = True
62+
6063
autodoc_typehints = 'description'
6164

6265
# Add any paths that contain templates here, relative to this directory.

docs/source/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Simple API and SW Docs
1313
:maxdepth: 1
1414
:caption: Contents:
1515

16+
ds/reqs_tree
17+
ds/sw_design
18+
ds/unit_tests
1619
README
1720
api/modules
1821
dev/generate-changelog

docs/swd/.doorstop.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
settings:
2+
digits: 3
3+
itemformat: markdown
4+
parent: REQ
5+
prefix: SDD
6+
sep: ''
7+
extensions:
8+
item_sha_required: true # sha256
9+
attributes:
10+
defaults:
11+
doc:
12+
name: SW Design
13+
title: SW Design Description
14+
ref: ''
15+
by: tdeveloper
16+
major: '1'
17+
minor: A
18+
copyright: tdeveloper
19+
publish:
20+
- commentary
21+
- rationale

docs/swd/SDD001.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
active: true
3+
derived: false
4+
doc:
5+
by: tdeveloper
6+
copyright: tdeveloper
7+
major: '1'
8+
minor: A
9+
name: SW Design
10+
ref: ''
11+
title: SW Design Description
12+
level: 1.0
13+
links: []
14+
normative: false
15+
ref: ''
16+
reviewed: 4BiP2t0Xpr2CU1F7UpuJDZ8ZYba_FwhAHm7uXIphy2I=
17+
---
18+
19+
# Design Elements
20+
21+
The simple package provides a convenient example and baseline project
22+
structure for demonstrating current packaging standards with dynamic
23+
versioning using the core setuptools package and default PEP517 build
24+
backend.
25+
26+
The primary install dependencies are importlib-metadata, doorstop, and
27+
munch, where doorstop is primarily an offline dependency for managing
28+
requirements data. Complete package dependencies are shown in the
29+
figure below:
30+
31+
![simple software units](assets/simple_dependency_graph.svg)
32+
33+
<details>
34+
<summary>simple_dependency_graph source</summary>
35+
simple dependency graph showing primary software units.
36+
37+
```mermaid
38+
graph TB
39+
subgraph id1[simple Dependencies]
40+
subgraph id2[Python Packages]
41+
A(simple)
42+
B(importlib-metadata)
43+
C(munch)
44+
D{doorstop}
45+
end
46+
end
47+
A ==> B & C & D
48+
D -.-> A
49+
```
50+
</details>
51+
52+
## Design decisions
53+
54+
More text here.

docs/swd/assets/.gitkeep

Whitespace-only changes.

pyproject.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ authors = [
1818
]
1919

2020
classifiers = [
21-
"Development Status :: 3 - Alpha",
21+
"Development Status :: 4 - Beta",
2222
"Environment :: Console",
23+
"Framework :: tox",
2324
"Intended Audience :: Developers",
2425
"Operating System :: POSIX :: Linux",
2526
"Operating System :: Unix",
2627
"Programming Language :: Python :: 3",
2728
"Topic :: Documentation",
28-
"Topic :: Multimedia :: Graphics",
29+
"Topic :: Software Development",
2930
"Topic :: Software Development :: Libraries",
3031
"Topic :: Software Development :: Documentation",
3132
"Topic :: Software Development :: Testing",
@@ -40,6 +41,7 @@ requires-python = ">=3.9"
4041

4142
[project.optional-dependencies]
4243
dev = [
44+
"doorstop",
4345
"flake8",
4446
"isort",
4547
"mypy>=0.990",
@@ -52,12 +54,12 @@ cov = [
5254
]
5355
doc = [
5456
"sphinx",
55-
"sphinxcontrib.apidoc",
5657
"sphinx_git",
57-
"myst-parser",
58-
"sphinxcontrib.mermaid",
58+
"sphinxcontrib.apidoc",
5959
"sphinx_rtd_theme<3.0", # for the version display
6060
"sphinx-nefertiti",
61+
"myst-parser",
62+
#"sphinxcontrib.mermaid",
6163
]
6264
test = [
6365
"pytest",
@@ -85,7 +87,7 @@ markers = "subscript"
8587

8688
[tool.coverage.run]
8789
branch = true
88-
source_pkgs = ["src"]
90+
source_pkgs = ["src/simple"]
8991
omit = [
9092
"setup.py",
9193
"scripts",

reqs/.doorstop.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
settings:
2+
digits: 3
3+
itemformat: yaml
4+
prefix: REQ
5+
sep: ''
6+
attributes:
7+
reviewed:
8+
- short-name
9+
defaults:
10+
short-name: ''
11+
doc:
12+
name: simple
13+
title: Requirements for _simple_
14+
ref: ''
15+
by: tdeveloper
16+
major: '1'
17+
minor: A
18+
copyright: tdeveloper
19+
publish:
20+
- commentary
21+
- rationale
22+
- normative

reqs/REQ001.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
active: true
2+
derived: false
3+
doc:
4+
by: sarnold
5+
copyright: tdeveloper
6+
major: '1'
7+
minor: A
8+
name: simple
9+
ref: ''
10+
title: Requirements for _simple_
11+
header: ''
12+
level: 1.0
13+
links: []
14+
normative: false
15+
ref: ''
16+
reviewed: 3tp2D2vihFUgViix5tF_Ez6tAyWKm1Vd75Te-3kQ0xs=
17+
short-name: reqs_overview
18+
text: |
19+
Requirements overview
20+
21+
The simple package is intended to provide a simple but modern example of
22+
creating a project/package using setuptools/setuptools-scm with the latest
23+
metadata and default build backend for PEP517 compliance.
24+
25+
The main dependencies are shown below.
26+
27+
- [importlib-metadata](https://pypi.org/project/importlib-metadata/)
28+
- used for runtime version retrieval (for older Python)
29+
- [munch](https://github.com/Infinidat/munch)
30+
- an example convenience library for adding attribute access to dictionaries
31+
32+
The simple package should demonstrate the following items.
33+
34+
- project metadata and tool configuration in pyproject.toml
35+
- project docs with auto-generated requirements, SW design, and API/interfaces
36+
- getting-started setup doc and github/tox workflow automation
37+
- working pre-commit configuration and REUSE license compliance
38+
39+
> [!IMPORTANT]
40+
> The above item `short_name` is a custom doorstop attribute and
41+
> must be added to the doorstop config file, as well as populated
42+
> with the desired "alias" for the given item.

0 commit comments

Comments
 (0)