denote 0.0.2__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.
- denote-0.0.2/.claude/agents/setup-auditor.md +38 -0
- denote-0.0.2/.claude/skills/opsward/SKILL.md +63 -0
- denote-0.0.2/.claude/skills/opsward-diagnose/SKILL.md +78 -0
- denote-0.0.2/.claude/skills/opsward-generate/SKILL.md +63 -0
- denote-0.0.2/.claude/skills/opsward-maintain/SKILL.md +74 -0
- denote-0.0.2/.gitattributes +1 -0
- denote-0.0.2/.github/workflows/ci.yml +259 -0
- denote-0.0.2/.gitignore +121 -0
- denote-0.0.2/CLAUDE.md +59 -0
- denote-0.0.2/LICENSE +21 -0
- denote-0.0.2/PKG-INFO +134 -0
- denote-0.0.2/README.md +86 -0
- denote-0.0.2/denote/__init__.py +112 -0
- denote-0.0.2/denote/backends/__init__.py +1 -0
- denote-0.0.2/denote/backends/basic_pitch/AI_CONTEXT.md +38 -0
- denote-0.0.2/denote/backends/basic_pitch/__init__.py +0 -0
- denote-0.0.2/denote/backends/basic_pitch/adapter.py +61 -0
- denote-0.0.2/denote/backends/basic_pitch/config.py +49 -0
- denote-0.0.2/denote/backends/librosa_beats/__init__.py +0 -0
- denote-0.0.2/denote/backends/librosa_beats/adapter.py +51 -0
- denote-0.0.2/denote/backends/librosa_beats/config.py +26 -0
- denote-0.0.2/denote/backends/librosa_pyin/__init__.py +0 -0
- denote-0.0.2/denote/backends/librosa_pyin/adapter.py +56 -0
- denote-0.0.2/denote/backends/librosa_pyin/config.py +28 -0
- denote-0.0.2/denote/backends/torchcrepe/AI_CONTEXT.md +40 -0
- denote-0.0.2/denote/backends/torchcrepe/__init__.py +0 -0
- denote-0.0.2/denote/backends/torchcrepe/adapter.py +66 -0
- denote-0.0.2/denote/backends/torchcrepe/config.py +34 -0
- denote-0.0.2/denote/base.py +73 -0
- denote-0.0.2/denote/registry.py +163 -0
- denote-0.0.2/denote/services.py +160 -0
- denote-0.0.2/denote/translation.py +93 -0
- denote-0.0.2/denote/util.py +96 -0
- denote-0.0.2/misc/docs/Audio-to-Symbol -- A Comprehensive Survey of Automatic Music Transcription and MIR Tools.md +487 -0
- denote-0.0.2/misc/docs/Music Transcription Tools Research.md +318 -0
- denote-0.0.2/misc/docs/architecture.md +288 -0
- denote-0.0.2/misc/docs/arioso_design_notes.md +153 -0
- denote-0.0.2/misc/docs/backend_api_comparison.md +358 -0
- denote-0.0.2/misc/docs/conventions.md +33 -0
- denote-0.0.2/misc/docs/decisions/0000-template.md +17 -0
- denote-0.0.2/misc/docs/deployment.md +17 -0
- denote-0.0.2/misc/docs/docs_guide.md +28 -0
- denote-0.0.2/misc/docs/known_issues.md +16 -0
- denote-0.0.2/misc/docs/roadmap.md +58 -0
- denote-0.0.2/misc/docs/testing.md +29 -0
- denote-0.0.2/pyproject.toml +177 -0
- denote-0.0.2/tests/__init__.py +0 -0
- denote-0.0.2/tests/backends/__init__.py +0 -0
- denote-0.0.2/tests/backends/test_basic_pitch.py +55 -0
- denote-0.0.2/tests/backends/test_librosa_backends.py +74 -0
- denote-0.0.2/tests/test_base.py +62 -0
- denote-0.0.2/tests/test_registry.py +84 -0
- denote-0.0.2/tests/test_services.py +95 -0
- denote-0.0.2/tests/test_translation.py +74 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-auditor
|
|
3
|
+
description: Read-only diagnostic agent that audits the project's AI setup (CLAUDE.md, skills, docs, rules). Use when you want to check the health of the project's agent configuration without making changes.
|
|
4
|
+
allowed-tools: Bash, Read, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Setup Auditor
|
|
8
|
+
|
|
9
|
+
You are a read-only diagnostic agent. Your job is to audit the AI agent setup of this project and report findings. You NEVER modify files.
|
|
10
|
+
|
|
11
|
+
## How to Audit
|
|
12
|
+
|
|
13
|
+
1. **Run the opsward diagnostic** via Bash:
|
|
14
|
+
```
|
|
15
|
+
opsward diagnose . --format json
|
|
16
|
+
```
|
|
17
|
+
If `opsward` is not installed, fall back to manual inspection (steps below).
|
|
18
|
+
|
|
19
|
+
2. **Run maintenance checks** via Bash:
|
|
20
|
+
```
|
|
21
|
+
opsward maintain . --format json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
3. **Interpret and present** the combined results as a report card.
|
|
25
|
+
|
|
26
|
+
## Fallback: Manual Inspection
|
|
27
|
+
|
|
28
|
+
If `opsward` is not available, check these manually:
|
|
29
|
+
|
|
30
|
+
1. **CLAUDE.md quality** — Is it concise, actionable, and current?
|
|
31
|
+
2. **Documentation** — Do `misc/docs/docs_guide.md` and core docs exist and have real content?
|
|
32
|
+
3. **Skills** — Do `.claude/skills/` entries have valid SKILL.md files with descriptions?
|
|
33
|
+
4. **Rules** — Are `.claude/rules/` entries specific and actionable?
|
|
34
|
+
5. **Cross-references** — Do paths mentioned in CLAUDE.md actually exist?
|
|
35
|
+
|
|
36
|
+
## How to Report
|
|
37
|
+
|
|
38
|
+
Summarize findings as a bulleted list with scores (0-100) per category and specific suggestions for improvement. Be constructive and specific.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opsward
|
|
3
|
+
description: Run opsward to assess and improve this project's AI agent setup. Use when the user says 'opsward', 'check my setup', 'improve my AI config', or wants a full audit and remediation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Opsward — AI Setup Manager
|
|
7
|
+
|
|
8
|
+
Assess this project's AI agent setup and guide improvements. Combines opsward's deterministic CLI tools with your ability to read code, reason about quality, and make intelligent edits.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Requires `opsward` to be installed (`pip install opsward`). If the command is not found, tell the user to install it.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
### 1. Diagnose
|
|
17
|
+
|
|
18
|
+
Run the deterministic diagnostic:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
opsward diagnose . --format json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
opsward diagnose .
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Interpret and decide
|
|
29
|
+
|
|
30
|
+
Based on the grade, decide the next step:
|
|
31
|
+
- **Grade F or D** (score < 70): The project is missing core artifacts. Focus on generation — scaffold CLAUDE.md, docs, skills.
|
|
32
|
+
- **Grade C or B** (score 70-89): The structure exists but has drift or gaps. Focus on maintenance — fix stale references, flesh out empty docs.
|
|
33
|
+
- **Grade A** (score 90+): Setup is healthy. Offer targeted fine-tuning — improve the lowest-scoring dimensions.
|
|
34
|
+
|
|
35
|
+
### 3. Go beyond the scores
|
|
36
|
+
|
|
37
|
+
Opsward's scores are heuristic (regex-based). You can assess semantic quality that opsward can't:
|
|
38
|
+
- Is the CLAUDE.md actually accurate for this project?
|
|
39
|
+
- Do the docs contain real content or just template stubs?
|
|
40
|
+
- Are the commands correct and up-to-date?
|
|
41
|
+
|
|
42
|
+
Read source files, configs, and existing docs to form your own assessment. Use Read, Grep, Glob, and Bash freely — these are read-only and safe.
|
|
43
|
+
|
|
44
|
+
### 4. Execute the appropriate workflow
|
|
45
|
+
|
|
46
|
+
- **Generation**: Run `opsward generate .` to preview, then `opsward generate . --write` to create scaffolds. Then read the project's actual code and customize each generated file with real content.
|
|
47
|
+
- **Maintenance**: Run `opsward maintain . --format json` to get structural issues. Also check for semantic drift (docs that no longer match the code). Fix issues using Edit/Write.
|
|
48
|
+
- **Fine-tuning**: Read the lowest-scoring component, identify specific improvements, and apply them.
|
|
49
|
+
|
|
50
|
+
Always ask the user before writing or editing files.
|
|
51
|
+
|
|
52
|
+
### 5. Re-diagnose
|
|
53
|
+
|
|
54
|
+
After making changes, run `opsward diagnose .` again. Show before/after scores and summarize what was done.
|
|
55
|
+
|
|
56
|
+
## Permissions
|
|
57
|
+
|
|
58
|
+
This skill uses Claude Code's standard permission model:
|
|
59
|
+
- **Read-only operations** (Read, Glob, Grep, Bash for inspection): always safe, used freely
|
|
60
|
+
- **Write operations** (Write, Edit): Claude Code prompts the user per their permission settings
|
|
61
|
+
- **Destructive operations** (deleting files, removing content): always ask for explicit confirmation
|
|
62
|
+
|
|
63
|
+
The skill never assumes elevated permissions. If the user wants faster workflows, they can configure auto-allow in their Claude Code settings — but this is their choice.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opsward-diagnose
|
|
3
|
+
description: Diagnose the health of this project's AI agent setup. Use when the user asks to check, audit, or score the project's CLAUDE.md, skills, docs, or agent configuration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Diagnose AI Setup
|
|
7
|
+
|
|
8
|
+
Run opsward's deterministic diagnostic, then go deeper with your own analysis, and offer fixes.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Requires `opsward` to be installed (`pip install opsward`). If the command is not found, tell the user to install it.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
### 1. Run the deterministic diagnostic
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
opsward diagnose . --format json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This returns structured scores (0-100) for CLAUDE.md quality, documentation, skills, setup, and cross-references. Also run the text version for the user:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
opsward diagnose .
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Go deeper than the scores
|
|
29
|
+
|
|
30
|
+
Opsward uses regex heuristics — it catches structural issues but can't assess semantic quality. You can. For each component:
|
|
31
|
+
|
|
32
|
+
- **CLAUDE.md**: Read it. Is the module map accurate? Are the commands actually correct? Does it match the real project structure? Check `pyproject.toml`, `package.json`, source directories.
|
|
33
|
+
- **Docs**: Read each doc. Is the content real or just a template stub? Does `architecture.md` describe the actual architecture?
|
|
34
|
+
- **Skills**: Read each SKILL.md. Are the trigger descriptions clear? Do the instructions make sense for this project?
|
|
35
|
+
- **Cross-references**: Opsward checks path existence. You can check whether referenced files have the content the reference implies.
|
|
36
|
+
|
|
37
|
+
Use Read, Glob, and Grep freely to inspect the project — these are read-only and safe.
|
|
38
|
+
|
|
39
|
+
### 3. Present findings
|
|
40
|
+
|
|
41
|
+
For each component:
|
|
42
|
+
- State the opsward score and what it measures
|
|
43
|
+
- Add your own observations (what opsward can't catch)
|
|
44
|
+
- Highlight the most impactful improvements
|
|
45
|
+
|
|
46
|
+
### 4. Offer fixes
|
|
47
|
+
|
|
48
|
+
For each issue, propose a concrete fix:
|
|
49
|
+
- Missing CLAUDE.md → offer to generate or write a tailored one
|
|
50
|
+
- Inaccurate module map → read the actual directory structure and rewrite it
|
|
51
|
+
- Low commands score → read `pyproject.toml`/`package.json` and add real commands
|
|
52
|
+
- Broken cross-references → identify stale paths, update or remove them
|
|
53
|
+
- Missing/empty docs → read the codebase and write real content (not just templates)
|
|
54
|
+
- Missing skill descriptions → read the skill directory and write a proper description
|
|
55
|
+
|
|
56
|
+
### 5. Apply fixes with user approval
|
|
57
|
+
|
|
58
|
+
Always ask before writing or editing files. Show the proposed change first.
|
|
59
|
+
|
|
60
|
+
### 6. Re-run diagnostic
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
opsward diagnose .
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Show before/after scores.
|
|
67
|
+
|
|
68
|
+
## Scoring Dimensions (for reference)
|
|
69
|
+
|
|
70
|
+
- **CLAUDE.md quality** (35% weight): commands/workflows, architecture clarity, conventions, conciseness, currency, actionability
|
|
71
|
+
- **Documentation** (25%): docs_guide.md, core docs, content, cross-refs
|
|
72
|
+
- **Skills** (20%): SKILL.md presence, descriptions
|
|
73
|
+
- **Setup** (10%): rules, agents, hooks configuration
|
|
74
|
+
- **Cross-references** (10%): paths in CLAUDE.md that actually exist on disk
|
|
75
|
+
|
|
76
|
+
## Permissions
|
|
77
|
+
|
|
78
|
+
This skill needs no special permissions for diagnosis (read-only). Applying fixes requires write permission — Claude Code will prompt the user for approval on each write/edit action as configured in their permission settings.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opsward-generate
|
|
3
|
+
description: Generate missing AI setup artifacts for this project. Use when the user asks to scaffold, create, or bootstrap CLAUDE.md, docs, skills, or agent configuration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generate AI Setup Artifacts
|
|
7
|
+
|
|
8
|
+
Use opsward to scaffold missing artifacts, then go beyond templates — read the actual codebase and fill in real content.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Requires `opsward` to be installed (`pip install opsward`). If the command is not found, tell the user to install it.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
### 1. Preview what would be generated
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
opsward generate .
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This shows a dry-run list of files that would be created. Existing files are never overwritten.
|
|
23
|
+
|
|
24
|
+
### 2. Present the plan
|
|
25
|
+
|
|
26
|
+
For each proposed file:
|
|
27
|
+
- Explain what it is and why it's useful
|
|
28
|
+
- Note if it's a core artifact (CLAUDE.md, docs_guide) vs optional (roadmap, glossary)
|
|
29
|
+
- Let the user decide which files to create
|
|
30
|
+
|
|
31
|
+
### 3. Generate the scaffolds
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
opsward generate . --write
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 4. Replace templates with real content
|
|
38
|
+
|
|
39
|
+
This is the critical step. Opsward generates templates with placeholders — you turn them into useful documents by reading the actual project:
|
|
40
|
+
|
|
41
|
+
- **CLAUDE.md**: Read `pyproject.toml`/`package.json` for real project name and description. Scan source directories to build an accurate module map with real descriptions. Extract actual build/test/lint commands from config files. Check for linter/formatter configs and document real conventions.
|
|
42
|
+
- **architecture.md**: Read the source code to understand the real architecture. Document actual data flow, module responsibilities, and key abstractions.
|
|
43
|
+
- **conventions.md**: Look at existing code patterns — naming, error handling, import style — and document what you find.
|
|
44
|
+
- **docs_guide.md**: Verify it accurately indexes the docs that were created.
|
|
45
|
+
- **testing.md**: Read test files to document actual test patterns, fixtures, and how to run tests.
|
|
46
|
+
|
|
47
|
+
Use Read, Glob, Grep, and Bash freely to understand the project before writing.
|
|
48
|
+
|
|
49
|
+
### 5. Verify the result
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
opsward diagnose .
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Show the resulting score. If any component scores low, offer to improve it further.
|
|
56
|
+
|
|
57
|
+
## Permissions
|
|
58
|
+
|
|
59
|
+
- **Read access**: Used freely to inspect the project (always safe).
|
|
60
|
+
- **Write access**: Needed to create new files. Claude Code prompts for approval per the user's permission settings.
|
|
61
|
+
- **Bash**: Used to run opsward commands and inspect the project (e.g., `git log`, `tree`).
|
|
62
|
+
|
|
63
|
+
If the user wants to skip confirmation prompts for file creation, they can configure auto-allow for Write in their Claude Code settings — but this is their choice, not something the skill assumes.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opsward-maintain
|
|
3
|
+
description: Check documentation and AI setup for staleness, drift, or inconsistency. Use when the user asks to maintain, refresh, or update project docs and AI configuration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Maintain AI Setup
|
|
7
|
+
|
|
8
|
+
Run opsward's maintenance checks, go deeper with your own analysis, then fix issues found.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Requires `opsward` to be installed (`pip install opsward`). If the command is not found, tell the user to install it.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
### 1. Run maintenance checks
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
opsward maintain . --format json
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This returns issues categorized as: stale_path, sync_issue, outdated_doc, incomplete_skill, empty_doc. Also run the text version:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
opsward maintain .
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Go deeper than opsward
|
|
29
|
+
|
|
30
|
+
Opsward catches structural drift (broken paths, unlisted docs, empty stubs). You can catch semantic drift:
|
|
31
|
+
|
|
32
|
+
- **Accuracy**: Read docs and compare against the actual code. Does `architecture.md` still describe the real architecture? Has the module map in CLAUDE.md drifted from the actual directory structure?
|
|
33
|
+
- **Completeness**: Are there new modules, commands, or patterns not yet documented? Check `git log` for recent changes to source files that docs reference.
|
|
34
|
+
- **Obsolescence**: Do docs reference removed features, old API signatures, or deprecated patterns?
|
|
35
|
+
- **Consistency**: Do different docs contradict each other? Does CLAUDE.md say one thing while conventions.md says another?
|
|
36
|
+
|
|
37
|
+
Use Read, Grep, Glob, and Bash (`git log`, `git diff`) freely for this analysis.
|
|
38
|
+
|
|
39
|
+
### 3. Categorize and prioritize
|
|
40
|
+
|
|
41
|
+
Group all issues (opsward's + yours) by severity:
|
|
42
|
+
- **High priority**: Incorrect information (wrong commands, inaccurate architecture), broken references that mislead
|
|
43
|
+
- **Medium priority**: Outdated docs, incomplete descriptions, missing new content
|
|
44
|
+
- **Low priority**: Empty stubs, minor formatting, cosmetic issues
|
|
45
|
+
|
|
46
|
+
### 4. Propose and apply fixes
|
|
47
|
+
|
|
48
|
+
For each issue, propose a concrete fix:
|
|
49
|
+
- **Stale path**: Determine if the file was renamed, moved, or deleted. Update or remove the reference.
|
|
50
|
+
- **Inaccurate doc**: Read the source code and rewrite the relevant section with correct information.
|
|
51
|
+
- **Sync issue**: Add missing docs to docs_guide.md, or remove references to deleted docs.
|
|
52
|
+
- **Outdated doc**: Read the code it describes, update to reflect current state.
|
|
53
|
+
- **Incomplete skill**: Read the skill directory, write a proper SKILL.md with description.
|
|
54
|
+
- **Empty doc**: Read the project to understand what should go in it, write real content.
|
|
55
|
+
|
|
56
|
+
Always ask the user before writing or editing. Show proposed changes first. For destructive operations (removing content, deleting files), explain why and get explicit confirmation.
|
|
57
|
+
|
|
58
|
+
### 5. Verify
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
opsward maintain .
|
|
62
|
+
opsward diagnose .
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Show that issues are resolved and the overall score improved.
|
|
66
|
+
|
|
67
|
+
## Permissions
|
|
68
|
+
|
|
69
|
+
- **Read/Grep/Glob**: Used freely for analysis (always safe).
|
|
70
|
+
- **Edit**: Needed to fix existing files. Claude Code prompts per user settings.
|
|
71
|
+
- **Write**: Needed for new files. Claude Code prompts per user settings.
|
|
72
|
+
- **Bash**: For opsward commands and git inspection. Claude Code prompts per user settings.
|
|
73
|
+
|
|
74
|
+
This skill never deletes files without explicit user confirmation, even if the user has auto-allow enabled for other operations.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.ipynb linguist-documentation
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
name: Continuous Integration (uv)
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
|
|
4
|
+
# Note: Environment variables (PROJECT_NAME and vars from [tool.wads.ci.env])
|
|
5
|
+
# are set by the read-ci-config action in the setup job and made available
|
|
6
|
+
# to all subsequent jobs via GITHUB_ENV
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
# First job: Read configuration from pyproject.toml
|
|
10
|
+
setup:
|
|
11
|
+
name: Read Configuration
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
outputs:
|
|
14
|
+
project-name: ${{ steps.config.outputs.project-name }}
|
|
15
|
+
python-versions: ${{ steps.config.outputs.python-versions }}
|
|
16
|
+
pytest-args: ${{ steps.config.outputs.pytest-args }}
|
|
17
|
+
coverage-enabled: ${{ steps.config.outputs.coverage-enabled }}
|
|
18
|
+
exclude-paths: ${{ steps.config.outputs.exclude-paths }}
|
|
19
|
+
test-on-windows: ${{ steps.config.outputs.test-on-windows }}
|
|
20
|
+
build-sdist: ${{ steps.config.outputs.build-sdist }}
|
|
21
|
+
build-wheel: ${{ steps.config.outputs.build-wheel }}
|
|
22
|
+
metrics-enabled: ${{ steps.config.outputs.metrics-enabled }}
|
|
23
|
+
metrics-config-path: ${{ steps.config.outputs.metrics-config-path }}
|
|
24
|
+
metrics-storage-branch: ${{ steps.config.outputs.metrics-storage-branch }}
|
|
25
|
+
metrics-python-version: ${{ steps.config.outputs.metrics-python-version }}
|
|
26
|
+
metrics-force-run: ${{ steps.config.outputs.metrics-force-run }}
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- name: Set up uv
|
|
32
|
+
uses: astral-sh/setup-uv@v5
|
|
33
|
+
|
|
34
|
+
- name: Set up Python
|
|
35
|
+
run: uv python install 3.11
|
|
36
|
+
|
|
37
|
+
- name: Read CI Config
|
|
38
|
+
id: config
|
|
39
|
+
uses: i2mint/wads/actions/read-ci-config@master
|
|
40
|
+
with:
|
|
41
|
+
pyproject-path: .
|
|
42
|
+
|
|
43
|
+
# Second job: Validation using the config
|
|
44
|
+
validation:
|
|
45
|
+
name: Validation
|
|
46
|
+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
|
47
|
+
needs: setup
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
strategy:
|
|
50
|
+
matrix:
|
|
51
|
+
python-version: ${{ fromJson(needs.setup.outputs.python-versions) }}
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- name: Set up uv
|
|
57
|
+
uses: astral-sh/setup-uv@v5
|
|
58
|
+
with:
|
|
59
|
+
enable-cache: true
|
|
60
|
+
|
|
61
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
62
|
+
run: uv python install ${{ matrix.python-version }}
|
|
63
|
+
|
|
64
|
+
- name: Install System Dependencies
|
|
65
|
+
uses: i2mint/wads/actions/install-system-deps@master
|
|
66
|
+
with:
|
|
67
|
+
pyproject-path: .
|
|
68
|
+
|
|
69
|
+
- name: Create virtual environment
|
|
70
|
+
run: uv venv .venv
|
|
71
|
+
|
|
72
|
+
- name: Install Dependencies
|
|
73
|
+
run: |
|
|
74
|
+
source .venv/bin/activate
|
|
75
|
+
uv pip install -e ".[dev,test]"
|
|
76
|
+
|
|
77
|
+
- name: Format Source Code
|
|
78
|
+
run: uvx ruff format .
|
|
79
|
+
|
|
80
|
+
- name: Lint Validation
|
|
81
|
+
run: uvx ruff check --output-format=github ${{ needs.setup.outputs.project-name }}
|
|
82
|
+
|
|
83
|
+
- name: Run Tests
|
|
84
|
+
run: |
|
|
85
|
+
source .venv/bin/activate
|
|
86
|
+
PYTEST_ARGS="${{ needs.setup.outputs.pytest-args }}"
|
|
87
|
+
EXCLUDE="${{ needs.setup.outputs.exclude-paths }}"
|
|
88
|
+
COVERAGE="${{ needs.setup.outputs.coverage-enabled }}"
|
|
89
|
+
ROOT_DIR="${{ needs.setup.outputs.project-name }}"
|
|
90
|
+
|
|
91
|
+
CMD="python -m pytest"
|
|
92
|
+
|
|
93
|
+
# Add coverage flags
|
|
94
|
+
if [ "$COVERAGE" = "true" ]; then
|
|
95
|
+
uv pip install pytest-cov
|
|
96
|
+
CMD="$CMD --cov=$ROOT_DIR --cov-report=term-missing"
|
|
97
|
+
fi
|
|
98
|
+
|
|
99
|
+
# Skip doctest-modules (backends require optional deps + audio fixtures)
|
|
100
|
+
# CMD="$CMD --doctest-modules"
|
|
101
|
+
# CMD="$CMD -o doctest_optionflags='ELLIPSIS IGNORE_EXCEPTION_DETAIL'"
|
|
102
|
+
|
|
103
|
+
# Add exclude paths
|
|
104
|
+
if [ -n "$EXCLUDE" ]; then
|
|
105
|
+
IFS=',' read -ra PATHS <<< "$EXCLUDE"
|
|
106
|
+
for path in "${PATHS[@]}"; do
|
|
107
|
+
path=$(echo "$path" | xargs)
|
|
108
|
+
CMD="$CMD --ignore=$path"
|
|
109
|
+
done
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
# Add extra pytest args
|
|
113
|
+
if [ -n "$PYTEST_ARGS" ]; then
|
|
114
|
+
CMD="$CMD $PYTEST_ARGS"
|
|
115
|
+
fi
|
|
116
|
+
|
|
117
|
+
# Add test directories (both tests/ and source for doctests)
|
|
118
|
+
CMD="$CMD tests/"
|
|
119
|
+
|
|
120
|
+
echo "Running: $CMD"
|
|
121
|
+
eval $CMD
|
|
122
|
+
|
|
123
|
+
- name: Track Code Metrics
|
|
124
|
+
if: needs.setup.outputs.metrics-enabled == 'true'
|
|
125
|
+
uses: i2mint/umpyre/actions/track-metrics@master
|
|
126
|
+
continue-on-error: true
|
|
127
|
+
with:
|
|
128
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
129
|
+
config-path: ${{ needs.setup.outputs.metrics-config-path }}
|
|
130
|
+
storage-branch: ${{ needs.setup.outputs.metrics-storage-branch }}
|
|
131
|
+
python-version: ${{ needs.setup.outputs.metrics-python-version }}
|
|
132
|
+
force-run: ${{ needs.setup.outputs.metrics-force-run }}
|
|
133
|
+
|
|
134
|
+
# Optional Windows testing (if enabled in config)
|
|
135
|
+
windows-validation:
|
|
136
|
+
name: Windows Tests
|
|
137
|
+
if: "!contains(github.event.head_commit.message, '[skip ci]') && needs.setup.outputs.test-on-windows == 'true'"
|
|
138
|
+
needs: setup
|
|
139
|
+
runs-on: windows-latest
|
|
140
|
+
continue-on-error: true
|
|
141
|
+
|
|
142
|
+
steps:
|
|
143
|
+
- uses: actions/checkout@v4
|
|
144
|
+
|
|
145
|
+
- name: Set up uv
|
|
146
|
+
uses: astral-sh/setup-uv@v5
|
|
147
|
+
with:
|
|
148
|
+
enable-cache: true
|
|
149
|
+
|
|
150
|
+
- name: Set up Python
|
|
151
|
+
run: uv python install ${{ fromJson(needs.setup.outputs.python-versions)[0] }}
|
|
152
|
+
|
|
153
|
+
- name: Install System Dependencies
|
|
154
|
+
uses: i2mint/wads/actions/install-system-deps@master
|
|
155
|
+
with:
|
|
156
|
+
pyproject-path: .
|
|
157
|
+
|
|
158
|
+
- name: Create virtual environment
|
|
159
|
+
run: uv venv .venv
|
|
160
|
+
|
|
161
|
+
- name: Install Dependencies
|
|
162
|
+
run: |
|
|
163
|
+
.venv\Scripts\activate
|
|
164
|
+
uv pip install -e ".[dev,test]"
|
|
165
|
+
|
|
166
|
+
- name: Run tests
|
|
167
|
+
id: test
|
|
168
|
+
continue-on-error: true
|
|
169
|
+
run: pytest
|
|
170
|
+
|
|
171
|
+
- name: Report test results
|
|
172
|
+
if: always()
|
|
173
|
+
run: |
|
|
174
|
+
if ("${{ steps.test.outcome }}" -eq "failure") {
|
|
175
|
+
echo "::warning::Windows tests failed but workflow continues"
|
|
176
|
+
echo "## ⚠️ Windows Tests Failed" >> $env:GITHUB_STEP_SUMMARY
|
|
177
|
+
echo "Tests failed on Windows but this is informational only." >> $env:GITHUB_STEP_SUMMARY
|
|
178
|
+
} else {
|
|
179
|
+
echo "## ✅ Windows Tests Passed" >> $env:GITHUB_STEP_SUMMARY
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
# Publishing job
|
|
183
|
+
publish:
|
|
184
|
+
name: Publish
|
|
185
|
+
permissions:
|
|
186
|
+
contents: write
|
|
187
|
+
if: "!contains(github.event.head_commit.message, '[skip ci]') && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')"
|
|
188
|
+
needs: [setup, validation]
|
|
189
|
+
runs-on: ubuntu-latest
|
|
190
|
+
|
|
191
|
+
steps:
|
|
192
|
+
- uses: actions/checkout@v4
|
|
193
|
+
with:
|
|
194
|
+
fetch-depth: 0
|
|
195
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
196
|
+
|
|
197
|
+
- name: Set up uv
|
|
198
|
+
uses: astral-sh/setup-uv@v5
|
|
199
|
+
|
|
200
|
+
- name: Set up Python
|
|
201
|
+
run: uv python install ${{ fromJson(needs.setup.outputs.python-versions)[0] }}
|
|
202
|
+
|
|
203
|
+
- name: Format Source Code
|
|
204
|
+
run: uvx ruff format .
|
|
205
|
+
|
|
206
|
+
- name: Update Version Number
|
|
207
|
+
id: version
|
|
208
|
+
uses: i2mint/isee/actions/bump-version-number@master
|
|
209
|
+
|
|
210
|
+
- name: Build Distribution
|
|
211
|
+
run: |
|
|
212
|
+
BUILD_ARGS=""
|
|
213
|
+
if [ "${{ needs.setup.outputs.build-sdist }}" = "false" ]; then
|
|
214
|
+
BUILD_ARGS="$BUILD_ARGS --no-sdist"
|
|
215
|
+
fi
|
|
216
|
+
if [ "${{ needs.setup.outputs.build-wheel }}" = "false" ]; then
|
|
217
|
+
BUILD_ARGS="$BUILD_ARGS --no-wheel"
|
|
218
|
+
fi
|
|
219
|
+
uv build $BUILD_ARGS
|
|
220
|
+
|
|
221
|
+
- name: Publish to PyPI
|
|
222
|
+
env:
|
|
223
|
+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD }}
|
|
224
|
+
run: uv publish dist/*
|
|
225
|
+
|
|
226
|
+
- name: Force SSH for git remote
|
|
227
|
+
run: |
|
|
228
|
+
git remote set-url origin git@github.com:${{ github.repository }}.git
|
|
229
|
+
|
|
230
|
+
- name: Commit Changes
|
|
231
|
+
uses: i2mint/wads/actions/git-commit@master
|
|
232
|
+
with:
|
|
233
|
+
commit-message: "**CI** Formatted code + Updated version to ${{ env.VERSION }} [skip ci]"
|
|
234
|
+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
235
|
+
push: true
|
|
236
|
+
|
|
237
|
+
- name: Tag Repository
|
|
238
|
+
uses: i2mint/wads/actions/git-tag@master
|
|
239
|
+
with:
|
|
240
|
+
tag: ${{ env.VERSION }}
|
|
241
|
+
message: "Release version ${{ env.VERSION }}"
|
|
242
|
+
push: true
|
|
243
|
+
|
|
244
|
+
# Optional GitHub Pages
|
|
245
|
+
github-pages:
|
|
246
|
+
name: Publish GitHub Pages
|
|
247
|
+
permissions:
|
|
248
|
+
contents: write
|
|
249
|
+
pages: write
|
|
250
|
+
id-token: write
|
|
251
|
+
if: "!contains(github.event.head_commit.message, '[skip ci]') && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)"
|
|
252
|
+
needs: publish
|
|
253
|
+
runs-on: ubuntu-latest
|
|
254
|
+
|
|
255
|
+
steps:
|
|
256
|
+
- uses: i2mint/epythet/actions/publish-github-pages@master
|
|
257
|
+
with:
|
|
258
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
259
|
+
ignore: "tests/,scrap/,examples/"
|
denote-0.0.2/.gitignore
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
wads_configs.json
|
|
2
|
+
data/wads_configs.json
|
|
3
|
+
wads/data/wads_configs.json
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
.DS_Store
|
|
12
|
+
# C extensions
|
|
13
|
+
*.so
|
|
14
|
+
|
|
15
|
+
# TLS certificates
|
|
16
|
+
## Ignore all PEM files anywhere
|
|
17
|
+
*.pem
|
|
18
|
+
## Also ignore any certs directory
|
|
19
|
+
certs/
|
|
20
|
+
|
|
21
|
+
# Distribution / packaging
|
|
22
|
+
.Python
|
|
23
|
+
build/
|
|
24
|
+
develop-eggs/
|
|
25
|
+
dist/
|
|
26
|
+
downloads/
|
|
27
|
+
eggs/
|
|
28
|
+
.eggs/
|
|
29
|
+
lib/
|
|
30
|
+
lib64/
|
|
31
|
+
parts/
|
|
32
|
+
sdist/
|
|
33
|
+
var/
|
|
34
|
+
wheels/
|
|
35
|
+
*.egg-info/
|
|
36
|
+
.installed.cfg
|
|
37
|
+
*.egg
|
|
38
|
+
MANIFEST
|
|
39
|
+
_build
|
|
40
|
+
|
|
41
|
+
# PyInstaller
|
|
42
|
+
# Usually these files are written by a python script from a template
|
|
43
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
44
|
+
*.manifest
|
|
45
|
+
*.spec
|
|
46
|
+
|
|
47
|
+
# Installer logs
|
|
48
|
+
pip-log.txt
|
|
49
|
+
pip-delete-this-directory.txt
|
|
50
|
+
|
|
51
|
+
# Unit test / coverage reports
|
|
52
|
+
htmlcov/
|
|
53
|
+
.tox/
|
|
54
|
+
.coverage
|
|
55
|
+
.coverage.*
|
|
56
|
+
.cache
|
|
57
|
+
nosetests.xml
|
|
58
|
+
coverage.xml
|
|
59
|
+
*.cover
|
|
60
|
+
.hypothesis/
|
|
61
|
+
.pytest_cache/
|
|
62
|
+
|
|
63
|
+
# Translations
|
|
64
|
+
*.mo
|
|
65
|
+
*.pot
|
|
66
|
+
|
|
67
|
+
# Django stuff:
|
|
68
|
+
*.log
|
|
69
|
+
local_settings.py
|
|
70
|
+
db.sqlite3
|
|
71
|
+
|
|
72
|
+
# Flask stuff:
|
|
73
|
+
instance/
|
|
74
|
+
.webassets-cache
|
|
75
|
+
|
|
76
|
+
# Scrapy stuff:
|
|
77
|
+
.scrapy
|
|
78
|
+
|
|
79
|
+
# Sphinx documentation
|
|
80
|
+
docs/_build/
|
|
81
|
+
docs/*
|
|
82
|
+
|
|
83
|
+
# PyBuilder
|
|
84
|
+
target/
|
|
85
|
+
|
|
86
|
+
# Jupyter Notebook
|
|
87
|
+
.ipynb_checkpoints
|
|
88
|
+
|
|
89
|
+
# pyenv
|
|
90
|
+
.python-version
|
|
91
|
+
|
|
92
|
+
# celery beat schedule file
|
|
93
|
+
celerybeat-schedule
|
|
94
|
+
|
|
95
|
+
# SageMath parsed files
|
|
96
|
+
*.sage.py
|
|
97
|
+
|
|
98
|
+
# Environments
|
|
99
|
+
.env
|
|
100
|
+
.venv
|
|
101
|
+
env/
|
|
102
|
+
venv/
|
|
103
|
+
ENV/
|
|
104
|
+
env.bak/
|
|
105
|
+
venv.bak/
|
|
106
|
+
|
|
107
|
+
# Spyder project settings
|
|
108
|
+
.spyderproject
|
|
109
|
+
.spyproject
|
|
110
|
+
|
|
111
|
+
# Rope project settings
|
|
112
|
+
.ropeproject
|
|
113
|
+
|
|
114
|
+
# mkdocs documentation
|
|
115
|
+
/site
|
|
116
|
+
|
|
117
|
+
# mypy
|
|
118
|
+
.mypy_cache/
|
|
119
|
+
|
|
120
|
+
# PyCharm
|
|
121
|
+
.idea
|