se-theory-reference-kit 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- se_theory_reference_kit-0.1.0/.editorconfig +125 -0
- se_theory_reference_kit-0.1.0/.gitattributes +130 -0
- se_theory_reference_kit-0.1.0/.github/.importlinter +17 -0
- se_theory_reference_kit-0.1.0/.github/.yamllint.yml +16 -0
- se_theory_reference_kit-0.1.0/.github/dependabot.yml +24 -0
- se_theory_reference_kit-0.1.0/.github/lychee.toml +48 -0
- se_theory_reference_kit-0.1.0/.github/workflows/ci-python-zensical.yml +112 -0
- se_theory_reference_kit-0.1.0/.github/workflows/deploy-zensical.yml +125 -0
- se_theory_reference_kit-0.1.0/.github/workflows/links.yml +53 -0
- se_theory_reference_kit-0.1.0/.github/workflows/pre-release.yml +170 -0
- se_theory_reference_kit-0.1.0/.github/workflows/release-pypi.yml +189 -0
- se_theory_reference_kit-0.1.0/.gitignore +125 -0
- se_theory_reference_kit-0.1.0/.markdownlint-cli2.yaml +60 -0
- se_theory_reference_kit-0.1.0/.pre-commit-config.yaml +132 -0
- se_theory_reference_kit-0.1.0/.python-version +1 -0
- se_theory_reference_kit-0.1.0/.vscode/ABOUT.md +21 -0
- se_theory_reference_kit-0.1.0/.vscode/extensions.json +48 -0
- se_theory_reference_kit-0.1.0/.vscode/settings.json +37 -0
- se_theory_reference_kit-0.1.0/AGENTS.md +168 -0
- se_theory_reference_kit-0.1.0/CHANGELOG.md +125 -0
- se_theory_reference_kit-0.1.0/CITATION.cff +48 -0
- se_theory_reference_kit-0.1.0/DECISIONS.md +324 -0
- se_theory_reference_kit-0.1.0/LICENSE +21 -0
- se_theory_reference_kit-0.1.0/PKG-INFO +172 -0
- se_theory_reference_kit-0.1.0/README.md +113 -0
- se_theory_reference_kit-0.1.0/SE_MANIFEST.toml +111 -0
- se_theory_reference_kit-0.1.0/docs/en/api/index.md +35 -0
- se_theory_reference_kit-0.1.0/docs/en/architecture.md +94 -0
- se_theory_reference_kit-0.1.0/docs/en/commands.md +10 -0
- se_theory_reference_kit-0.1.0/docs/en/index.md +69 -0
- se_theory_reference_kit-0.1.0/docs/index.md +10 -0
- se_theory_reference_kit-0.1.0/docs/tools/generate_api.py +38 -0
- se_theory_reference_kit-0.1.0/pyproject.toml +210 -0
- se_theory_reference_kit-0.1.0/rel.ps1 +146 -0
- se_theory_reference_kit-0.1.0/shape.ps1 +16 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/__init__.py +1 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/_version.py +24 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/base/__init__.py +51 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/base/errors.py +25 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/base/io.py +67 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/base/json_utils.py +78 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/base/paths.py +168 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/base/results.py +183 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/cli.py +5 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/commands/__init__.py +1 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/commands/_context.py +115 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/commands/catalog.py +87 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/commands/export.py +68 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/commands/inspect.py +66 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/commands/root.py +48 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/commands/scaffold.py +35 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/commands/validate.py +50 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/declarations/__init__.py +13 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/declarations/config.py +24 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/declarations/export_spec.py +18 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/declarations/index.py +86 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/declarations/surface.py +53 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/export/__init__.py +21 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/export/catalog.py +66 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/export/engine.py +170 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/lean/__init__.py +34 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/lean/declarations.py +99 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/lean/modules.py +88 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/lean/spec.py +52 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/lean/surface.py +41 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/load.py +18 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/py.typed +0 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/reference/__init__.py +47 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/reference/artifacts.py +161 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/reference/registry.py +164 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/reference/stubs.py +63 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/reference/validation.py +85 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/__init__.py +32 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/checks/__init__.py +1 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/checks/export.py +66 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/checks/lean_surface.py +64 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/checks/reference_artifacts.py +82 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/checks/reference_index.py +43 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/checks/strict.py +85 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/context.py +54 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/defaults.py +64 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/registry.py +101 -0
- se_theory_reference_kit-0.1.0/src/se_theory_reference_kit/validation/runner.py +110 -0
- se_theory_reference_kit-0.1.0/tests/test_commands_context.py +68 -0
- se_theory_reference_kit-0.1.0/tests/test_declarations.py +49 -0
- se_theory_reference_kit-0.1.0/tests/test_export.py +140 -0
- se_theory_reference_kit-0.1.0/tests/test_lean.py +115 -0
- se_theory_reference_kit-0.1.0/tests/test_load.py +17 -0
- se_theory_reference_kit-0.1.0/tests/test_paths.py +80 -0
- se_theory_reference_kit-0.1.0/tests/test_reference.py +135 -0
- se_theory_reference_kit-0.1.0/tests/test_validation.py +176 -0
- se_theory_reference_kit-0.1.0/uv.lock +641 -0
- se_theory_reference_kit-0.1.0/zensical.toml +62 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .editorconfig (Keep files consistent across editors and IDEs)
|
|
3
|
+
# ============================================================
|
|
4
|
+
|
|
5
|
+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .editorconfig.
|
|
6
|
+
# WHY: Establish a cross-editor baseline so diffs stay clean and formatting is consistent.
|
|
7
|
+
# ALT: Repository may omit .editorconfig ONLY if formatting is enforced equivalently by CI and formatter tooling.
|
|
8
|
+
# CUSTOM: Adjust indent_size defaults only if organizational standards change; keep stable across projects.
|
|
9
|
+
# NOTE: Sections are ordered by editorial importance, not strict alphabetical order.
|
|
10
|
+
# EditorConfig is documented at https://editorconfig.org
|
|
11
|
+
|
|
12
|
+
root = true
|
|
13
|
+
|
|
14
|
+
# === Global defaults (always apply) ===
|
|
15
|
+
|
|
16
|
+
[*]
|
|
17
|
+
# WHY: Normalize line endings and encoding across Windows, macOS, and Linux.
|
|
18
|
+
end_of_line = lf
|
|
19
|
+
charset = utf-8
|
|
20
|
+
|
|
21
|
+
# WHY: Newline at EOF avoids noisy diffs and tool warnings.
|
|
22
|
+
insert_final_newline = true
|
|
23
|
+
|
|
24
|
+
# WHY: Remove accidental whitespace noise in diffs.
|
|
25
|
+
trim_trailing_whitespace = true
|
|
26
|
+
|
|
27
|
+
# WHY: Default to 2 spaces for configs and markup; language-specific overrides follow.
|
|
28
|
+
indent_style = space
|
|
29
|
+
indent_size = 2
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# === Build systems (special rules) ===
|
|
33
|
+
|
|
34
|
+
[Makefile]
|
|
35
|
+
# WHY: Makefiles require tabs.
|
|
36
|
+
indent_style = tab
|
|
37
|
+
|
|
38
|
+
[*.mk]
|
|
39
|
+
# WHY: Makefile includes require tabs.
|
|
40
|
+
indent_style = tab
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# === Citation and metadata ===
|
|
44
|
+
|
|
45
|
+
[CITATION.cff]
|
|
46
|
+
# WHY: Citation tooling expects stable YAML formatting.
|
|
47
|
+
indent_size = 2
|
|
48
|
+
indent_style = space
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# === Markup and documentation ===
|
|
52
|
+
|
|
53
|
+
[*.md]
|
|
54
|
+
# WHY: Keep Markdown clean; use explicit <br> for hard line breaks.
|
|
55
|
+
indent_size = 2
|
|
56
|
+
trim_trailing_whitespace = true
|
|
57
|
+
|
|
58
|
+
[*.{tex,cls,sty}]
|
|
59
|
+
# WHY: LaTeX convention is 2 spaces.
|
|
60
|
+
indent_size = 2
|
|
61
|
+
indent_style = space
|
|
62
|
+
|
|
63
|
+
[*.xml]
|
|
64
|
+
# WHY: XML convention is 2 spaces.
|
|
65
|
+
indent_size = 2
|
|
66
|
+
indent_style = space
|
|
67
|
+
|
|
68
|
+
[*.{yml,yaml}]
|
|
69
|
+
# WHY: YAML convention is 2 spaces.
|
|
70
|
+
indent_size = 2
|
|
71
|
+
indent_style = space
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
# === Data and configuration ===
|
|
75
|
+
|
|
76
|
+
[*.{json,jsonc,jsonl,ndjson}]
|
|
77
|
+
# WHY: JSON tooling typically expects 2 spaces.
|
|
78
|
+
indent_size = 2
|
|
79
|
+
indent_style = space
|
|
80
|
+
|
|
81
|
+
[*.toml]
|
|
82
|
+
# WHY: TOML often follows 4-space indentation in many projects.
|
|
83
|
+
indent_size = 4
|
|
84
|
+
indent_style = space
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# === Programming languages ===
|
|
88
|
+
|
|
89
|
+
[*.{js,ts}]
|
|
90
|
+
# WHY: JS/TS ecosystem commonly uses 2 spaces.
|
|
91
|
+
indent_size = 2
|
|
92
|
+
indent_style = space
|
|
93
|
+
|
|
94
|
+
[*.{py,pyi}]
|
|
95
|
+
# WHY: Python convention is 4 spaces.
|
|
96
|
+
indent_size = 4
|
|
97
|
+
indent_style = space
|
|
98
|
+
|
|
99
|
+
[*.ps1]
|
|
100
|
+
# WHY: PowerShell convention is 4 spaces.
|
|
101
|
+
indent_size = 4
|
|
102
|
+
indent_style = space
|
|
103
|
+
|
|
104
|
+
[*.{c,cpp,h,java,cs,go,rs}]
|
|
105
|
+
# WHY: Many C-family and systems languages commonly use 4 spaces.
|
|
106
|
+
indent_size = 4
|
|
107
|
+
indent_style = space
|
|
108
|
+
|
|
109
|
+
[*.{sh,bash}]
|
|
110
|
+
# WHY: Shell script convention is 2 spaces.
|
|
111
|
+
indent_size = 2
|
|
112
|
+
indent_style = space
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# === Proof assistants and formal languages ===
|
|
116
|
+
|
|
117
|
+
[*.lean]
|
|
118
|
+
# WHY: Lean 4 convention is 2 spaces; matches Mathlib and stdlib style.
|
|
119
|
+
indent_size = 2
|
|
120
|
+
indent_style = space
|
|
121
|
+
|
|
122
|
+
[*.{v,vo}]
|
|
123
|
+
# WHY: Coq convention is 2 spaces.
|
|
124
|
+
indent_size = 2
|
|
125
|
+
indent_style = space
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .gitattributes (Keep files consistent across operating systems)
|
|
3
|
+
# ============================================================
|
|
4
|
+
|
|
5
|
+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .gitattributes.
|
|
6
|
+
# WHY: Ensure consistent line endings, diff behavior, and file classification
|
|
7
|
+
# across Windows, macOS, and Linux environments.
|
|
8
|
+
# ALT: Repository may omit .gitattributes ONLY if equivalent normalization is
|
|
9
|
+
# enforced reliably by tooling and CI (rare and fragile).
|
|
10
|
+
# CUSTOM: Update file-type rules only when introducing new languages,
|
|
11
|
+
# binary artifacts, or documentation formats.
|
|
12
|
+
# NOTE: Rules are ordered by impact and generality, not alphabetically.
|
|
13
|
+
# Git attributes are documented at https://git-scm.com/docs/gitattributes
|
|
14
|
+
|
|
15
|
+
# === Core defaults (always apply) ===
|
|
16
|
+
|
|
17
|
+
# WHY: Auto-detect text files and normalize line endings to avoid cross-platform drift.
|
|
18
|
+
* text=auto
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# === Programming languages and scripts ===
|
|
22
|
+
|
|
23
|
+
# WHY: Python and shell scripts must use LF for CI/CD, Linux environments, and containers.
|
|
24
|
+
*.py text eol=lf
|
|
25
|
+
*.sh text eol=lf
|
|
26
|
+
|
|
27
|
+
# WHY: PowerShell convention on Windows uses CRLF.
|
|
28
|
+
*.ps1 text eol=crlf
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# === Markup and documentation ===
|
|
32
|
+
|
|
33
|
+
# WHY: Documentation and markup files use LF; standard for cross-platform tooling.
|
|
34
|
+
*.md text eol=lf
|
|
35
|
+
*.tex text eol=lf
|
|
36
|
+
*.sty text eol=lf
|
|
37
|
+
*.cls text eol=lf
|
|
38
|
+
*.bib text eol=lf
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# === Configuration and structured text ===
|
|
42
|
+
|
|
43
|
+
# WHY: Configuration and structured text formats use LF for stable diffs.
|
|
44
|
+
*.json text eol=lf
|
|
45
|
+
*.jsonc text eol=lf
|
|
46
|
+
*.jsonl text eol=lf
|
|
47
|
+
*.ndjson text eol=lf
|
|
48
|
+
*.toml text eol=lf
|
|
49
|
+
*.yaml text eol=lf
|
|
50
|
+
*.yml text eol=lf
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# === Proof assistants and formal languages ===
|
|
54
|
+
|
|
55
|
+
# WHY: Lean source files must use LF for cross-platform consistency and CI.
|
|
56
|
+
*.lean text eol=lf
|
|
57
|
+
|
|
58
|
+
# WHY: Lean build artifacts are binary; prevent normalization and meaningless diffs.
|
|
59
|
+
*.olean binary
|
|
60
|
+
*.ilean binary
|
|
61
|
+
*.trace binary
|
|
62
|
+
|
|
63
|
+
# WHY: Coq source uses LF; compiled objects are binary.
|
|
64
|
+
*.v text eol=lf
|
|
65
|
+
*.vo binary
|
|
66
|
+
*.vok binary
|
|
67
|
+
*.vos binary
|
|
68
|
+
*.glob binary
|
|
69
|
+
|
|
70
|
+
# WHY: Lake build directory should be excluded, but if tracked, treat as binary.
|
|
71
|
+
.lake/** binary
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
# === Notebooks ===
|
|
75
|
+
|
|
76
|
+
# WHY: Jupyter notebooks require specialized diff and merge handling.
|
|
77
|
+
*.ipynb diff=jupyternotebook
|
|
78
|
+
*.ipynb merge=jupyternotebook
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# === Databases (binary) ===
|
|
82
|
+
|
|
83
|
+
# WHY: Database files are binary; prevent text normalization and meaningless diffs.
|
|
84
|
+
*.db binary
|
|
85
|
+
*.duckdb binary
|
|
86
|
+
*.sqlite binary
|
|
87
|
+
*.sqlite3 binary
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
# === Columnar and analytical data (binary) ===
|
|
91
|
+
|
|
92
|
+
# WHY: Columnar and analytical data formats are binary; diffs are not meaningful.
|
|
93
|
+
*.arrow binary
|
|
94
|
+
*.avro binary
|
|
95
|
+
*.feather binary
|
|
96
|
+
*.orc binary
|
|
97
|
+
*.parquet binary
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# === Office, BI, PDFs, and compressed artifacts (binary) ===
|
|
101
|
+
|
|
102
|
+
# WHY: Office documents, BI files, PDFs, and compressed artifacts are binary.
|
|
103
|
+
*.7z binary
|
|
104
|
+
*.bz2 binary
|
|
105
|
+
*.docx binary
|
|
106
|
+
*.gz binary
|
|
107
|
+
*.pbix binary
|
|
108
|
+
*.pbit binary
|
|
109
|
+
*.pdf binary
|
|
110
|
+
*.pptx binary
|
|
111
|
+
*.rar binary
|
|
112
|
+
*.tar binary
|
|
113
|
+
*.tgz binary
|
|
114
|
+
*.xls binary
|
|
115
|
+
*.xlsm binary
|
|
116
|
+
*.xlsx binary
|
|
117
|
+
*.xz binary
|
|
118
|
+
*.zip binary
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
# === GitHub metadata and UI ===
|
|
122
|
+
|
|
123
|
+
# WHY: Exclude documentation and tests from GitHub language statistics.
|
|
124
|
+
docs/** linguist-documentation
|
|
125
|
+
tests/** linguist-documentation
|
|
126
|
+
|
|
127
|
+
# === LOG FILES ===
|
|
128
|
+
# WHY: Log files are typically large and binary in nature; prevent text normalization.
|
|
129
|
+
*.log binary
|
|
130
|
+
project.log binary
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# .github/.importlinter
|
|
2
|
+
# contract checks (should be all kept, 0 broken)
|
|
3
|
+
# $env:PYTHONPATH = "src"
|
|
4
|
+
# uvx --python 3.13 --from import-linter lint-imports --config .github/.importlinter
|
|
5
|
+
|
|
6
|
+
[importlinter]
|
|
7
|
+
root_package = se_theory_reference_kit
|
|
8
|
+
|
|
9
|
+
[importlinter:contract:layers]
|
|
10
|
+
name = SE reference kit layering
|
|
11
|
+
type = layers
|
|
12
|
+
layers =
|
|
13
|
+
se_theory_reference_kit.validation
|
|
14
|
+
se_theory_reference_kit.export
|
|
15
|
+
se_theory_reference_kit.reference
|
|
16
|
+
se_theory_reference_kit.declarations
|
|
17
|
+
se_theory_reference_kit.base
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .github/.yamllint.yml (Keep YAML files clean and consistent)
|
|
3
|
+
# ============================================================
|
|
4
|
+
# Updated: 2026-04-13
|
|
5
|
+
|
|
6
|
+
# WHY: Enforce YAML correctness (.github/.yamllint.yml) without arbitrary style constraints.
|
|
7
|
+
# OBS: Default yamllint rules conflict with GitHub Actions YAML.
|
|
8
|
+
# Line length, document start, truthy, and comment spacing are intentionally disabled.
|
|
9
|
+
|
|
10
|
+
extends: default
|
|
11
|
+
|
|
12
|
+
rules:
|
|
13
|
+
line-length: disable
|
|
14
|
+
document-start: disable
|
|
15
|
+
truthy: disable
|
|
16
|
+
comments: disable
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .github/dependabot.yml (Check for GitHub Actions updates)
|
|
3
|
+
# ============================================================
|
|
4
|
+
# REQ.PROJECT: This repository SHOULD track GitHub Actions updates automatically.
|
|
5
|
+
# WHY-FILE: GitHub Actions are executable dependencies and may receive security or behavior updates.
|
|
6
|
+
# OBS: Language-level dependencies (e.g., Python packages) are upgraded manually.
|
|
7
|
+
# OBS: GitHub Actions are the only dependency class automated here.
|
|
8
|
+
# ALT: Dependabot could be omitted if workflows are pinned and reviewed manually.
|
|
9
|
+
# CUSTOM: Update interval if CI cadence or security posture changes.
|
|
10
|
+
|
|
11
|
+
# NOTE: This file automatically updates the versions used in Actions workflows.
|
|
12
|
+
# You don't need to modify this file.
|
|
13
|
+
# To disable: Delete this file or set enabled: false below.
|
|
14
|
+
# enabled: false # Uncomment to disable Dependabot
|
|
15
|
+
|
|
16
|
+
version: 2 # Dependabot configuration version
|
|
17
|
+
|
|
18
|
+
updates:
|
|
19
|
+
- package-ecosystem: "github-actions" # Dependency type
|
|
20
|
+
directory: "/" # Location of GitHub Actions workflows
|
|
21
|
+
schedule:
|
|
22
|
+
interval: "monthly" # ALT: Use "weekly" for higher security when needed
|
|
23
|
+
commit-message:
|
|
24
|
+
prefix: "(deps)" # WHY: enable filtering by commit type
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .github/lychee.toml (Lychee link checker configuration)
|
|
3
|
+
# ============================================================
|
|
4
|
+
# Updated: 2026-04-13
|
|
5
|
+
|
|
6
|
+
# REQ.PROJECT: Automatic link checking using GitHub Actions and Lychee.
|
|
7
|
+
# WHY-FILE: Shared Lychee configuration (lychee.toml) for documentation-heavy repositories.
|
|
8
|
+
# REQ: Link checking MUST be reliable and CI-safe.
|
|
9
|
+
# WHY: Configures Lychee link checker behavior for CI/CD.
|
|
10
|
+
# OBS: Flat structure required by lychee v0.22+; no nested sections.
|
|
11
|
+
# OBS: No path exclusions; all documentation files are expected to be link-clean.
|
|
12
|
+
# OBS: Link integrity preserves stable, reconstructible references over time.
|
|
13
|
+
# OBS: Link integrity maintains connections to external resources.
|
|
14
|
+
|
|
15
|
+
# WHY: Control verbosity and CI-friendly output
|
|
16
|
+
verbose = "info" # WHY: Balance between detail and noise
|
|
17
|
+
no_progress = true # WHY: Progress bars don't work well in CI logs
|
|
18
|
+
|
|
19
|
+
# WHY: Performance tuning for link checking
|
|
20
|
+
max_concurrency = 6 # WHY: Parallel requests without overwhelming servers
|
|
21
|
+
max_retries = 3 # WHY: Retry flaky connections before failing
|
|
22
|
+
retry_wait_time = 8 # WHY: Wait 8 seconds between retries
|
|
23
|
+
timeout = 30 # WHY: 30 seconds per request before timeout
|
|
24
|
+
|
|
25
|
+
# WHY: Accept common status codes that don't indicate broken links
|
|
26
|
+
# OBS: 403 and 429 reduce false positives
|
|
27
|
+
accept = [
|
|
28
|
+
200, # OK
|
|
29
|
+
206, # Partial content
|
|
30
|
+
301, # Moved permanently
|
|
31
|
+
302, # Found (temporary redirect)
|
|
32
|
+
307, # Temporary redirect
|
|
33
|
+
308, # Permanent redirect
|
|
34
|
+
403, # Forbidden (often false positive)
|
|
35
|
+
429, # Too many requests (rate limiting)
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
# WHY: Exclude patterns that shouldn't be checked
|
|
39
|
+
exclude = [
|
|
40
|
+
"^https://shields\\.io", # WHY: Shields.io badges often have anti-bot measures that cause false positives
|
|
41
|
+
"^https://img\\.shields\\.io", # WHY: Shields.io image badges often have anti-bot measures that cause false positives
|
|
42
|
+
"^https://badges\\.github\\.com", # WHY: GitHub badges often have anti-bot measures that cause false positives
|
|
43
|
+
"^https://www\\.linkedin\\.com", # WHY: LinkedIn often blocks automated requests, causing false positives
|
|
44
|
+
"example\\.com", # WHY: Exclude example domains in documentation
|
|
45
|
+
"localhost", # WHY: Exclude local development URLs
|
|
46
|
+
"127\\.0\\.0\\.1", # WHY: Exclude local loopback
|
|
47
|
+
"\\.local", # WHY: Exclude local network domains
|
|
48
|
+
]
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .github/workflows/ci-python-zensical.yml (Continuous Integration)
|
|
3
|
+
# ============================================================
|
|
4
|
+
# Updated: 2026-06-01 (pypi ci)
|
|
5
|
+
#
|
|
6
|
+
# WHY-FILE: Validate repository hygiene, Python correctness, and documentation builds.
|
|
7
|
+
#
|
|
8
|
+
# === COVERAGE ===
|
|
9
|
+
#
|
|
10
|
+
# COVERED BY PRE-COMMIT - not repeated as explicit steps:
|
|
11
|
+
# - ruff-check (lint with autofix)
|
|
12
|
+
# - ruff-format (formatting)
|
|
13
|
+
# - trailing whitespace, line endings, JSON/TOML/YAML syntax, large files
|
|
14
|
+
#
|
|
15
|
+
# WHY SEPARATE: These tools are slower, require the full environment,
|
|
16
|
+
# or produce output worth seeing in CI logs independently.
|
|
17
|
+
|
|
18
|
+
name: CI (Python + Zensical)
|
|
19
|
+
|
|
20
|
+
on:
|
|
21
|
+
push:
|
|
22
|
+
branches: [main] # WHY: Validate every push to main.
|
|
23
|
+
pull_request:
|
|
24
|
+
branches: [main] # WHY: Validate PRs before merge.
|
|
25
|
+
workflow_dispatch: # WHY: Allow manual trigger from Actions tab.
|
|
26
|
+
|
|
27
|
+
permissions:
|
|
28
|
+
contents: read # WHY: Least privilege; CI only reads, never writes.
|
|
29
|
+
|
|
30
|
+
env:
|
|
31
|
+
PYTHONUNBUFFERED: "1" # WHY: Real-time log output in CI.
|
|
32
|
+
PYTHONIOENCODING: "utf-8" # WHY: Consistent encoding across platforms.
|
|
33
|
+
PYTHON_VERSION: "3.15"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
jobs:
|
|
37
|
+
ci:
|
|
38
|
+
name: Repository / Python checks and Zensical build
|
|
39
|
+
runs-on: ubuntu-latest # WHY: Linux matches most production deployments.
|
|
40
|
+
timeout-minutes: 30 # WHY: Fail fast if a step hangs unexpectedly.
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
# ============================================================
|
|
44
|
+
# A) ASSEMBLE: Checkout code and set up environment
|
|
45
|
+
# ============================================================
|
|
46
|
+
|
|
47
|
+
- name: A1) Checkout repository code
|
|
48
|
+
uses: actions/checkout@v6
|
|
49
|
+
# WHY: Required so all subsequent steps can access repo files.
|
|
50
|
+
|
|
51
|
+
- name: A2) Install uv (with caching)
|
|
52
|
+
uses: astral-sh/setup-uv@v7
|
|
53
|
+
with:
|
|
54
|
+
enable-cache: true
|
|
55
|
+
# WHY: Cache the uv tool itself for faster subsequent runs.
|
|
56
|
+
cache-dependency-glob: "uv.lock"
|
|
57
|
+
# WHY: Invalidate cache only when locked dependencies change.
|
|
58
|
+
|
|
59
|
+
- name: A3) Install Python ${{ env.PYTHON_VERSION }}
|
|
60
|
+
run: uv python install ${{ env.PYTHON_VERSION }}
|
|
61
|
+
# WHY: Ensures the pinned Python version is available in CI.
|
|
62
|
+
# OBS: Does not modify the repo; uv manages the interpreter locally.
|
|
63
|
+
|
|
64
|
+
- name: A4) Install all dependencies
|
|
65
|
+
run: uv sync --extra dev --extra docs --upgrade
|
|
66
|
+
# WHY: Install dev and docs extras so all check and build tools are available.
|
|
67
|
+
# OBS: --upgrade ensures CI catches dependency drift early.
|
|
68
|
+
|
|
69
|
+
- name: A5) Show tool versions
|
|
70
|
+
run: |
|
|
71
|
+
uv --version
|
|
72
|
+
uv run python --version
|
|
73
|
+
uv run python -m ruff --version
|
|
74
|
+
uv run python -m pyright --version
|
|
75
|
+
if [ -f "zensical.toml" ]; then
|
|
76
|
+
uv run python -m zensical --version
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
- name: A6) Run pre-commit on all files
|
|
80
|
+
run: uv tool run pre-commit run --all-files
|
|
81
|
+
|
|
82
|
+
# ============================================================
|
|
83
|
+
# B) BASELINE CHECKS: Tools not covered by pre-commit
|
|
84
|
+
# ============================================================
|
|
85
|
+
- name: B1) Run Pyright type checker
|
|
86
|
+
run: uv run python -m pyright
|
|
87
|
+
|
|
88
|
+
# ============================================================
|
|
89
|
+
# C) COVERAGE & TESTING: Python tests (pytest)
|
|
90
|
+
# ============================================================
|
|
91
|
+
|
|
92
|
+
- name: C1) Run pytest
|
|
93
|
+
run: uv run python -m pytest
|
|
94
|
+
|
|
95
|
+
# ============================================================
|
|
96
|
+
# D) Docs build (no deployment)
|
|
97
|
+
# ============================================================
|
|
98
|
+
|
|
99
|
+
- name: D1) Build documentation with Zensical
|
|
100
|
+
run: |
|
|
101
|
+
if [ -f "zensical.toml" ]; then
|
|
102
|
+
uv run python -m zensical build
|
|
103
|
+
else
|
|
104
|
+
echo "No zensical.toml found; skipping docs build."
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
# ============================================================
|
|
108
|
+
# E) Execute local cli commands for additional checks
|
|
109
|
+
# ============================================================
|
|
110
|
+
|
|
111
|
+
- name: E1) Validate repository manifest against schema
|
|
112
|
+
run: uvx --from se-manifest-schema se-manifest validate-manifest --path SE_MANIFEST.toml --strict
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .github/workflows/deploy-zensical.yml (Deploy Docs)
|
|
3
|
+
# ============================================================
|
|
4
|
+
# Updated: 2026-06-01 (pypi docs deploy)
|
|
5
|
+
#
|
|
6
|
+
# WHY-FILE: Build and deploy documentation to GitHub Pages on pushes to main.
|
|
7
|
+
#
|
|
8
|
+
# REQ: Repo Settings -> Pages -> Build and deployment -> Source:
|
|
9
|
+
# GitHub Actions
|
|
10
|
+
# WHY: Without this setting, the deploy-pages action will fail with a 403.
|
|
11
|
+
#
|
|
12
|
+
# OBS: This workflow deploys only. Correctness of the build is validated
|
|
13
|
+
# by ci-python-zensical.yml before merging to main.
|
|
14
|
+
# OBS: Deployment runs after CI passes on push to main, not on PRs.
|
|
15
|
+
# WHY: PRs use CI to validate; deployment only happens on confirmed main commits.
|
|
16
|
+
|
|
17
|
+
name: Docs Deploy (Zensical)
|
|
18
|
+
|
|
19
|
+
on:
|
|
20
|
+
push:
|
|
21
|
+
branches: [main] # WHY: Deploy on every confirmed push to main.
|
|
22
|
+
workflow_dispatch: # WHY: Allow manual redeploy from Actions tab if needed.
|
|
23
|
+
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read # WHY: Needed to checkout code.
|
|
26
|
+
pages: write # WHY: Required to deploy to GitHub Pages.
|
|
27
|
+
id-token: write # WHY: Required by deploy-pages for OIDC authentication.
|
|
28
|
+
|
|
29
|
+
env:
|
|
30
|
+
PYTHONUNBUFFERED: "1" # WHY: Real-time log output in CI.
|
|
31
|
+
PYTHONIOENCODING: "utf-8" # WHY: Consistent encoding across platforms.
|
|
32
|
+
PYTHON_VERSION: "3.15"
|
|
33
|
+
|
|
34
|
+
concurrency:
|
|
35
|
+
group: github-pages
|
|
36
|
+
# WHY: Pages is a single deployment environment per repo. A static group
|
|
37
|
+
# serializes every Pages deploy across all workflows and refs, so a
|
|
38
|
+
# tag-triggered docs deploy cannot race a main-push deploy.
|
|
39
|
+
# OBS: Any other workflow that deploys to Pages must reuse this exact group.
|
|
40
|
+
cancel-in-progress: false
|
|
41
|
+
# WHY: Never cancel a live deployment. Let the in-progress run finish and
|
|
42
|
+
# skip intermediate queued runs, keeping only the latest.
|
|
43
|
+
|
|
44
|
+
jobs:
|
|
45
|
+
docs:
|
|
46
|
+
name: Deploy Documentation site
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
timeout-minutes: 30 # WHY: Fail fast if a step hangs unexpectedly.
|
|
49
|
+
|
|
50
|
+
steps:
|
|
51
|
+
# ============================================================
|
|
52
|
+
# A) ASSEMBLE: Checkout code and set up environment
|
|
53
|
+
# ============================================================
|
|
54
|
+
|
|
55
|
+
- name: A1) Checkout repository code
|
|
56
|
+
uses: actions/checkout@v6
|
|
57
|
+
# WHY: Required so all subsequent steps can access repo files.
|
|
58
|
+
|
|
59
|
+
- name: A2) Configure GitHub Pages
|
|
60
|
+
uses: actions/configure-pages@v6
|
|
61
|
+
# WHY: Sets Pages metadata used by upload-pages-artifact and deploy-pages.
|
|
62
|
+
# OBS: Must run before the build step so base URL is available if needed.
|
|
63
|
+
|
|
64
|
+
- name: A3) Install uv (with caching)
|
|
65
|
+
uses: astral-sh/setup-uv@v7
|
|
66
|
+
with:
|
|
67
|
+
enable-cache: true
|
|
68
|
+
cache-dependency-glob: "uv.lock"
|
|
69
|
+
# WHY: Invalidate cache only when locked dependencies change.
|
|
70
|
+
|
|
71
|
+
- name: A4) Install Python ${{ env.PYTHON_VERSION }}
|
|
72
|
+
run: uv python install ${{ env.PYTHON_VERSION }}
|
|
73
|
+
|
|
74
|
+
- name: A5) Install all dependencies
|
|
75
|
+
run: uv sync --extra dev --extra docs --upgrade
|
|
76
|
+
# WHY: Docs extras required for Zensical build; dev extras for consistency.
|
|
77
|
+
|
|
78
|
+
- name: A6) Show tool versions
|
|
79
|
+
run: |
|
|
80
|
+
uv --version
|
|
81
|
+
uv run python --version
|
|
82
|
+
if [ -f "zensical.toml" ]; then
|
|
83
|
+
uv run python -m zensical --version
|
|
84
|
+
fi
|
|
85
|
+
# WHY: Version output makes deployment logs easier to debug when tools change.
|
|
86
|
+
|
|
87
|
+
# ============================================================
|
|
88
|
+
# D) DEPLOY: Build and publish docs
|
|
89
|
+
# ============================================================
|
|
90
|
+
|
|
91
|
+
- name: D1) Build docs with Zensical
|
|
92
|
+
run: |
|
|
93
|
+
if [ ! -f "zensical.toml" ]; then
|
|
94
|
+
echo "zensical.toml not found; refusing to deploy." >> "$GITHUB_STEP_SUMMARY"
|
|
95
|
+
exit 1
|
|
96
|
+
fi
|
|
97
|
+
uv run python -m zensical build
|
|
98
|
+
# WHY: Hard-fail if zensical.toml is missing rather than deploying nothing.
|
|
99
|
+
# OBS: In CI (ci-python-zensical.yml) the missing config is a soft skip.
|
|
100
|
+
# Here it is a hard failure because a deploy without docs is wrong.
|
|
101
|
+
|
|
102
|
+
- name: D2) Verify site output exists
|
|
103
|
+
run: |
|
|
104
|
+
if [ ! -d "site" ]; then
|
|
105
|
+
echo "## Documentation build output missing" >> "$GITHUB_STEP_SUMMARY"
|
|
106
|
+
echo "Expected directory 'site/' was not created." >> "$GITHUB_STEP_SUMMARY"
|
|
107
|
+
echo "Check the Zensical build step and zensical.toml configuration." >> "$GITHUB_STEP_SUMMARY"
|
|
108
|
+
exit 1
|
|
109
|
+
fi
|
|
110
|
+
# WHY: Catch a silent build failure before attempting to upload an empty artifact.
|
|
111
|
+
# OBS: Zensical outputs to site/ by default; update this path if zensical.toml
|
|
112
|
+
# configures a different output directory.
|
|
113
|
+
|
|
114
|
+
- name: D3) Upload Pages artifact
|
|
115
|
+
uses: actions/upload-pages-artifact@v5
|
|
116
|
+
with:
|
|
117
|
+
path: site
|
|
118
|
+
# WHY: Packages the built static site for the deploy-pages action.
|
|
119
|
+
# OBS: path must match the output directory verified in D2.
|
|
120
|
+
|
|
121
|
+
- name: D4) Deploy to GitHub Pages
|
|
122
|
+
uses: actions/deploy-pages@v5
|
|
123
|
+
# WHY: Publishes the uploaded artifact to GitHub Pages.
|
|
124
|
+
# OBS: Requires pages: write and id-token: write permissions (set above).
|
|
125
|
+
# OBS: The deployed URL is shown in the Actions log after this step completes.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .github/workflows/links.yml (Lychee Link Checker)
|
|
3
|
+
# ============================================================
|
|
4
|
+
# Updated: 2026-06-01 (all repos link check)
|
|
5
|
+
|
|
6
|
+
# WHY-FILE: Automated link checking.
|
|
7
|
+
# OBS: Behavior is configured in lychee.toml in this repository.
|
|
8
|
+
# OBS: Runs on pull requests and monthly on schedule; manual trigger always available.
|
|
9
|
+
|
|
10
|
+
name: Check Links
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
workflow_call: # WHY: Allow this workflow to be called by other workflows if needed
|
|
14
|
+
workflow_dispatch: # WHY: Manual trigger - always available
|
|
15
|
+
pull_request: # WHY: Validates PR links before merge
|
|
16
|
+
schedule:
|
|
17
|
+
- cron: "0 6 1 * *" # WHY: Runs monthly (1st of month)
|
|
18
|
+
|
|
19
|
+
concurrency:
|
|
20
|
+
# WHY: Prevent multiple simultaneous link checks on same ref
|
|
21
|
+
group: link-check-${{ github.ref || github.run_id }}
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read # WHY: Needed to checkout code.
|
|
26
|
+
|
|
27
|
+
env:
|
|
28
|
+
PYTHONUNBUFFERED: "1" # WHY: Real-time logging.
|
|
29
|
+
PYTHONIOENCODING: "utf-8" # WHY: Ensure UTF-8 encoding for international characters.
|
|
30
|
+
REPORT_PATH: "./lychee/out.md" # WHY: Predictable markdown report path for summary generation.
|
|
31
|
+
|
|
32
|
+
jobs:
|
|
33
|
+
lychee:
|
|
34
|
+
name: Link checks
|
|
35
|
+
runs-on: ubuntu-latest # WHY: Linux environment matches most production deployments
|
|
36
|
+
timeout-minutes: 20 # WHY: Prevent hanging jobs. If over time, likely stuck.
|
|
37
|
+
|
|
38
|
+
steps:
|
|
39
|
+
- name: 1) Checkout repository code
|
|
40
|
+
uses: actions/checkout@v6
|
|
41
|
+
# WHY: Required so Lychee can inspect repository files.
|
|
42
|
+
|
|
43
|
+
- name: 2) Run Lychee
|
|
44
|
+
uses: lycheeverse/lychee-action@v2.8.0
|
|
45
|
+
with:
|
|
46
|
+
args: >
|
|
47
|
+
--config .github/lychee.toml
|
|
48
|
+
--verbose
|
|
49
|
+
--no-progress
|
|
50
|
+
'./**/*.md'
|
|
51
|
+
'./**/*.html'
|
|
52
|
+
'./**/*.yml'
|
|
53
|
+
'./**/*.yaml'
|