multidimensional-evaluation-engine 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.
- multidimensional_evaluation_engine-0.1.0/.editorconfig +117 -0
- multidimensional_evaluation_engine-0.1.0/.gitattributes +129 -0
- multidimensional_evaluation_engine-0.1.0/.github/AGENTS.md +51 -0
- multidimensional_evaluation_engine-0.1.0/.github/agents/Ask.agent.md +40 -0
- multidimensional_evaluation_engine-0.1.0/.github/agents/Explore.agent.md +0 -0
- multidimensional_evaluation_engine-0.1.0/.github/agents/Plan.agent.md +0 -0
- multidimensional_evaluation_engine-0.1.0/.github/copilot-instructions.md +51 -0
- multidimensional_evaluation_engine-0.1.0/.github/dependabot.yml +26 -0
- multidimensional_evaluation_engine-0.1.0/.github/workflows/ci-python-zensical.yml +117 -0
- multidimensional_evaluation_engine-0.1.0/.github/workflows/deploy-zensical.yml +105 -0
- multidimensional_evaluation_engine-0.1.0/.github/workflows/links.yml +117 -0
- multidimensional_evaluation_engine-0.1.0/.github/workflows/release.yml +118 -0
- multidimensional_evaluation_engine-0.1.0/.gitignore +108 -0
- multidimensional_evaluation_engine-0.1.0/.pre-commit-config.yaml +119 -0
- multidimensional_evaluation_engine-0.1.0/.python-version +1 -0
- multidimensional_evaluation_engine-0.1.0/.vscode/ABOUT_THIS_FOLDER.md +34 -0
- multidimensional_evaluation_engine-0.1.0/.vscode/extensions.json +49 -0
- multidimensional_evaluation_engine-0.1.0/.vscode/settings.json +100 -0
- multidimensional_evaluation_engine-0.1.0/ANNOTATIONS.md +10 -0
- multidimensional_evaluation_engine-0.1.0/CHANGELOG.md +50 -0
- multidimensional_evaluation_engine-0.1.0/CITATION.cff +45 -0
- multidimensional_evaluation_engine-0.1.0/LICENSE +21 -0
- multidimensional_evaluation_engine-0.1.0/PKG-INFO +175 -0
- multidimensional_evaluation_engine-0.1.0/README.md +137 -0
- multidimensional_evaluation_engine-0.1.0/SE_MANIFEST.toml +57 -0
- multidimensional_evaluation_engine-0.1.0/data/raw/candidates.csv +6 -0
- multidimensional_evaluation_engine-0.1.0/data/raw/policy.toml +137 -0
- multidimensional_evaluation_engine-0.1.0/docs/en/api.md +23 -0
- multidimensional_evaluation_engine-0.1.0/docs/en/concepts.md +72 -0
- multidimensional_evaluation_engine-0.1.0/docs/en/examples.md +21 -0
- multidimensional_evaluation_engine-0.1.0/docs/en/index.md +32 -0
- multidimensional_evaluation_engine-0.1.0/docs/en/troubleshooting.md +46 -0
- multidimensional_evaluation_engine-0.1.0/docs/index.md +7 -0
- multidimensional_evaluation_engine-0.1.0/lychee.toml +44 -0
- multidimensional_evaluation_engine-0.1.0/pyproject.toml +209 -0
- multidimensional_evaluation_engine-0.1.0/ruff.strict.toml +73 -0
- multidimensional_evaluation_engine-0.1.0/setup.cfg +4 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/__init__.py +0 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/_version.py +24 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/domain/__init__.py +1 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/domain/candidates.py +30 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/domain/results.py +37 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/evaluation/__init__.py +1 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/evaluation/evaluator.py +58 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/io/__init__.py +1 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/io/load_candidates.py +69 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/io/load_policy.py +44 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/policy/__init__.py +1 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/policy/policy.py +62 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/py.typed +22 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/reporting/__init__.py +0 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/reporting/tables.py +35 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/utils/__init__.py +1 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine/utils/logging_utils.py +62 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine.egg-info/PKG-INFO +175 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine.egg-info/SOURCES.txt +64 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine.egg-info/dependency_links.txt +1 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine.egg-info/requires.txt +15 -0
- multidimensional_evaluation_engine-0.1.0/src/multidimensional_evaluation_engine.egg-info/top_level.txt +1 -0
- multidimensional_evaluation_engine-0.1.0/tests/test_evaluator.py +140 -0
- multidimensional_evaluation_engine-0.1.0/tests/test_load_candidates.py +155 -0
- multidimensional_evaluation_engine-0.1.0/tests/test_load_policy.py +148 -0
- multidimensional_evaluation_engine-0.1.0/tests/test_models.py +89 -0
- multidimensional_evaluation_engine-0.1.0/tests/test_tables.py +104 -0
- multidimensional_evaluation_engine-0.1.0/uv.lock +757 -0
- multidimensional_evaluation_engine-0.1.0/zensical.toml +66 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .editorconfig (Keep files consistent across editors and IDEs)
|
|
3
|
+
# ============================================================
|
|
4
|
+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .editorconfig.
|
|
5
|
+
# WHY: Establish a cross-editor baseline so diffs stay clean and formatting is consistent.
|
|
6
|
+
# ALT: Repository may omit .editorconfig ONLY if formatting is enforced equivalently by CI and formatter tooling.
|
|
7
|
+
# CUSTOM: Adjust indent_size defaults only if organizational standards change; keep stable across projects.
|
|
8
|
+
# NOTE: Sections are ordered by editorial importance, not strict alphabetical order.
|
|
9
|
+
# EditorConfig is documented at https://editorconfig.org
|
|
10
|
+
|
|
11
|
+
root = true
|
|
12
|
+
|
|
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
|
+
# === Markup and documentation ===
|
|
44
|
+
|
|
45
|
+
[*.md]
|
|
46
|
+
# WHY: Keep Markdown clean; use explicit <br> for hard line breaks.
|
|
47
|
+
indent_size = 2
|
|
48
|
+
trim_trailing_whitespace = true
|
|
49
|
+
|
|
50
|
+
[*.{tex,cls,sty}]
|
|
51
|
+
# WHY: LaTeX convention is 2 spaces.
|
|
52
|
+
indent_size = 2
|
|
53
|
+
indent_style = space
|
|
54
|
+
|
|
55
|
+
[*.xml]
|
|
56
|
+
# WHY: XML convention is 2 spaces.
|
|
57
|
+
indent_size = 2
|
|
58
|
+
indent_style = space
|
|
59
|
+
|
|
60
|
+
[*.{yml,yaml}]
|
|
61
|
+
# WHY: YAML convention is 2 spaces.
|
|
62
|
+
indent_size = 2
|
|
63
|
+
indent_style = space
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# === Data and configuration ===
|
|
67
|
+
|
|
68
|
+
[*.{json,jsonc,jsonl,ndjson}]
|
|
69
|
+
# WHY: JSON tooling typically expects 2 spaces.
|
|
70
|
+
indent_size = 2
|
|
71
|
+
indent_style = space
|
|
72
|
+
|
|
73
|
+
[*.toml]
|
|
74
|
+
# WHY: TOML often follows 4-space indentation in many projects.
|
|
75
|
+
indent_size = 4
|
|
76
|
+
indent_style = space
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# === Programming languages ===
|
|
80
|
+
|
|
81
|
+
[*.{js,ts}]
|
|
82
|
+
# WHY: JS/TS ecosystem commonly uses 2 spaces.
|
|
83
|
+
indent_size = 2
|
|
84
|
+
indent_style = space
|
|
85
|
+
|
|
86
|
+
[*.{py,pyi}]
|
|
87
|
+
# WHY: Python convention is 4 spaces.
|
|
88
|
+
indent_size = 4
|
|
89
|
+
indent_style = space
|
|
90
|
+
|
|
91
|
+
[*.ps1]
|
|
92
|
+
# WHY: PowerShell convention is 4 spaces.
|
|
93
|
+
indent_size = 4
|
|
94
|
+
indent_style = space
|
|
95
|
+
|
|
96
|
+
[*.{c,cpp,h,java,cs,go,rs}]
|
|
97
|
+
# WHY: Many C-family and systems languages commonly use 4 spaces.
|
|
98
|
+
indent_size = 4
|
|
99
|
+
indent_style = space
|
|
100
|
+
|
|
101
|
+
[*.{sh,bash}]
|
|
102
|
+
# WHY: Shell script convention is 2 spaces.
|
|
103
|
+
indent_size = 2
|
|
104
|
+
indent_style = space
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# === Proof assistants and formal languages ===
|
|
108
|
+
|
|
109
|
+
[*.lean]
|
|
110
|
+
# WHY: Lean 4 convention is 2 spaces; matches Mathlib and stdlib style.
|
|
111
|
+
indent_size = 2
|
|
112
|
+
indent_style = space
|
|
113
|
+
|
|
114
|
+
[*.{v,vo}]
|
|
115
|
+
# WHY: Coq convention is 2 spaces.
|
|
116
|
+
indent_size = 2
|
|
117
|
+
indent_style = space
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .gitattributes (Keep files consistent across operating systems)
|
|
3
|
+
# ============================================================
|
|
4
|
+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .gitattributes.
|
|
5
|
+
# WHY: Ensure consistent line endings, diff behavior, and file classification
|
|
6
|
+
# across Windows, macOS, and Linux environments.
|
|
7
|
+
# ALT: Repository may omit .gitattributes ONLY if equivalent normalization is
|
|
8
|
+
# enforced reliably by tooling and CI (rare and fragile).
|
|
9
|
+
# CUSTOM: Update file-type rules only when introducing new languages,
|
|
10
|
+
# binary artifacts, or documentation formats.
|
|
11
|
+
# NOTE: Rules are ordered by impact and generality, not alphabetically.
|
|
12
|
+
# Git attributes are documented at https://git-scm.com/docs/gitattributes
|
|
13
|
+
|
|
14
|
+
# === Core defaults (always apply) ===
|
|
15
|
+
|
|
16
|
+
# WHY: Auto-detect text files and normalize line endings to avoid cross-platform drift.
|
|
17
|
+
* text=auto
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# === Programming languages and scripts ===
|
|
21
|
+
|
|
22
|
+
# WHY: Python and shell scripts must use LF for CI/CD, Linux environments, and containers.
|
|
23
|
+
*.py text eol=lf
|
|
24
|
+
*.sh text eol=lf
|
|
25
|
+
|
|
26
|
+
# WHY: PowerShell convention on Windows uses CRLF.
|
|
27
|
+
*.ps1 text eol=crlf
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# === Markup and documentation ===
|
|
31
|
+
|
|
32
|
+
# WHY: Documentation and markup files use LF; standard for cross-platform tooling.
|
|
33
|
+
*.md text eol=lf
|
|
34
|
+
*.tex text eol=lf
|
|
35
|
+
*.sty text eol=lf
|
|
36
|
+
*.cls text eol=lf
|
|
37
|
+
*.bib text eol=lf
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# === Configuration and structured text ===
|
|
41
|
+
|
|
42
|
+
# WHY: Configuration and structured text formats use LF for stable diffs.
|
|
43
|
+
*.json text eol=lf
|
|
44
|
+
*.jsonc text eol=lf
|
|
45
|
+
*.jsonl text eol=lf
|
|
46
|
+
*.ndjson text eol=lf
|
|
47
|
+
*.toml text eol=lf
|
|
48
|
+
*.yaml text eol=lf
|
|
49
|
+
*.yml text eol=lf
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# === Proof assistants and formal languages ===
|
|
53
|
+
|
|
54
|
+
# WHY: Lean source files must use LF for cross-platform consistency and CI.
|
|
55
|
+
*.lean text eol=lf
|
|
56
|
+
|
|
57
|
+
# WHY: Lean build artifacts are binary; prevent normalization and meaningless diffs.
|
|
58
|
+
*.olean binary
|
|
59
|
+
*.ilean binary
|
|
60
|
+
*.trace binary
|
|
61
|
+
|
|
62
|
+
# WHY: Coq source uses LF; compiled objects are binary.
|
|
63
|
+
*.v text eol=lf
|
|
64
|
+
*.vo binary
|
|
65
|
+
*.vok binary
|
|
66
|
+
*.vos binary
|
|
67
|
+
*.glob binary
|
|
68
|
+
|
|
69
|
+
# WHY: Lake build directory should be excluded, but if tracked, treat as binary.
|
|
70
|
+
.lake/** binary
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# === Notebooks ===
|
|
74
|
+
|
|
75
|
+
# WHY: Jupyter notebooks require specialized diff and merge handling.
|
|
76
|
+
*.ipynb diff=jupyternotebook
|
|
77
|
+
*.ipynb merge=jupyternotebook
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# === Databases (binary) ===
|
|
81
|
+
|
|
82
|
+
# WHY: Database files are binary; prevent text normalization and meaningless diffs.
|
|
83
|
+
*.db binary
|
|
84
|
+
*.duckdb binary
|
|
85
|
+
*.sqlite binary
|
|
86
|
+
*.sqlite3 binary
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
# === Columnar and analytical data (binary) ===
|
|
90
|
+
|
|
91
|
+
# WHY: Columnar and analytical data formats are binary; diffs are not meaningful.
|
|
92
|
+
*.arrow binary
|
|
93
|
+
*.avro binary
|
|
94
|
+
*.feather binary
|
|
95
|
+
*.orc binary
|
|
96
|
+
*.parquet binary
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# === Office, BI, PDFs, and compressed artifacts (binary) ===
|
|
100
|
+
|
|
101
|
+
# WHY: Office documents, BI files, PDFs, and compressed artifacts are binary.
|
|
102
|
+
*.7z binary
|
|
103
|
+
*.bz2 binary
|
|
104
|
+
*.docx binary
|
|
105
|
+
*.gz binary
|
|
106
|
+
*.pbix binary
|
|
107
|
+
*.pbit binary
|
|
108
|
+
*.pdf binary
|
|
109
|
+
*.pptx binary
|
|
110
|
+
*.rar binary
|
|
111
|
+
*.tar binary
|
|
112
|
+
*.tgz binary
|
|
113
|
+
*.xls binary
|
|
114
|
+
*.xlsm binary
|
|
115
|
+
*.xlsx binary
|
|
116
|
+
*.xz binary
|
|
117
|
+
*.zip binary
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
# === GitHub metadata and UI ===
|
|
121
|
+
|
|
122
|
+
# WHY: Exclude documentation and tests from GitHub language statistics.
|
|
123
|
+
docs/** linguist-documentation
|
|
124
|
+
tests/** linguist-documentation
|
|
125
|
+
|
|
126
|
+
# === LOG FILES ===
|
|
127
|
+
# WHY: Log files are typically large and binary in nature; prevent text normalization.
|
|
128
|
+
*.log binary
|
|
129
|
+
project.log binary
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# AI Instructions (AGENTS / CLAUDE / Copilot)
|
|
2
|
+
|
|
3
|
+
## WHY
|
|
4
|
+
|
|
5
|
+
- This repo uses a uniform, reproducible workflow based on **uv** and **pyproject.toml**.
|
|
6
|
+
- These instructions exist to prevent tool drift (e.g., pip) and OS mismatch.
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
- Use **uv** for all environment, dependency, and run commands in this repo.
|
|
11
|
+
- Do **not** recommend or use `pip install ...` as the primary workflow.
|
|
12
|
+
- This repo targets **Python 3.14**, pinned via uv.
|
|
13
|
+
- Commands and guidance must work on Windows, macOS, and Linux.
|
|
14
|
+
- If shell-specific commands are unavoidable, provide both:
|
|
15
|
+
- PowerShell (Windows)
|
|
16
|
+
- bash/zsh (macOS/Linux)
|
|
17
|
+
|
|
18
|
+
## Quickstart
|
|
19
|
+
|
|
20
|
+
- Install **uv** using the official method for your OS.
|
|
21
|
+
- Keep uv current.
|
|
22
|
+
- Pin Python 3.14 for this project using uv.
|
|
23
|
+
- Sync dependencies (dev + docs) and upgrade.
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
uv self update
|
|
27
|
+
uv python pin 3.14
|
|
28
|
+
uv sync --extra dev --extra docs --upgrade
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Common Tasks
|
|
32
|
+
|
|
33
|
+
Run all commands via **uv**.
|
|
34
|
+
|
|
35
|
+
Lint / format:
|
|
36
|
+
|
|
37
|
+
```shell
|
|
38
|
+
uv run ruff format .
|
|
39
|
+
uv run ruff check .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Build documentation:
|
|
43
|
+
|
|
44
|
+
```shell
|
|
45
|
+
uv run zensical build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## pre-commit
|
|
49
|
+
|
|
50
|
+
- pre-commit runs only on tracked / staged files.
|
|
51
|
+
- Developers should `git add -A` files before expecting hooks to run.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Ask
|
|
3
|
+
description: Answers questions without making changes
|
|
4
|
+
argument-hint: Ask a question about your code or project
|
|
5
|
+
target: vscode
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
tools: ['search', 'read', 'web', 'vscode/memory', 'execute/getTerminalOutput', 'execute/testFailure', 'vscode.mermaid-chat-features/renderMermaidDiagram', 'vscode/askQuestions']
|
|
8
|
+
agents: []
|
|
9
|
+
---
|
|
10
|
+
You are an ASK AGENT — a knowledgeable assistant that answers questions, explains code, and provides information.
|
|
11
|
+
|
|
12
|
+
Your job: understand the user's question → research the codebase as needed → provide a clear, thorough answer. You are strictly read-only: NEVER modify files or run commands that change state.
|
|
13
|
+
|
|
14
|
+
<rules>
|
|
15
|
+
- NEVER use file editing tools, terminal commands that modify state, or any write operations
|
|
16
|
+
- Focus on answering questions, explaining concepts, and providing information
|
|
17
|
+
- Use search and read tools to gather context from the codebase when needed
|
|
18
|
+
- Provide code examples in your responses when helpful, but do NOT apply them
|
|
19
|
+
- Use #tool:vscode/askQuestions to clarify ambiguous questions before researching
|
|
20
|
+
- When the user's question is about code, reference specific files and symbols
|
|
21
|
+
- If a question would require making changes, explain what changes would be needed but do NOT make them
|
|
22
|
+
</rules>
|
|
23
|
+
|
|
24
|
+
<capabilities>
|
|
25
|
+
You can help with:
|
|
26
|
+
- **Code explanation**: How does this code work? What does this function do?
|
|
27
|
+
- **Architecture questions**: How is the project structured? How do components interact?
|
|
28
|
+
- **Debugging guidance**: Why might this error occur? What could cause this behavior?
|
|
29
|
+
- **Best practices**: What's the recommended approach for X? How should I structure Y?
|
|
30
|
+
- **API and library questions**: How do I use this API? What does this method expect?
|
|
31
|
+
- **Codebase navigation**: Where is X defined? Where is Y used?
|
|
32
|
+
- **General programming**: Language features, algorithms, design patterns, etc.
|
|
33
|
+
</capabilities>
|
|
34
|
+
|
|
35
|
+
<workflow>
|
|
36
|
+
1. **Understand** the question — identify what the user needs to know
|
|
37
|
+
2. **Research** the codebase if needed — use search and read tools to find relevant code
|
|
38
|
+
3. **Clarify** if the question is ambiguous — use #tool:vscode/askQuestions
|
|
39
|
+
4. **Answer** clearly — provide a well-structured response with references to relevant code
|
|
40
|
+
</workflow>
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# AI Instructions (AGENTS / CLAUDE / Copilot)
|
|
2
|
+
|
|
3
|
+
## WHY
|
|
4
|
+
|
|
5
|
+
- This repo uses a uniform, reproducible workflow based on **uv** and **pyproject.toml**.
|
|
6
|
+
- These instructions exist to prevent tool drift (e.g., pip) and OS mismatch.
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
- Use **uv** for all environment, dependency, and run commands in this repo.
|
|
11
|
+
- Do **not** recommend or use `pip install ...` as the primary workflow.
|
|
12
|
+
- This repo targets **Python 3.14**, pinned via uv.
|
|
13
|
+
- Commands and guidance must work on Windows, macOS, and Linux.
|
|
14
|
+
- If shell-specific commands are unavoidable, provide both:
|
|
15
|
+
- PowerShell (Windows)
|
|
16
|
+
- bash/zsh (macOS/Linux)
|
|
17
|
+
|
|
18
|
+
## Quickstart
|
|
19
|
+
|
|
20
|
+
- Install **uv** using the official method for your OS.
|
|
21
|
+
- Keep uv current.
|
|
22
|
+
- Pin Python 3.14 for this project using uv.
|
|
23
|
+
- Sync dependencies (dev + docs) and upgrade.
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
uv self update
|
|
27
|
+
uv python pin 3.14
|
|
28
|
+
uv sync --extra dev --extra docs --upgrade
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Common Tasks
|
|
32
|
+
|
|
33
|
+
Run all commands via **uv**.
|
|
34
|
+
|
|
35
|
+
Lint / format:
|
|
36
|
+
|
|
37
|
+
```shell
|
|
38
|
+
uv run ruff format .
|
|
39
|
+
uv run ruff check .
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Build documentation:
|
|
43
|
+
|
|
44
|
+
```shell
|
|
45
|
+
uv run zensical build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## pre-commit
|
|
49
|
+
|
|
50
|
+
- pre-commit runs only on tracked / staged files.
|
|
51
|
+
- Developers should `git add -A` files before expecting hooks to run.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .github/dependabot.yml (Check for GitHub Actions updates)
|
|
3
|
+
# ============================================================
|
|
4
|
+
# SOURCE: https://github.com/denisecase/templates
|
|
5
|
+
#
|
|
6
|
+
# REQ.PROJECT: This repository SHOULD track GitHub Actions updates automatically.
|
|
7
|
+
# WHY-FILE: GitHub Actions are executable dependencies and may receive security or behavior updates.
|
|
8
|
+
# OBS: Language-level dependencies (e.g., Python packages) are upgraded manually.
|
|
9
|
+
# OBS: GitHub Actions are the only dependency class automated here.
|
|
10
|
+
# ALT: Dependabot could be omitted if workflows are pinned and reviewed manually.
|
|
11
|
+
# CUSTOM: Update interval if CI cadence or security posture changes.
|
|
12
|
+
|
|
13
|
+
# NOTE: This file automatically updates the versions used in Actions workflows.
|
|
14
|
+
# You don't need to modify this file.
|
|
15
|
+
# To disable: Delete this file or set enabled: false below.
|
|
16
|
+
# enabled: false # Uncomment to disable Dependabot
|
|
17
|
+
|
|
18
|
+
version: 2 # Dependabot configuration version
|
|
19
|
+
|
|
20
|
+
updates:
|
|
21
|
+
- package-ecosystem: "github-actions" # Dependency type
|
|
22
|
+
directory: "/" # Location of GitHub Actions workflows
|
|
23
|
+
schedule:
|
|
24
|
+
interval: "monthly" # ALT: Use "weekly" for higher security when needed
|
|
25
|
+
commit-message:
|
|
26
|
+
prefix: "(deps)" # WHY: enable filtering by commit type
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .github/workflows/ci-python-zensical.yml (Continuous Integration)
|
|
3
|
+
# ============================================================#
|
|
4
|
+
# WHY-FILE: Validate repository hygiene, python, and documentation builds.
|
|
5
|
+
# REQ: CI MUST NOT introduce arbitrary rules that are not reproducible locally.
|
|
6
|
+
# OBS: CI validates only; it should not edit files or deploy docs.
|
|
7
|
+
|
|
8
|
+
name: CI (Python + Zensical)
|
|
9
|
+
|
|
10
|
+
# WHY: Validate code, docs, and repo metadata on PRs and pushes.
|
|
11
|
+
# OBS: This workflow validates only; it never deploys.
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
push:
|
|
15
|
+
branches: [main] # WHY: Run when pushing to main branch.
|
|
16
|
+
pull_request:
|
|
17
|
+
branches: [main] # WHY: Run on pull requests targeting main branch.
|
|
18
|
+
workflow_dispatch: # WHY: Allow manual triggering from Actions tab.
|
|
19
|
+
|
|
20
|
+
permissions: # WHY: Use least privileges required.
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
env:
|
|
24
|
+
PYTHONUNBUFFERED: "1" # WHY: Real-time logging.
|
|
25
|
+
PYTHONIOENCODING: "utf-8" # WHY: Ensure UTF-8 encoding for international characters.
|
|
26
|
+
|
|
27
|
+
jobs:
|
|
28
|
+
ci:
|
|
29
|
+
name: Repository / Python checks and Zensical build
|
|
30
|
+
runs-on: ubuntu-latest # WHY: Linux environment matches most production deployments
|
|
31
|
+
timeout-minutes: 30 # WHY: Prevent hanging jobs. If over time, it is likely stuck.
|
|
32
|
+
env:
|
|
33
|
+
UV_PYTHON: "3.14" # WHY: Set Python version for all steps.
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
# ============================================================
|
|
37
|
+
# ASSEMBLE: Get code and set up environment
|
|
38
|
+
# ============================================================
|
|
39
|
+
|
|
40
|
+
- name: A1) Checkout repository code
|
|
41
|
+
# WHY: Needed to access files for checks.
|
|
42
|
+
uses: actions/checkout@v6
|
|
43
|
+
|
|
44
|
+
- name: A2) Install uv (with caching and uv.lock awareness)
|
|
45
|
+
uses: astral-sh/setup-uv@v7
|
|
46
|
+
with:
|
|
47
|
+
enable-cache: true # WHY: Speed up installs on subsequent runs
|
|
48
|
+
cache-dependency-glob: "uv.lock" # WHY: Only re-cache when dependencies change
|
|
49
|
+
|
|
50
|
+
- name: A3) Install Python 3.14 (no repo changes needed)
|
|
51
|
+
run: uv python install 3.14
|
|
52
|
+
|
|
53
|
+
- name: A4) Sync to install all dependencies
|
|
54
|
+
run: uv sync --extra dev --extra docs --upgrade
|
|
55
|
+
|
|
56
|
+
- name: A5) Show tool versions
|
|
57
|
+
run: |
|
|
58
|
+
uv --version
|
|
59
|
+
uv run python --version
|
|
60
|
+
if [ -f "zensical.toml" ]; then
|
|
61
|
+
uv run zensical --version
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
- name: A6) Run pre-commit (all files)
|
|
65
|
+
run: uv tool run pre-commit run --all-files
|
|
66
|
+
|
|
67
|
+
# ============================================================
|
|
68
|
+
# === BASELINE CHECKS ===
|
|
69
|
+
# ============================================================
|
|
70
|
+
|
|
71
|
+
- name: B1) validate-pyproject (must be in pyproject.toml dependencies)
|
|
72
|
+
run: uv run validate-pyproject pyproject.toml
|
|
73
|
+
|
|
74
|
+
# ============================================================
|
|
75
|
+
# === COVERAGE AND TESTS: Verify functionality ===
|
|
76
|
+
# ============================================================
|
|
77
|
+
|
|
78
|
+
- name: C1) Run pytest with coverage
|
|
79
|
+
run: |
|
|
80
|
+
if [ -d "tests" ] && [ -n "$(find tests -type f \( -name 'test_*.py' -o -name '*_test.py' \) -print -quit)" ]; then
|
|
81
|
+
uv run pytest --verbose --cov=src --cov-report=term-missing --cov-report=xml
|
|
82
|
+
else
|
|
83
|
+
echo "## No Tests Found" >> "$GITHUB_STEP_SUMMARY"
|
|
84
|
+
echo "Tests directory missing or empty. CI continues." >> "$GITHUB_STEP_SUMMARY"
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
- name: C2) Upload test coverage to GitHub Summary
|
|
88
|
+
if: always()
|
|
89
|
+
run: |
|
|
90
|
+
echo "## Test Coverage Report" >> "$GITHUB_STEP_SUMMARY"
|
|
91
|
+
if [ -f ".coverage" ]; then
|
|
92
|
+
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
|
93
|
+
uv run coverage report >> "$GITHUB_STEP_SUMMARY"
|
|
94
|
+
echo '```' >> "$GITHUB_STEP_SUMMARY"
|
|
95
|
+
else
|
|
96
|
+
echo "No coverage data available." >> "$GITHUB_STEP_SUMMARY"
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
- name: C3) Upload coverage artifact
|
|
100
|
+
if: always() && hashFiles('coverage.xml') != ''
|
|
101
|
+
uses: actions/upload-artifact@v7
|
|
102
|
+
with:
|
|
103
|
+
name: coverage-report
|
|
104
|
+
path: coverage.xml
|
|
105
|
+
retention-days: 30
|
|
106
|
+
|
|
107
|
+
# ============================================================
|
|
108
|
+
# === DEPLOY: Build only, don't deploy yet ===
|
|
109
|
+
# ============================================================
|
|
110
|
+
|
|
111
|
+
- name: D1) Build docs with Zensical
|
|
112
|
+
run: |
|
|
113
|
+
if [ -f "zensical.toml" ]; then
|
|
114
|
+
uv run zensical build
|
|
115
|
+
else
|
|
116
|
+
echo "No zensical.toml config found; skipping docs build."
|
|
117
|
+
fi
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# .github/workflows/deploy-zensical.yml (Deploy Docs)
|
|
3
|
+
# ============================================================#
|
|
4
|
+
# WHY-FILE: Build and deploy documentation to GitHub Pages on pushes to main.
|
|
5
|
+
# REQ: Repo Settings -> Pages -> Build and deployment -> Source:
|
|
6
|
+
# GitHub Actions
|
|
7
|
+
|
|
8
|
+
name: Docs Deploy (Zensical)
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
branches: [main] # WHY: Run when pushing to main branch.
|
|
13
|
+
workflow_dispatch: # WHY: Allow manual triggering from Actions tab.
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read # WHY: Needed to checkout code.
|
|
17
|
+
pages: write # WHY: Required to deploy to GitHub Pages.
|
|
18
|
+
id-token: write # WHY: Required by deploy-pages for OIDC.
|
|
19
|
+
|
|
20
|
+
env:
|
|
21
|
+
PYTHONUNBUFFERED: "1" # WHY: Real-time logging.
|
|
22
|
+
PYTHONIOENCODING: "utf-8" # WHY: Ensure UTF-8 encoding for international characters.
|
|
23
|
+
|
|
24
|
+
concurrency:
|
|
25
|
+
# WHY: Only one Pages deployment at a time per branch.
|
|
26
|
+
group: pages-${{ github.ref }}
|
|
27
|
+
cancel-in-progress: true
|
|
28
|
+
|
|
29
|
+
jobs:
|
|
30
|
+
docs:
|
|
31
|
+
name: Deploy Documentation site
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
timeout-minutes: 30 # WHY: Prevent hanging jobs. If over, it is likely stuck.
|
|
34
|
+
env:
|
|
35
|
+
UV_PYTHON: "3.14" # WHY: Set Python version for all steps.
|
|
36
|
+
|
|
37
|
+
steps:
|
|
38
|
+
# ============================================================
|
|
39
|
+
# ASSEMBLE: Get code and set up environment
|
|
40
|
+
# ============================================================
|
|
41
|
+
|
|
42
|
+
- name: A1) Checkout repository code
|
|
43
|
+
# WHY: Needed to access files for checks.
|
|
44
|
+
uses: actions/checkout@v6
|
|
45
|
+
|
|
46
|
+
- name: A2) Configure GitHub Pages
|
|
47
|
+
# WHY: Sets Pages metadata for deployments.
|
|
48
|
+
uses: actions/configure-pages@v6
|
|
49
|
+
|
|
50
|
+
- name: A3) Install uv (with caching and uv.lock awareness)
|
|
51
|
+
uses: astral-sh/setup-uv@v7
|
|
52
|
+
with:
|
|
53
|
+
enable-cache: true # WHY: Speed up installs on subsequent runs
|
|
54
|
+
cache-dependency-glob: "uv.lock" # WHY: Only re-cache when dependencies change
|
|
55
|
+
|
|
56
|
+
- name: A4) Install Python 3.14 (no repo changes needed)
|
|
57
|
+
run: uv python install 3.14
|
|
58
|
+
|
|
59
|
+
- name: A5) Sync to install all dependencies
|
|
60
|
+
run: uv sync --extra dev --extra docs --upgrade
|
|
61
|
+
|
|
62
|
+
- name: A6) Show tool versions
|
|
63
|
+
run: |
|
|
64
|
+
uv --version
|
|
65
|
+
uv run python --version
|
|
66
|
+
if [ -f "zensical.toml" ]; then
|
|
67
|
+
uv run zensical --version
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# ============================================================
|
|
71
|
+
# === DEPLOY: Build and deploy ===
|
|
72
|
+
# ============================================================
|
|
73
|
+
|
|
74
|
+
- name: D1) Build docs with Zensical
|
|
75
|
+
run: |
|
|
76
|
+
if [ ! -f "zensical.toml" ]; then
|
|
77
|
+
echo "zensical.toml not found; refusing to deploy." >> "$GITHUB_STEP_SUMMARY"
|
|
78
|
+
exit 1
|
|
79
|
+
fi
|
|
80
|
+
uv run zensical build
|
|
81
|
+
|
|
82
|
+
- name: D2) Verify site output exists
|
|
83
|
+
# WHY: Zensical should create a static site in the configured output directory
|
|
84
|
+
# (commonly "site/"). If the directory does not exist, the documentation
|
|
85
|
+
# build likely failed or the configuration is incorrect.
|
|
86
|
+
run: |
|
|
87
|
+
if [ ! -d "site" ]; then
|
|
88
|
+
echo "## Documentation build output missing" >> "$GITHUB_STEP_SUMMARY"
|
|
89
|
+
echo "Expected directory 'site/' was not created." >> "$GITHUB_STEP_SUMMARY"
|
|
90
|
+
echo "Check the Zensical build step and zensical.toml configuration." >> "$GITHUB_STEP_SUMMARY"
|
|
91
|
+
exit 1
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
- name: D3) Upload Pages artifact
|
|
95
|
+
# WHY: GitHub Pages deployments require a packaged artifact containing
|
|
96
|
+
# the built static site. This step bundles the contents of the site/
|
|
97
|
+
# directory so the next step can publish it.
|
|
98
|
+
uses: actions/upload-pages-artifact@v4
|
|
99
|
+
with:
|
|
100
|
+
path: site # WHY: Default Zensical output directory for the built site.
|
|
101
|
+
|
|
102
|
+
- name: D4) Deploy to GitHub Pages
|
|
103
|
+
# WHY: This step takes the uploaded artifact and publishes it to
|
|
104
|
+
# GitHub Pages so the documentation becomes publicly accessible.
|
|
105
|
+
uses: actions/deploy-pages@v5
|