mif-dal 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.
- mif_dal-0.1.0/.coveragerc +9 -0
- mif_dal-0.1.0/.github/workflows/ci.yml +124 -0
- mif_dal-0.1.0/.github/workflows/mif-dal-publish.yml +31 -0
- mif_dal-0.1.0/.gitignore +104 -0
- mif_dal-0.1.0/CHANGELOG.md +31 -0
- mif_dal-0.1.0/CONTRIBUTING.md +354 -0
- mif_dal-0.1.0/LICENSE +21 -0
- mif_dal-0.1.0/PKG-INFO +285 -0
- mif_dal-0.1.0/README.md +255 -0
- mif_dal-0.1.0/TROUBLESHOOTING.md +220 -0
- mif_dal-0.1.0/dal/__init__.py +29 -0
- mif_dal-0.1.0/dal/adapters/__init__.py +7 -0
- mif_dal-0.1.0/dal/adapters/dukascopy.py +349 -0
- mif_dal-0.1.0/dal/adapters/in_memory.py +93 -0
- mif_dal-0.1.0/dal/adapters/kraken.py +319 -0
- mif_dal-0.1.0/dal/adapters/yahoo.py +369 -0
- mif_dal-0.1.0/dal/core/__init__.py +6 -0
- mif_dal-0.1.0/dal/core/assembler.py +0 -0
- mif_dal-0.1.0/dal/core/config.py +22 -0
- mif_dal-0.1.0/dal/core/handoff.py +130 -0
- mif_dal-0.1.0/dal/core/pipeline.py +116 -0
- mif_dal-0.1.0/dal/core/sources.py +205 -0
- mif_dal-0.1.0/dal/core/utils.py +0 -0
- mif_dal-0.1.0/dal/dal.py +122 -0
- mif_dal-0.1.0/dal/exceptions.py +82 -0
- mif_dal-0.1.0/dal/interfaces/__init__.py +15 -0
- mif_dal-0.1.0/dal/interfaces/source.py +65 -0
- mif_dal-0.1.0/deploy.sh +231 -0
- mif_dal-0.1.0/docs/API.md +234 -0
- mif_dal-0.1.0/docs/ARCHITECTURE.md +176 -0
- mif_dal-0.1.0/docs/DAL_SPECIFICATION_v1.0.md +480 -0
- mif_dal-0.1.0/docs/archive/IA_Mindsets_Principes_Indispensables_v1.1.md +293 -0
- mif_dal-0.1.0/docs/archive/ISSUE-DAL-P3-001.md +64 -0
- mif_dal-0.1.0/docs/archive/MIF_Component_Codification_v1.1.md +314 -0
- mif_dal-0.1.0/docs/archive/README.md +66 -0
- mif_dal-0.1.0/docs/archive/deploy.sh +200 -0
- mif_dal-0.1.0/docs/archive/kb/KB-DAL-001.md +343 -0
- mif_dal-0.1.0/docs/archive/kb/KB-DAL-002.md +264 -0
- mif_dal-0.1.0/docs/archive/kb/KB-DAL-003.md +246 -0
- mif_dal-0.1.0/docs/archive/kb/KB-DAL-004.md +176 -0
- mif_dal-0.1.0/docs/archive/kb/KB-DAL-005.md +85 -0
- mif_dal-0.1.0/docs/archive/nix_tools/session_end.sh +262 -0
- mif_dal-0.1.0/docs/archive/nix_tools/session_start.sh +289 -0
- mif_dal-0.1.0/docs/archive/old_halo/anamnese_state_last_fr.yaml +438 -0
- mif_dal-0.1.0/docs/archive/projet/DAL_Phase3_Plan_v1.1.md +785 -0
- mif_dal-0.1.0/docs/archive/projet/DAL_Phase3_Plan_v1.2.md +500 -0
- mif_dal-0.1.0/docs/archive/projet/DEBT_RECONCILED.md +107 -0
- mif_dal-0.1.0/docs/archive/projet/PUBLICATION_PROTOCOL.md +435 -0
- mif_dal-0.1.0/docs/archive/projet/pre_publication_plan.md +115 -0
- mif_dal-0.1.0/docs/archive/projet/project_instructions.md +62 -0
- mif_dal-0.1.0/docs/archive/scripts/adversarial_dal_check.py +838 -0
- mif_dal-0.1.0/docs/archive/scripts/cleanup_repo.sh +111 -0
- mif_dal-0.1.0/docs/archive/scripts/diagnose_and_fix_en.sh +238 -0
- mif_dal-0.1.0/docs/archive/scripts/fix_ruff.sh +243 -0
- mif_dal-0.1.0/docs/archive/scripts/translate_to_english.py +355 -0
- mif_dal-0.1.0/docs/archive/scripts/validate_dal_state.py +187 -0
- mif_dal-0.1.0/docs/archive/scripts/validate_environment.py +126 -0
- mif_dal-0.1.0/docs/archive/sprints/HALO_DELTA_2026-07-09.md +179 -0
- mif_dal-0.1.0/docs/archive/sprints/HALO_MIGRATION.md +338 -0
- mif_dal-0.1.0/docs/archive/sprints/TRADUCTION_SUMMARY_FR.md +65 -0
- mif_dal-0.1.0/docs/archive/sprints/TRANSLATION_COMPLETED.md +48 -0
- mif_dal-0.1.0/docs/archive/sprints/sprint_dal-001-summary.md +101 -0
- mif_dal-0.1.0/docs/archive/sprints/sprint_dal-002-summary.md +109 -0
- mif_dal-0.1.0/dukascopy/DUKASCOPY_COMPLETE_GUIDE.md +1430 -0
- mif_dal-0.1.0/dukascopy/conftest.py +94 -0
- mif_dal-0.1.0/dukascopy/setup_dukascopy_mif.sh +219 -0
- mif_dal-0.1.0/dukascopy/test_dukascopy_integration.py +281 -0
- mif_dal-0.1.0/pyproject.toml +95 -0
- mif_dal-0.1.0/scripts/adversarial_dal_check_p3.py +990 -0
- mif_dal-0.1.0/scripts/dev.sh +52 -0
- mif_dal-0.1.0/scripts/final_commit.sh +143 -0
- mif_dal-0.1.0/scripts/test_install.py +238 -0
- mif_dal-0.1.0/tests/conftest.py +160 -0
- mif_dal-0.1.0/tests/test_assembler.py +0 -0
- mif_dal-0.1.0/tests/test_config.py +48 -0
- mif_dal-0.1.0/tests/test_dal.py +226 -0
- mif_dal-0.1.0/tests/test_dukascopy_adapter.py +215 -0
- mif_dal-0.1.0/tests/test_exceptions.py +110 -0
- mif_dal-0.1.0/tests/test_handoff.py +272 -0
- mif_dal-0.1.0/tests/test_in_memory_source.py +104 -0
- mif_dal-0.1.0/tests/test_integration.py +152 -0
- mif_dal-0.1.0/tests/test_kraken_adapter.py +312 -0
- mif_dal-0.1.0/tests/test_pipeline.py +177 -0
- mif_dal-0.1.0/tests/test_source_interface.py +70 -0
- mif_dal-0.1.0/tests/test_sources.py +206 -0
- mif_dal-0.1.0/tests/test_yahoo_adapter.py +388 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, develop ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
name: Lint & Type Check
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.11'
|
|
21
|
+
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install --upgrade pip
|
|
25
|
+
pip install ruff mypy
|
|
26
|
+
pip install -e ".[dev]"
|
|
27
|
+
|
|
28
|
+
- name: Lint with ruff
|
|
29
|
+
run: ruff check dal tests
|
|
30
|
+
|
|
31
|
+
- name: Type check with mypy
|
|
32
|
+
run: mypy dal
|
|
33
|
+
|
|
34
|
+
test:
|
|
35
|
+
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
|
|
36
|
+
runs-on: ${{ matrix.os }}
|
|
37
|
+
|
|
38
|
+
strategy:
|
|
39
|
+
fail-fast: false
|
|
40
|
+
matrix:
|
|
41
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
42
|
+
python-version: ['3.11', '3.12']
|
|
43
|
+
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
46
|
+
|
|
47
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
48
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
49
|
+
with:
|
|
50
|
+
python-version: ${{ matrix.python-version }}
|
|
51
|
+
|
|
52
|
+
- name: Install dependencies
|
|
53
|
+
run: |
|
|
54
|
+
python -m pip install --upgrade pip
|
|
55
|
+
pip install -e ".[dev]"
|
|
56
|
+
|
|
57
|
+
- name: Run tests (without network — Kraken/Yahoo/Dukascopy require real access)
|
|
58
|
+
run: pytest tests/ -v --cov=dal --cov-report=xml --cov-report=term-missing
|
|
59
|
+
|
|
60
|
+
- name: Upload coverage
|
|
61
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
|
|
62
|
+
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v4
|
|
63
|
+
with:
|
|
64
|
+
file: ./coverage.xml
|
|
65
|
+
flags: unittests
|
|
66
|
+
name: codecov-mif-dal
|
|
67
|
+
fail_ci_if_error: false
|
|
68
|
+
continue-on-error: true
|
|
69
|
+
|
|
70
|
+
build:
|
|
71
|
+
name: Build Distribution
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
needs: [lint, test]
|
|
74
|
+
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
77
|
+
|
|
78
|
+
- name: Set up Python
|
|
79
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
80
|
+
with:
|
|
81
|
+
python-version: '3.11'
|
|
82
|
+
|
|
83
|
+
- name: Install build dependencies
|
|
84
|
+
run: |
|
|
85
|
+
python -m pip install --upgrade pip
|
|
86
|
+
pip install build twine
|
|
87
|
+
|
|
88
|
+
- name: Build package
|
|
89
|
+
run: python -m build
|
|
90
|
+
|
|
91
|
+
- name: Check package
|
|
92
|
+
run: twine check dist/*
|
|
93
|
+
|
|
94
|
+
- name: Upload artifacts
|
|
95
|
+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
|
|
96
|
+
with:
|
|
97
|
+
name: dist
|
|
98
|
+
path: dist/
|
|
99
|
+
|
|
100
|
+
security:
|
|
101
|
+
name: Security Check
|
|
102
|
+
runs-on: ubuntu-latest
|
|
103
|
+
|
|
104
|
+
steps:
|
|
105
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
106
|
+
|
|
107
|
+
- name: Set up Python
|
|
108
|
+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
109
|
+
with:
|
|
110
|
+
python-version: '3.11'
|
|
111
|
+
|
|
112
|
+
- name: Install dependencies
|
|
113
|
+
run: |
|
|
114
|
+
python -m pip install --upgrade pip
|
|
115
|
+
pip install safety bandit
|
|
116
|
+
pip install -e .
|
|
117
|
+
|
|
118
|
+
- name: Run safety check
|
|
119
|
+
run: safety check --json
|
|
120
|
+
continue-on-error: true
|
|
121
|
+
|
|
122
|
+
- name: Run bandit security check
|
|
123
|
+
run: bandit -r dal -ll
|
|
124
|
+
continue-on-error: true
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Publish mif-dal to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
environment: pypi
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
19
|
+
|
|
20
|
+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
|
|
24
|
+
- name: Install build frontend
|
|
25
|
+
run: python -m pip install --upgrade build
|
|
26
|
+
|
|
27
|
+
- name: Build package
|
|
28
|
+
run: python -m build
|
|
29
|
+
|
|
30
|
+
- name: Publish to PyPI
|
|
31
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
|
mif_dal-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# ─── Python ──────────────────────────────────────────────────────────────────
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.pyd
|
|
7
|
+
|
|
8
|
+
# Distribution / packaging
|
|
9
|
+
.Python
|
|
10
|
+
build/
|
|
11
|
+
develop-eggs/
|
|
12
|
+
dist/
|
|
13
|
+
downloads/
|
|
14
|
+
eggs/
|
|
15
|
+
.eggs/
|
|
16
|
+
lib/
|
|
17
|
+
lib64/
|
|
18
|
+
parts/
|
|
19
|
+
sdist/
|
|
20
|
+
var/
|
|
21
|
+
wheels/
|
|
22
|
+
share/python-wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
MANIFEST
|
|
27
|
+
|
|
28
|
+
# Virtual environments
|
|
29
|
+
.venv/
|
|
30
|
+
venv/
|
|
31
|
+
env/
|
|
32
|
+
ENV/
|
|
33
|
+
|
|
34
|
+
# ─── Tests & Coverage ────────────────────────────────────────────────────────
|
|
35
|
+
.pytest_cache/
|
|
36
|
+
.coverage
|
|
37
|
+
.coverage.*
|
|
38
|
+
htmlcov/
|
|
39
|
+
coverage.xml
|
|
40
|
+
*.cover
|
|
41
|
+
*.py,cover
|
|
42
|
+
.hypothesis/
|
|
43
|
+
.ruff_cache/
|
|
44
|
+
.mypy_cache/
|
|
45
|
+
.dmypy.json
|
|
46
|
+
dmypy.json
|
|
47
|
+
|
|
48
|
+
# ─── Nix ─────────────────────────────────────────────────────────────────────
|
|
49
|
+
result
|
|
50
|
+
result-*
|
|
51
|
+
.direnv/
|
|
52
|
+
*.nix
|
|
53
|
+
*.lock
|
|
54
|
+
|
|
55
|
+
# ─── Halo ─────────────────────────────────────────────────────────────────────
|
|
56
|
+
halo/
|
|
57
|
+
which_github.sh
|
|
58
|
+
|
|
59
|
+
# ─── uv ──────────────────────────────────────────────────────────────────────
|
|
60
|
+
# uv.lock est versionné — ne pas ignorer
|
|
61
|
+
# .python-version peut être ignoré si géré par flake.nix
|
|
62
|
+
.python-version
|
|
63
|
+
|
|
64
|
+
# ─── Backups et temporaires ───────────────────────────────────────────────────
|
|
65
|
+
*.bak
|
|
66
|
+
*.old
|
|
67
|
+
*.orig
|
|
68
|
+
*.tmp
|
|
69
|
+
*~
|
|
70
|
+
.DS_Store
|
|
71
|
+
Thumbs.db
|
|
72
|
+
|
|
73
|
+
# ─── IDE ─────────────────────────────────────────────────────────────────────
|
|
74
|
+
.idea/
|
|
75
|
+
.vscode/
|
|
76
|
+
*.swp
|
|
77
|
+
*.swo
|
|
78
|
+
.ropeproject
|
|
79
|
+
|
|
80
|
+
# ─── Données de cache DAL ────────────────────────────────────────────────────
|
|
81
|
+
# Le cache local est généré à l'exécution — ne pas versionner
|
|
82
|
+
.dal_cache/
|
|
83
|
+
dal_cache/
|
|
84
|
+
|
|
85
|
+
# ─── Dukascopy — données téléchargées ────────────────────────────────────────
|
|
86
|
+
dukascopy/data/
|
|
87
|
+
*.csv.gz
|
|
88
|
+
# Note : les fixtures CSV de test dans tests/ sont versionnées
|
|
89
|
+
|
|
90
|
+
# ─── Secrets et credentials ──────────────────────────────────────────────────
|
|
91
|
+
.env
|
|
92
|
+
.env.*
|
|
93
|
+
!.env.example
|
|
94
|
+
*.key
|
|
95
|
+
*.pem
|
|
96
|
+
|
|
97
|
+
# ─── Artefacts de build PyPI ─────────────────────────────────────────────────
|
|
98
|
+
dist/
|
|
99
|
+
*.whl
|
|
100
|
+
*.tar.gz
|
|
101
|
+
|
|
102
|
+
# ─── Logs ────────────────────────────────────────────────────────────────────
|
|
103
|
+
*.log
|
|
104
|
+
logs/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to mif-dal are documented here.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] — 2026-07-09
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- `DALHandoff` — frozen dataclass, 15 fields, `assembly_hash`, AQI
|
|
9
|
+
- Exception hierarchy: `DALError`, `DALConfigError`, `DALVersionError`,
|
|
10
|
+
`DALHandoffError`
|
|
11
|
+
- `DALConfig` (cache_dir, request_timeout)
|
|
12
|
+
- `pipeline.assemble_handoff()` — S3 hash + S4 DQF gate + S5 emission
|
|
13
|
+
- `resolve_and_fetch()` — S1 source resolution + retry/fallback +
|
|
14
|
+
S2 completeness + AQI calculation with floor
|
|
15
|
+
- `KrakenAdapter` — public REST API, OHLCV daily, PAXG/BTC
|
|
16
|
+
- `YahooAdapter` — yfinance ≥ 1.3.0, MultiIndex handling
|
|
17
|
+
- `DukascopyAdapter` — subprocess, detection via `--help`
|
|
18
|
+
- `InMemorySource` — deterministic adapter for tests, failure simulation
|
|
19
|
+
- `validate_environment.py` — GO/NO-GO for NixOS / Colab / Windows
|
|
20
|
+
- `validate_dal_state.py` — GO/NO-GO 5-check script
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- DQF has no FAIL status — mapping corrected to VOID + `case _` guard
|
|
24
|
+
- AQI floor `max(0, ...)` — formula could produce negative values
|
|
25
|
+
- `DALHandoff frozen=True` — `source_manifest` as `tuple`, not `list`
|
|
26
|
+
- `calendar` required in `get_diagnostic_stream` (DALHandoff invariant)
|
|
27
|
+
- Dukascopy detection via `--help` (not `--version` — upstream exit-1 bug)
|
|
28
|
+
|
|
29
|
+
### Known issues
|
|
30
|
+
- TD-008: AQI gravities (0.20/0.10/0.05/0.30) not empirically calibrated
|
|
31
|
+
- TD-012: dukascopy-node PATH unstable in NixOS nix-shell (test xfail)
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
# Contributing to MIF-DAL
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to MIF-DAL (Data Abstraction Layer)!
|
|
4
|
+
|
|
5
|
+
This document provides guidelines and best practices for contributing.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Code of Conduct
|
|
10
|
+
|
|
11
|
+
### Our Pledge
|
|
12
|
+
|
|
13
|
+
We pledge to make participation in MIF-DAL a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
14
|
+
|
|
15
|
+
### Our Standards
|
|
16
|
+
|
|
17
|
+
**Positive Behavior**:
|
|
18
|
+
- Using welcoming and inclusive language
|
|
19
|
+
- Being respectful of differing viewpoints
|
|
20
|
+
- Gracefully accepting constructive criticism
|
|
21
|
+
- Focusing on what is best for the community
|
|
22
|
+
- Showing empathy towards others
|
|
23
|
+
|
|
24
|
+
**Unacceptable Behavior**:
|
|
25
|
+
- Harassment, trolling, or insulting comments
|
|
26
|
+
- Personal or political attacks
|
|
27
|
+
- Publishing others' private information
|
|
28
|
+
- Other conduct inappropriate in a professional setting
|
|
29
|
+
|
|
30
|
+
### Enforcement
|
|
31
|
+
|
|
32
|
+
Instances of abusive behavior may be reported to the project maintainers. All complaints will be reviewed and investigated promptly and fairly.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## How Can I Contribute?
|
|
37
|
+
|
|
38
|
+
### Reporting Bugs
|
|
39
|
+
|
|
40
|
+
**Before Submitting**:
|
|
41
|
+
1. Check existing issues
|
|
42
|
+
2. Verify with latest version
|
|
43
|
+
3. Gather reproduction steps
|
|
44
|
+
|
|
45
|
+
**Bug Report Template**:
|
|
46
|
+
```markdown
|
|
47
|
+
**Environment**:
|
|
48
|
+
- MIF-DAL Version: 0.1.0
|
|
49
|
+
- Python Version: 3.11
|
|
50
|
+
- OS: NixOS 25.11
|
|
51
|
+
|
|
52
|
+
**Description**:
|
|
53
|
+
Clear description of the bug.
|
|
54
|
+
|
|
55
|
+
**Reproduction Steps**:
|
|
56
|
+
1. Step 1
|
|
57
|
+
2. Step 2
|
|
58
|
+
3. Step 3
|
|
59
|
+
|
|
60
|
+
**Expected Behavior**:
|
|
61
|
+
What should happen.
|
|
62
|
+
|
|
63
|
+
**Actual Behavior**:
|
|
64
|
+
What actually happens.
|
|
65
|
+
|
|
66
|
+
**Error Output**:
|
|
67
|
+
```
|
|
68
|
+
[Paste full error traceback]
|
|
69
|
+
```
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Suggesting Features
|
|
75
|
+
|
|
76
|
+
**Feature Request Template**:
|
|
77
|
+
```markdown
|
|
78
|
+
**Problem Statement**:
|
|
79
|
+
What problem does this feature solve?
|
|
80
|
+
|
|
81
|
+
**Proposed Solution**:
|
|
82
|
+
Describe your proposed feature.
|
|
83
|
+
|
|
84
|
+
**Alternatives Considered**:
|
|
85
|
+
What other solutions did you consider?
|
|
86
|
+
|
|
87
|
+
**Use Case**:
|
|
88
|
+
Real-world scenario where this is useful.
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### Submitting Pull Requests
|
|
94
|
+
|
|
95
|
+
We welcome code contributions! Follow these steps:
|
|
96
|
+
|
|
97
|
+
1. **Clone Repository**
|
|
98
|
+
```bash
|
|
99
|
+
git clone git@github.com:symbioticode/mif-dal.git
|
|
100
|
+
cd mif-dal
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
2. **Create Branch**
|
|
104
|
+
```bash
|
|
105
|
+
git checkout -b feature/your-feature-name
|
|
106
|
+
# or
|
|
107
|
+
git checkout -b fix/your-bug-fix
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. **Make Changes**
|
|
111
|
+
- Read `halo/project_instructions.md` first
|
|
112
|
+
- Read `halo/anamnese_state.yaml` for current project state
|
|
113
|
+
- Follow specs in `docs/DAL_SPECIFICATION_v1.0.md`
|
|
114
|
+
- Write code
|
|
115
|
+
- Add tests
|
|
116
|
+
- Update documentation
|
|
117
|
+
|
|
118
|
+
4. **Test Locally**
|
|
119
|
+
```bash
|
|
120
|
+
./scripts/dev.sh check
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
5. **Commit Changes**
|
|
124
|
+
```bash
|
|
125
|
+
git add .
|
|
126
|
+
git commit -m "feat: add amazing feature"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
130
|
+
- `feat:` New feature
|
|
131
|
+
- `fix:` Bug fix
|
|
132
|
+
- `docs:` Documentation only
|
|
133
|
+
- `test:` Adding tests
|
|
134
|
+
- `refactor:` Code refactoring
|
|
135
|
+
- `perf:` Performance improvement
|
|
136
|
+
- `chore:` Maintenance tasks
|
|
137
|
+
|
|
138
|
+
6. **Push Branch**
|
|
139
|
+
```bash
|
|
140
|
+
git push origin feature/your-feature-name
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
7. **Open Pull Request**
|
|
144
|
+
- Go to GitHub repository
|
|
145
|
+
- Click "New Pull Request"
|
|
146
|
+
- Fill out PR template
|
|
147
|
+
- Request review
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Development Setup
|
|
152
|
+
|
|
153
|
+
### Requirements
|
|
154
|
+
|
|
155
|
+
- Python 3.11+
|
|
156
|
+
- NixOS 25.11 (recommended) or Linux with glibc
|
|
157
|
+
- git
|
|
158
|
+
|
|
159
|
+
### Installation
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Clone repository
|
|
163
|
+
git clone git@github.com:symbioticode/mif-dal.git
|
|
164
|
+
cd mif-dal
|
|
165
|
+
|
|
166
|
+
# Create virtual environment
|
|
167
|
+
python -m venv .venv
|
|
168
|
+
source .venv/bin/activate
|
|
169
|
+
|
|
170
|
+
# Install in editable mode with dev dependencies
|
|
171
|
+
pip install -e ".[dev]"
|
|
172
|
+
|
|
173
|
+
# Verify installation
|
|
174
|
+
./scripts/dev.sh check
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Development Tools
|
|
178
|
+
|
|
179
|
+
**Installed Automatically**:
|
|
180
|
+
- `pytest`: Testing framework
|
|
181
|
+
- `pytest-cov`: Coverage reporting
|
|
182
|
+
- `ruff`: Fast linting
|
|
183
|
+
- `mypy`: Type checking
|
|
184
|
+
|
|
185
|
+
**Commands**:
|
|
186
|
+
```bash
|
|
187
|
+
# Run all gates (ruff + mypy + pytest)
|
|
188
|
+
./scripts/dev.sh check
|
|
189
|
+
|
|
190
|
+
# Run tests only
|
|
191
|
+
pytest tests/ -v
|
|
192
|
+
|
|
193
|
+
# Run tests with coverage
|
|
194
|
+
pytest tests/ --cov=dal --cov-report=html
|
|
195
|
+
|
|
196
|
+
# Lint code
|
|
197
|
+
ruff check dal tests scripts
|
|
198
|
+
|
|
199
|
+
# Type check
|
|
200
|
+
mypy dal
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Pull Request Process
|
|
206
|
+
|
|
207
|
+
### Before Submitting
|
|
208
|
+
|
|
209
|
+
**Checklist**:
|
|
210
|
+
- [ ] `./scripts/dev.sh check` passes (ruff + mypy + pytest)
|
|
211
|
+
- [ ] `python scripts/adversarial_dal_check_p3.py` — 65/65 PASS
|
|
212
|
+
- [ ] New tests added (if applicable)
|
|
213
|
+
- [ ] Documentation updated (if applicable)
|
|
214
|
+
- [ ] Commit messages follow convention
|
|
215
|
+
- [ ] PR description is clear
|
|
216
|
+
|
|
217
|
+
### PR Template
|
|
218
|
+
|
|
219
|
+
```markdown
|
|
220
|
+
## Description
|
|
221
|
+
Brief description of changes.
|
|
222
|
+
|
|
223
|
+
## Type of Change
|
|
224
|
+
- [ ] Bug fix (non-breaking)
|
|
225
|
+
- [ ] New feature (non-breaking)
|
|
226
|
+
- [ ] Breaking change
|
|
227
|
+
- [ ] Documentation update
|
|
228
|
+
|
|
229
|
+
## Related Issues
|
|
230
|
+
Fixes #123
|
|
231
|
+
|
|
232
|
+
## Changes Made
|
|
233
|
+
- Change 1
|
|
234
|
+
- Change 2
|
|
235
|
+
- Change 3
|
|
236
|
+
|
|
237
|
+
## Testing
|
|
238
|
+
How was this tested?
|
|
239
|
+
|
|
240
|
+
## Checklist
|
|
241
|
+
- [ ] dev.sh check passes
|
|
242
|
+
- [ ] adversarial check 65/65
|
|
243
|
+
- [ ] Code follows style guide
|
|
244
|
+
- [ ] Documentation updated
|
|
245
|
+
- [ ] No breaking changes (or documented)
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Review Process
|
|
249
|
+
|
|
250
|
+
1. **Maintainer Review**: 1-3 days
|
|
251
|
+
2. **Feedback**: Address comments
|
|
252
|
+
3. **Approval**: At least 1 maintainer approval
|
|
253
|
+
4. **Merge**: Squash and merge to main
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Coding Standards
|
|
258
|
+
|
|
259
|
+
### Style Guide
|
|
260
|
+
|
|
261
|
+
**Python Style**: PEP 8 + Ruff
|
|
262
|
+
|
|
263
|
+
**Key Rules**:
|
|
264
|
+
- Line length: 100 characters
|
|
265
|
+
- Indentation: 4 spaces
|
|
266
|
+
- Quotes: Double quotes for strings
|
|
267
|
+
- Imports: Sorted (ruff)
|
|
268
|
+
|
|
269
|
+
### Docstrings
|
|
270
|
+
|
|
271
|
+
**Format**: Google Style
|
|
272
|
+
|
|
273
|
+
**Required**:
|
|
274
|
+
- Module docstring
|
|
275
|
+
- Class docstring
|
|
276
|
+
- Public method docstring
|
|
277
|
+
|
|
278
|
+
### Type Hints
|
|
279
|
+
|
|
280
|
+
**Required** for:
|
|
281
|
+
- Function parameters
|
|
282
|
+
- Function return types
|
|
283
|
+
- Class attributes
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Testing Guidelines
|
|
288
|
+
|
|
289
|
+
### Test Structure
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
tests/
|
|
293
|
+
├── unit/ # Unit tests (isolate components)
|
|
294
|
+
│ ├── test_handoff.py
|
|
295
|
+
│ ├── test_pipeline.py
|
|
296
|
+
│ └── ...
|
|
297
|
+
├── integration/ # Integration tests (end-to-end)
|
|
298
|
+
│ ├── test_dal.py
|
|
299
|
+
│ └── test_sources.py
|
|
300
|
+
└── conftest.py # Pytest fixtures
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Coverage Requirements
|
|
304
|
+
|
|
305
|
+
- **Minimum**: 80% overall
|
|
306
|
+
- **Target**: 93%+ (current baseline)
|
|
307
|
+
- **Critical paths**: 100%
|
|
308
|
+
|
|
309
|
+
**Check Coverage**:
|
|
310
|
+
```bash
|
|
311
|
+
pytest tests/ --cov=dal --cov-report=html
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Documentation
|
|
317
|
+
|
|
318
|
+
### Documentation Types
|
|
319
|
+
|
|
320
|
+
1. **Code Documentation**: Docstrings (required)
|
|
321
|
+
2. **API Reference**: `docs/API.md`
|
|
322
|
+
3. **Architecture**: `docs/ARCHITECTURE.md`
|
|
323
|
+
4. **Specification**: `docs/DAL_SPECIFICATION_v1.0.md`
|
|
324
|
+
|
|
325
|
+
### Updating Documentation
|
|
326
|
+
|
|
327
|
+
**When to Update**:
|
|
328
|
+
- New feature → Add example + API docs
|
|
329
|
+
- Bug fix → Update existing docs if wrong
|
|
330
|
+
- Breaking change → Update all affected docs
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Project Architecture
|
|
335
|
+
|
|
336
|
+
MIF-DAL follows the Metric Integrity Framework pipeline:
|
|
337
|
+
|
|
338
|
+
```
|
|
339
|
+
Source Adapters → Resolver → Pipeline → DALHandoff → Caller
|
|
340
|
+
(fetch) (fallback) (DQF gate) (frozen)
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Key architectural decisions are documented in `halo/anamnese_state.yaml` (section `decisions_immuables`). Do not modify them without escalation.
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Questions?
|
|
348
|
+
|
|
349
|
+
- **GitHub Issues**: Report bugs, request features
|
|
350
|
+
- **Email**: corail.synergia@proton.me
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
**Thank you for contributing to MIF-DAL!**
|
mif_dal-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 symbiotic code ~
|
|
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.
|