medium-modulation 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.
- medium_modulation-0.1.0/.github/workflows/ci.yml +48 -0
- medium_modulation-0.1.0/.gitignore +22 -0
- medium_modulation-0.1.0/.pre-commit-config.yaml +17 -0
- medium_modulation-0.1.0/LICENSE +21 -0
- medium_modulation-0.1.0/PKG-INFO +98 -0
- medium_modulation-0.1.0/README.md +72 -0
- medium_modulation-0.1.0/docs/cli.md +88 -0
- medium_modulation-0.1.0/docs/index.md +37 -0
- medium_modulation-0.1.0/docs/templates.md +111 -0
- medium_modulation-0.1.0/domains.yaml +5 -0
- medium_modulation-0.1.0/mkdocs.yml +43 -0
- medium_modulation-0.1.0/pyproject.toml +54 -0
- medium_modulation-0.1.0/src/medium_modulation/__init__.py +7 -0
- medium_modulation-0.1.0/src/medium_modulation/cli.py +80 -0
- medium_modulation-0.1.0/src/medium_modulation/core.py +75 -0
- medium_modulation-0.1.0/src/medium_modulation/entropy_table_bridge.py +42 -0
- medium_modulation-0.1.0/tests/__init__.py +0 -0
- medium_modulation-0.1.0/tests/test_bridge.py +68 -0
- medium_modulation-0.1.0/tests/test_cli.py +70 -0
- medium_modulation-0.1.0/tests/test_core.py +99 -0
- medium_modulation-0.1.0/uv.lock +1713 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.11", "3.12"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@v5
|
|
22
|
+
with:
|
|
23
|
+
version: "latest"
|
|
24
|
+
|
|
25
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
26
|
+
run: uv python install ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: uv sync --extra dev
|
|
30
|
+
|
|
31
|
+
- name: Lint (ruff)
|
|
32
|
+
run: uv run ruff check .
|
|
33
|
+
|
|
34
|
+
- name: Format check (ruff)
|
|
35
|
+
run: uv run ruff format --check .
|
|
36
|
+
|
|
37
|
+
- name: Run tests
|
|
38
|
+
run: uv run pytest
|
|
39
|
+
|
|
40
|
+
docs:
|
|
41
|
+
name: Build docs
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
- uses: astral-sh/setup-uv@v5
|
|
46
|
+
- run: uv python install 3.11
|
|
47
|
+
- run: uv sync --extra docs
|
|
48
|
+
- run: uv run mkdocs build --strict
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.6.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
10
|
+
rev: v4.6.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: trailing-whitespace
|
|
13
|
+
- id: end-of-file-fixer
|
|
14
|
+
- id: check-yaml
|
|
15
|
+
- id: check-toml
|
|
16
|
+
- id: check-merge-conflict
|
|
17
|
+
- id: debug-statements
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 JohannRömer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: medium-modulation
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Resonant medium between S∝A and S∝V – fractal modulation operators, resonance spectra and tunable interference for controlled information propagation.
|
|
5
|
+
Project-URL: Repository, https://github.com/GenesisAeon/medium-modulation
|
|
6
|
+
Project-URL: Issues, https://github.com/GenesisAeon/medium-modulation/issues
|
|
7
|
+
Author-email: GenesisAeon Team <team@genesisaeon.org>
|
|
8
|
+
License: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Requires-Dist: entropy-governance>=0.1.0
|
|
12
|
+
Requires-Dist: entropy-table>=1.0.1
|
|
13
|
+
Requires-Dist: implosive-genesis>=0.4.0
|
|
14
|
+
Requires-Dist: numpy>=2.0.0
|
|
15
|
+
Requires-Dist: rich>=13.0.0
|
|
16
|
+
Requires-Dist: sympy>=1.13.0
|
|
17
|
+
Requires-Dist: typer>=0.15.0
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
20
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
21
|
+
Requires-Dist: ruff>=0.9; extra == 'dev'
|
|
22
|
+
Provides-Extra: docs
|
|
23
|
+
Requires-Dist: mkdocs-material>=9.5.0; extra == 'docs'
|
|
24
|
+
Requires-Dist: mkdocs>=1.6.0; extra == 'docs'
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# medium-modulation
|
|
28
|
+
|
|
29
|
+
**The resonant medium between action and expanse.**
|
|
30
|
+
|
|
31
|
+
[](https://github.com/GenesisAeon/medium-modulation/actions/workflows/ci.yml)
|
|
32
|
+
[](https://www.python.org)
|
|
33
|
+
[](LICENSE)
|
|
34
|
+
|
|
35
|
+
medium-modulation serves as the dynamic coupling layer that modulates the fundamental duality of the GenesisAeon framework: action-governed entropy production (S ∝ A) versus volume-governed informational expansion (S ∝ V).
|
|
36
|
+
|
|
37
|
+
Through fractal modulation operators, resonance spectra, and tunable interference fields, it turns raw tension into coherent emergence.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install medium-modulation
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
mm modulate --depth 0.7 --freq 2.3
|
|
51
|
+
mm spectrum
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## API
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from medium_modulation.core import modulated_entropy, resonance_spectrum, coupling_factor
|
|
58
|
+
import numpy as np
|
|
59
|
+
|
|
60
|
+
# Fractal medium modulation
|
|
61
|
+
S_mod = modulated_entropy(S_A=1.0, S_V=1.618, depth=0.5, freq=1.0, t=0.0)
|
|
62
|
+
|
|
63
|
+
# Resonance spectrum over frequency range
|
|
64
|
+
freqs = np.linspace(0.1, 10, 50)
|
|
65
|
+
spec = resonance_spectrum(freqs, depth=0.5)
|
|
66
|
+
|
|
67
|
+
# Dynamic coupling strength
|
|
68
|
+
kappa = coupling_factor(A=1.0, V=1.618, modulation_depth=0.5)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Architecture
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
medium-modulation/
|
|
75
|
+
├── src/medium_modulation/
|
|
76
|
+
│ ├── core.py # Modulation operator + fractal coupling
|
|
77
|
+
│ ├── cli.py # CLI mm
|
|
78
|
+
│ └── entropy_table_bridge.py # entropy-table integration
|
|
79
|
+
├── tests/
|
|
80
|
+
│ ├── test_core.py
|
|
81
|
+
│ └── test_cli.py
|
|
82
|
+
└── domains.yaml # Domain configuration
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Integrations
|
|
86
|
+
|
|
87
|
+
| Package | Role |
|
|
88
|
+
|---------|------|
|
|
89
|
+
| `entropy-governance` | Duality factor α·S_A + (1-α)·S_V |
|
|
90
|
+
| `entropy-table` | Domain relation registry |
|
|
91
|
+
| `implosive-genesis` | Fractal emergence substrate |
|
|
92
|
+
|
|
93
|
+
**DOI** (after Zenodo release): 10.5281/zenodo.XXXXXXX
|
|
94
|
+
**PyPI**: https://pypi.org/project/medium-modulation/
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
Built with [SymPy](https://www.sympy.org/) · [NumPy](https://numpy.org/) · [Typer](https://typer.tiangolo.com/) · [Rich](https://rich.readthedocs.io/)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# medium-modulation
|
|
2
|
+
|
|
3
|
+
**The resonant medium between action and expanse.**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/GenesisAeon/medium-modulation/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.python.org)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
medium-modulation serves as the dynamic coupling layer that modulates the fundamental duality of the GenesisAeon framework: action-governed entropy production (S ∝ A) versus volume-governed informational expansion (S ∝ V).
|
|
10
|
+
|
|
11
|
+
Through fractal modulation operators, resonance spectra, and tunable interference fields, it turns raw tension into coherent emergence.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install medium-modulation
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
mm modulate --depth 0.7 --freq 2.3
|
|
25
|
+
mm spectrum
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## API
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from medium_modulation.core import modulated_entropy, resonance_spectrum, coupling_factor
|
|
32
|
+
import numpy as np
|
|
33
|
+
|
|
34
|
+
# Fractal medium modulation
|
|
35
|
+
S_mod = modulated_entropy(S_A=1.0, S_V=1.618, depth=0.5, freq=1.0, t=0.0)
|
|
36
|
+
|
|
37
|
+
# Resonance spectrum over frequency range
|
|
38
|
+
freqs = np.linspace(0.1, 10, 50)
|
|
39
|
+
spec = resonance_spectrum(freqs, depth=0.5)
|
|
40
|
+
|
|
41
|
+
# Dynamic coupling strength
|
|
42
|
+
kappa = coupling_factor(A=1.0, V=1.618, modulation_depth=0.5)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Architecture
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
medium-modulation/
|
|
49
|
+
├── src/medium_modulation/
|
|
50
|
+
│ ├── core.py # Modulation operator + fractal coupling
|
|
51
|
+
│ ├── cli.py # CLI mm
|
|
52
|
+
│ └── entropy_table_bridge.py # entropy-table integration
|
|
53
|
+
├── tests/
|
|
54
|
+
│ ├── test_core.py
|
|
55
|
+
│ └── test_cli.py
|
|
56
|
+
└── domains.yaml # Domain configuration
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Integrations
|
|
60
|
+
|
|
61
|
+
| Package | Role |
|
|
62
|
+
|---------|------|
|
|
63
|
+
| `entropy-governance` | Duality factor α·S_A + (1-α)·S_V |
|
|
64
|
+
| `entropy-table` | Domain relation registry |
|
|
65
|
+
| `implosive-genesis` | Fractal emergence substrate |
|
|
66
|
+
|
|
67
|
+
**DOI** (after Zenodo release): 10.5281/zenodo.XXXXXXX
|
|
68
|
+
**PyPI**: https://pypi.org/project/medium-modulation/
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
Built with [SymPy](https://www.sympy.org/) · [NumPy](https://numpy.org/) · [Typer](https://typer.tiangolo.com/) · [Rich](https://rich.readthedocs.io/)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# CLI Reference
|
|
2
|
+
|
|
3
|
+
## `diamond scaffold`
|
|
4
|
+
|
|
5
|
+
Create a new project from a template.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Usage: diamond scaffold [OPTIONS] PROJECT_NAME
|
|
9
|
+
|
|
10
|
+
Arguments:
|
|
11
|
+
PROJECT_NAME Name of the new project (kebab-case recommended)
|
|
12
|
+
|
|
13
|
+
Options:
|
|
14
|
+
-t, --template TEXT Template to use [default: minimal]
|
|
15
|
+
-o, --output-dir PATH Parent directory for the new project
|
|
16
|
+
--author TEXT Author name
|
|
17
|
+
--description TEXT Short project description
|
|
18
|
+
--python-version TEXT Minimum Python version (e.g. 3.11)
|
|
19
|
+
--dry-run Preview files without writing them
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Examples**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Minimal project in the current directory
|
|
26
|
+
diamond scaffold my-lib
|
|
27
|
+
|
|
28
|
+
# Genesis preset with custom author
|
|
29
|
+
diamond scaffold my-physics-tool --template genesis --author "Ada Lovelace"
|
|
30
|
+
|
|
31
|
+
# Preview what would be created
|
|
32
|
+
diamond scaffold my-lib --dry-run
|
|
33
|
+
|
|
34
|
+
# Output to a specific directory
|
|
35
|
+
diamond scaffold my-lib --output-dir ~/projects
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## `diamond list-templates`
|
|
41
|
+
|
|
42
|
+
List all available templates with their descriptions.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
diamond list-templates
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## `diamond validate`
|
|
51
|
+
|
|
52
|
+
Validate a project directory against diamond-setup best practices.
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Usage: diamond validate [PATH]
|
|
56
|
+
|
|
57
|
+
Arguments:
|
|
58
|
+
PATH Project directory to validate [default: current directory]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Checks performed:
|
|
62
|
+
|
|
63
|
+
| Check | Level |
|
|
64
|
+
|-------|-------|
|
|
65
|
+
| `pyproject.toml` present | **Error** |
|
|
66
|
+
| `src/` layout present | Warning |
|
|
67
|
+
| `tests/` directory present | Warning |
|
|
68
|
+
| `.github/workflows/` present | Warning |
|
|
69
|
+
| `README.md` present | Warning |
|
|
70
|
+
| `.gitignore` present | Warning |
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Validate the current directory
|
|
74
|
+
diamond validate
|
|
75
|
+
|
|
76
|
+
# Validate a specific project
|
|
77
|
+
diamond validate path/to/my-project
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## `diamond version`
|
|
83
|
+
|
|
84
|
+
Print the installed version.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
diamond version
|
|
88
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Diamond Setup
|
|
2
|
+
|
|
3
|
+
**Universal Python project scaffold** — generate professional, CI-ready project skeletons in seconds.
|
|
4
|
+
|
|
5
|
+
No cookiecutter, no Jinja2, no magic. Just a clean CLI, sensible templates, and a validator that keeps your projects healthy.
|
|
6
|
+
|
|
7
|
+
## Quickstart
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install diamond-setup
|
|
11
|
+
# or with uv:
|
|
12
|
+
uv tool install diamond-setup
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
diamond scaffold my-new-tool
|
|
17
|
+
cd my-new-tool && uv sync --dev && uv run pytest
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Why Diamond Setup?
|
|
21
|
+
|
|
22
|
+
| Feature | diamond-setup | cookiecutter | copier |
|
|
23
|
+
|---------|:---:|:---:|:---:|
|
|
24
|
+
| Zero config needed | ✅ | ❌ | ❌ |
|
|
25
|
+
| Built-in validator | ✅ | ❌ | ❌ |
|
|
26
|
+
| Pure Python templates | ✅ | ❌ | ❌ |
|
|
27
|
+
| `--dry-run` support | ✅ | ❌ | ✅ |
|
|
28
|
+
| Extensible presets | ✅ | ✅ | ✅ |
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
| Command | Description |
|
|
33
|
+
|---------|-------------|
|
|
34
|
+
| `diamond scaffold <name>` | Create a new project |
|
|
35
|
+
| `diamond list-templates` | Show available templates |
|
|
36
|
+
| `diamond validate [path]` | Check a project's health |
|
|
37
|
+
| `diamond version` | Show version |
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Templates
|
|
2
|
+
|
|
3
|
+
Diamond Setup ships two built-in templates. Adding your own is a single Python file.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## `minimal`
|
|
8
|
+
|
|
9
|
+
**The default.** A clean, modern Python project with everything you need and nothing you don't.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
diamond scaffold my-lib
|
|
13
|
+
diamond scaffold my-lib --template minimal
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### Files generated
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
my-lib/
|
|
20
|
+
├── src/
|
|
21
|
+
│ └── my_lib/
|
|
22
|
+
│ └── __init__.py
|
|
23
|
+
├── tests/
|
|
24
|
+
│ ├── __init__.py
|
|
25
|
+
│ └── test_main.py
|
|
26
|
+
├── .github/
|
|
27
|
+
│ └── workflows/
|
|
28
|
+
│ └── ci.yml
|
|
29
|
+
├── pyproject.toml
|
|
30
|
+
├── README.md
|
|
31
|
+
├── .gitignore
|
|
32
|
+
└── .pre-commit-config.yaml
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Variables
|
|
36
|
+
|
|
37
|
+
| Variable | Default | Description |
|
|
38
|
+
|----------|---------|-------------|
|
|
39
|
+
| `name` | *(required)* | Project name |
|
|
40
|
+
| `description` | `"A Python project"` | Short description |
|
|
41
|
+
| `author` | `"Your Name"` | Author name |
|
|
42
|
+
| `python_version` | `"3.11"` | Minimum Python version |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## `genesis`
|
|
47
|
+
|
|
48
|
+
A superset of `minimal` — adds a `domains.yaml` for domain/metric configuration and an `entropy-table` YAML bridge module.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
diamond scaffold my-physics-tool --template genesis
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Extra files
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
my-physics-tool/
|
|
58
|
+
├── domains.yaml ← domain/metric configuration
|
|
59
|
+
├── config/
|
|
60
|
+
│ └── entropy.yaml ← entropy-table bridge config
|
|
61
|
+
└── src/
|
|
62
|
+
└── my_physics_tool/
|
|
63
|
+
├── __init__.py
|
|
64
|
+
└── bridge.py ← entropy-table export function
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Extra variables
|
|
68
|
+
|
|
69
|
+
| Variable | Default | Description |
|
|
70
|
+
|----------|---------|-------------|
|
|
71
|
+
| `metrics` | `"crep"` | Default metrics identifier |
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Adding a Custom Template
|
|
76
|
+
|
|
77
|
+
1. Create `src/diamond_setup/templates/my_template.py`:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
TEMPLATE = {
|
|
81
|
+
"name": "my_template",
|
|
82
|
+
"description": "My custom template",
|
|
83
|
+
"variables": ["name", "description", "author", "python_version"],
|
|
84
|
+
"defaults": {
|
|
85
|
+
"description": "My project",
|
|
86
|
+
"author": "Your Name",
|
|
87
|
+
"python_version": "3.11",
|
|
88
|
+
},
|
|
89
|
+
"files": {
|
|
90
|
+
"README.md": "# ${name}\n\n${description}\n",
|
|
91
|
+
"pyproject.toml": "...",
|
|
92
|
+
# keys are relative paths, values are template strings
|
|
93
|
+
# use ${variable} for substitution
|
|
94
|
+
# use $$ for a literal dollar sign
|
|
95
|
+
},
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
2. Register it in `src/diamond_setup/templates/__init__.py`:
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
from .my_template import TEMPLATE as MY_TEMPLATE
|
|
103
|
+
|
|
104
|
+
REGISTRY: dict[str, dict] = {
|
|
105
|
+
"minimal": MINIMAL_TEMPLATE,
|
|
106
|
+
"genesis": GENESIS_TEMPLATE,
|
|
107
|
+
"my_template": MY_TEMPLATE, # ← add this
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
That's it. `diamond list-templates` will immediately show it.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
site_name: Diamond Setup
|
|
2
|
+
site_description: Universal Python project scaffold — generate professional project skeletons in seconds
|
|
3
|
+
site_author: GenesisAeon
|
|
4
|
+
repo_url: https://github.com/GenesisAeon/diamond-setup
|
|
5
|
+
repo_name: GenesisAeon/diamond-setup
|
|
6
|
+
|
|
7
|
+
theme:
|
|
8
|
+
name: material
|
|
9
|
+
palette:
|
|
10
|
+
- media: "(prefers-color-scheme: light)"
|
|
11
|
+
scheme: default
|
|
12
|
+
primary: indigo
|
|
13
|
+
accent: indigo
|
|
14
|
+
toggle:
|
|
15
|
+
icon: material/brightness-7
|
|
16
|
+
name: Switch to dark mode
|
|
17
|
+
- media: "(prefers-color-scheme: dark)"
|
|
18
|
+
scheme: slate
|
|
19
|
+
primary: indigo
|
|
20
|
+
accent: indigo
|
|
21
|
+
toggle:
|
|
22
|
+
icon: material/brightness-4
|
|
23
|
+
name: Switch to light mode
|
|
24
|
+
features:
|
|
25
|
+
- navigation.tabs
|
|
26
|
+
- navigation.sections
|
|
27
|
+
- navigation.top
|
|
28
|
+
- content.code.annotate
|
|
29
|
+
- content.code.copy
|
|
30
|
+
- search.highlight
|
|
31
|
+
|
|
32
|
+
markdown_extensions:
|
|
33
|
+
- admonition
|
|
34
|
+
- pymdownx.highlight:
|
|
35
|
+
anchor_linenums: true
|
|
36
|
+
- pymdownx.superfences
|
|
37
|
+
- pymdownx.tabbed:
|
|
38
|
+
alternate_style: true
|
|
39
|
+
|
|
40
|
+
nav:
|
|
41
|
+
- Home: index.md
|
|
42
|
+
- CLI Reference: cli.md
|
|
43
|
+
- Templates: templates.md
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "medium-modulation"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Resonant medium between S∝A and S∝V – fractal modulation operators, resonance spectra and tunable interference for controlled information propagation."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
license = {text = "MIT"}
|
|
8
|
+
authors = [{name = "GenesisAeon Team", email = "team@genesisaeon.org"}]
|
|
9
|
+
dependencies = [
|
|
10
|
+
"entropy-governance>=0.1.0",
|
|
11
|
+
"entropy-table>=1.0.1",
|
|
12
|
+
"implosive-genesis>=0.4.0",
|
|
13
|
+
"sympy>=1.13.0",
|
|
14
|
+
"typer>=0.15.0",
|
|
15
|
+
"numpy>=2.0.0",
|
|
16
|
+
"rich>=13.0.0"
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.optional-dependencies]
|
|
20
|
+
dev = ["pytest>=8.0", "pytest-cov>=5.0", "ruff>=0.9"]
|
|
21
|
+
docs = ["mkdocs>=1.6.0", "mkdocs-material>=9.5.0"]
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
mm = "medium_modulation.cli:app"
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Repository = "https://github.com/GenesisAeon/medium-modulation"
|
|
28
|
+
Issues = "https://github.com/GenesisAeon/medium-modulation/issues"
|
|
29
|
+
|
|
30
|
+
[build-system]
|
|
31
|
+
requires = ["hatchling"]
|
|
32
|
+
build-backend = "hatchling.build"
|
|
33
|
+
|
|
34
|
+
[tool.hatch.build.targets.wheel]
|
|
35
|
+
packages = ["src/medium_modulation"]
|
|
36
|
+
|
|
37
|
+
[tool.ruff]
|
|
38
|
+
line-length = 88
|
|
39
|
+
target-version = "py310"
|
|
40
|
+
|
|
41
|
+
[tool.ruff.lint]
|
|
42
|
+
select = ["E", "F", "B", "I", "W", "UP", "C4", "SIM"]
|
|
43
|
+
ignore = ["B008"]
|
|
44
|
+
|
|
45
|
+
[tool.ruff.lint.per-file-ignores]
|
|
46
|
+
"tests/**" = ["S101"]
|
|
47
|
+
|
|
48
|
+
[tool.pytest.ini_options]
|
|
49
|
+
testpaths = ["tests"]
|
|
50
|
+
addopts = "--cov=medium_modulation --cov-report=term-missing -v"
|
|
51
|
+
|
|
52
|
+
[tool.coverage.run]
|
|
53
|
+
source = ["src"]
|
|
54
|
+
omit = ["tests/*"]
|