indiciumforge-core 2.0.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.
Files changed (69) hide show
  1. indiciumforge_core-2.0.0/PKG-INFO +42 -0
  2. indiciumforge_core-2.0.0/README.md +15 -0
  3. indiciumforge_core-2.0.0/pyproject.toml +36 -0
  4. indiciumforge_core-2.0.0/setup.cfg +4 -0
  5. indiciumforge_core-2.0.0/src/indiciumforge_core/__init__.py +1 -0
  6. indiciumforge_core-2.0.0/src/indiciumforge_core/artifacts/__init__.py +1 -0
  7. indiciumforge_core-2.0.0/src/indiciumforge_core/artifacts/comparator.py +80 -0
  8. indiciumforge_core-2.0.0/src/indiciumforge_core/artifacts/formatting.py +21 -0
  9. indiciumforge_core-2.0.0/src/indiciumforge_core/artifacts/local_store.py +14 -0
  10. indiciumforge_core-2.0.0/src/indiciumforge_core/artifacts/manifest.py +583 -0
  11. indiciumforge_core-2.0.0/src/indiciumforge_core/artifacts/paths.py +41 -0
  12. indiciumforge_core-2.0.0/src/indiciumforge_core/artifacts/writer.py +73 -0
  13. indiciumforge_core-2.0.0/src/indiciumforge_core/domain/__init__.py +1 -0
  14. indiciumforge_core-2.0.0/src/indiciumforge_core/domain/models.py +78 -0
  15. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/__init__.py +54 -0
  16. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/artifacts.py +111 -0
  17. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/demo/__init__.py +7 -0
  18. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/demo/quiet_accumulation.py +65 -0
  19. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/demo/volume_breakout.py +60 -0
  20. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/loading.py +101 -0
  21. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/models.py +24 -0
  22. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/pack.py +139 -0
  23. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/ports.py +22 -0
  24. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/registry.py +74 -0
  25. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/scan.py +57 -0
  26. indiciumforge_core-2.0.0/src/indiciumforge_core/factors/universe.py +59 -0
  27. indiciumforge_core-2.0.0/src/indiciumforge_core/labels/__init__.py +1 -0
  28. indiciumforge_core-2.0.0/src/indiciumforge_core/labels/market_gate.py +72 -0
  29. indiciumforge_core-2.0.0/src/indiciumforge_core/market/theme_rules.py +28 -0
  30. indiciumforge_core-2.0.0/src/indiciumforge_core/parity/__init__.py +41 -0
  31. indiciumforge_core-2.0.0/src/indiciumforge_core/parity/comparator.py +250 -0
  32. indiciumforge_core-2.0.0/src/indiciumforge_core/parity/config.py +128 -0
  33. indiciumforge_core-2.0.0/src/indiciumforge_core/parity/harness.py +53 -0
  34. indiciumforge_core-2.0.0/src/indiciumforge_core/parity/models.py +81 -0
  35. indiciumforge_core-2.0.0/src/indiciumforge_core/parity/ports.py +34 -0
  36. indiciumforge_core-2.0.0/src/indiciumforge_core/parity/reference.py +53 -0
  37. indiciumforge_core-2.0.0/src/indiciumforge_core/parity/schemas.py +3 -0
  38. indiciumforge_core-2.0.0/src/indiciumforge_core/ports/__init__.py +1 -0
  39. indiciumforge_core-2.0.0/src/indiciumforge_core/ports/contracts.py +32 -0
  40. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/__init__.py +18 -0
  41. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/capabilities.py +54 -0
  42. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/config.py +223 -0
  43. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/contracts_v2.py +17 -0
  44. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/local_fixture.py +69 -0
  45. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/local_fixture_v2.py +125 -0
  46. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/pack.py +15 -0
  47. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/query.py +93 -0
  48. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/registry.py +37 -0
  49. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/registry_v2.py +182 -0
  50. indiciumforge_core-2.0.0/src/indiciumforge_core/providers/result.py +77 -0
  51. indiciumforge_core-2.0.0/src/indiciumforge_core/recipes/__init__.py +28 -0
  52. indiciumforge_core-2.0.0/src/indiciumforge_core/recipes/config.py +137 -0
  53. indiciumforge_core-2.0.0/src/indiciumforge_core/recipes/models.py +64 -0
  54. indiciumforge_core-2.0.0/src/indiciumforge_core/recipes/pack.py +96 -0
  55. indiciumforge_core-2.0.0/src/indiciumforge_core/recipes/ports.py +35 -0
  56. indiciumforge_core-2.0.0/src/indiciumforge_core/recipes/resolver.py +87 -0
  57. indiciumforge_core-2.0.0/src/indiciumforge_core/recipes/runner.py +193 -0
  58. indiciumforge_core-2.0.0/src/indiciumforge_core/recipes/schemas.py +3 -0
  59. indiciumforge_core-2.0.0/src/indiciumforge_core/schema_compat.py +35 -0
  60. indiciumforge_core-2.0.0/src/indiciumforge_core/text.py +31 -0
  61. indiciumforge_core-2.0.0/src/indiciumforge_core/workflow/__init__.py +51 -0
  62. indiciumforge_core-2.0.0/src/indiciumforge_core/workflow/handoff.py +26 -0
  63. indiciumforge_core-2.0.0/src/indiciumforge_core/workflow/model.py +112 -0
  64. indiciumforge_core-2.0.0/src/indiciumforge_core/workflow/recipe_schema.py +124 -0
  65. indiciumforge_core-2.0.0/src/indiciumforge_core.egg-info/PKG-INFO +42 -0
  66. indiciumforge_core-2.0.0/src/indiciumforge_core.egg-info/SOURCES.txt +67 -0
  67. indiciumforge_core-2.0.0/src/indiciumforge_core.egg-info/dependency_links.txt +1 -0
  68. indiciumforge_core-2.0.0/src/indiciumforge_core.egg-info/requires.txt +2 -0
  69. indiciumforge_core-2.0.0/src/indiciumforge_core.egg-info/top_level.txt +1 -0
@@ -0,0 +1,42 @@
1
+ Metadata-Version: 2.4
2
+ Name: indiciumforge-core
3
+ Version: 2.0.0
4
+ Summary: Core contracts, artifact schemas, and ports for IndiciumForge evidence-first research workflows.
5
+ Author: IndiciumForge contributors
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Cavaradossi/indiciumforge
8
+ Project-URL: Repository, https://github.com/Cavaradossi/indiciumforge
9
+ Project-URL: Documentation, https://github.com/Cavaradossi/indiciumforge/tree/master/docs
10
+ Project-URL: Issues, https://github.com/Cavaradossi/indiciumforge/issues
11
+ Project-URL: Changelog, https://github.com/Cavaradossi/indiciumforge/blob/master/RELEASE_NOTES.md
12
+ Keywords: workflow,artifacts,research,audit,open-core
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Classifier: Topic :: Software Development :: Libraries
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ Requires-Dist: pandas>=2.0
26
+ Requires-Dist: tabulate>=0.9
27
+
28
+ # indiciumforge-core
29
+
30
+ Core contracts, artifact schemas, and ports for [IndiciumForge](https://github.com/Cavaradossi/indiciumforge).
31
+
32
+ IndiciumForge produces **research audit artifacts** and parity evidence. It is **not investment advice**, **not a trading system**, and **not a broker execution platform**.
33
+
34
+ ## Install
35
+
36
+ PyPI publish is pending. Install from the monorepo:
37
+
38
+ ```bash
39
+ pip install -e packages/indiciumforge-core
40
+ ```
41
+
42
+ See [docs/PYPI_RELEASE_CHECKLIST.md](https://github.com/Cavaradossi/indiciumforge/blob/master/docs/PYPI_RELEASE_CHECKLIST.md).
@@ -0,0 +1,15 @@
1
+ # indiciumforge-core
2
+
3
+ Core contracts, artifact schemas, and ports for [IndiciumForge](https://github.com/Cavaradossi/indiciumforge).
4
+
5
+ IndiciumForge produces **research audit artifacts** and parity evidence. It is **not investment advice**, **not a trading system**, and **not a broker execution platform**.
6
+
7
+ ## Install
8
+
9
+ PyPI publish is pending. Install from the monorepo:
10
+
11
+ ```bash
12
+ pip install -e packages/indiciumforge-core
13
+ ```
14
+
15
+ See [docs/PYPI_RELEASE_CHECKLIST.md](https://github.com/Cavaradossi/indiciumforge/blob/master/docs/PYPI_RELEASE_CHECKLIST.md).
@@ -0,0 +1,36 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "indiciumforge-core"
7
+ version = "2.0.0"
8
+ description = "Core contracts, artifact schemas, and ports for IndiciumForge evidence-first research workflows."
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ requires-python = ">=3.10"
12
+ authors = [{ name = "IndiciumForge contributors" }]
13
+ keywords = ["workflow", "artifacts", "research", "audit", "open-core"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Intended Audience :: Developers",
17
+ "Intended Audience :: Science/Research",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Topic :: Scientific/Engineering",
24
+ "Topic :: Software Development :: Libraries",
25
+ ]
26
+ dependencies = ["pandas>=2.0", "tabulate>=0.9"]
27
+
28
+ [project.urls]
29
+ Homepage = "https://github.com/Cavaradossi/indiciumforge"
30
+ Repository = "https://github.com/Cavaradossi/indiciumforge"
31
+ Documentation = "https://github.com/Cavaradossi/indiciumforge/tree/master/docs"
32
+ Issues = "https://github.com/Cavaradossi/indiciumforge/issues"
33
+ Changelog = "https://github.com/Cavaradossi/indiciumforge/blob/master/RELEASE_NOTES.md"
34
+
35
+ [tool.setuptools.packages.find]
36
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ """Core contracts and artifacts for IndiciumForge."""
@@ -0,0 +1,80 @@
1
+ from __future__ import annotations
2
+
3
+ import json
4
+ from pathlib import Path
5
+ from typing import Any
6
+
7
+ import pandas as pd
8
+
9
+ from indiciumforge_core.labels.market_gate import REVIEW_COLUMNS
10
+ from indiciumforge_core.text import normalize_code_series
11
+
12
+ GATE_ARTIFACTS = (
13
+ "market_gated_candidates.csv",
14
+ "market_gated_observation.csv",
15
+ "market_gated_active_watch.csv",
16
+ "market_gated_rejected.csv",
17
+ "market_gate_calibration_audit.json",
18
+ "market_gate_summary.json",
19
+ "market_gate_state.json",
20
+ )
21
+
22
+
23
+ def assert_schema_exists(actual_dir: Path, expected_dir: Path) -> None:
24
+ for name in GATE_ARTIFACTS:
25
+ assert (expected_dir / name).exists(), f"missing expected artifact {name}"
26
+ if name.endswith(".json"):
27
+ continue
28
+ assert (actual_dir / name).exists(), f"missing actual artifact {name}"
29
+
30
+
31
+ def compare_semantic_market_gate(actual_dir: Path, expected_dir: Path) -> None:
32
+ assert_schema_exists(actual_dir, expected_dir)
33
+ for stem in (
34
+ "market_gated_candidates",
35
+ "market_gated_observation",
36
+ "market_gated_active_watch",
37
+ "market_gated_rejected",
38
+ ):
39
+ actual = pd.read_csv(actual_dir / f"{stem}.csv", encoding="utf-8-sig")
40
+ expected = pd.read_csv(expected_dir / f"{stem}.csv", encoding="utf-8-sig")
41
+ assert list(actual.columns) == list(expected.columns), stem
42
+ if REVIEW_COLUMNS["code"] in actual.columns:
43
+ assert set(normalize_code_series(actual[REVIEW_COLUMNS["code"]])) == set(
44
+ normalize_code_series(expected[REVIEW_COLUMNS["code"]])
45
+ ), stem
46
+ for json_name in ("market_gate_calibration_audit.json", "market_gate_summary.json"):
47
+ actual_payload = json.loads((actual_dir / json_name).read_text(encoding="utf-8-sig"))
48
+ expected_payload = json.loads((expected_dir / json_name).read_text(encoding="utf-8-sig"))
49
+ for key in (
50
+ "strict_count",
51
+ "observation_count",
52
+ "watch_count",
53
+ "rejected_count",
54
+ "candidate_count",
55
+ "quality_gate_warning",
56
+ ):
57
+ if key in expected_payload:
58
+ assert actual_payload.get(key) == expected_payload.get(key), f"{json_name}:{key}"
59
+ actual_state = json.loads(
60
+ (actual_dir / "market_gate_state.json").read_text(encoding="utf-8-sig")
61
+ )
62
+ expected_state = json.loads(
63
+ (expected_dir / "market_gate_state.json").read_text(encoding="utf-8-sig")
64
+ )
65
+ for key in (
66
+ "workflow_review_source_stage",
67
+ "strict_count",
68
+ "observation_count",
69
+ "watch_count",
70
+ "rejected_count",
71
+ "candidate_count",
72
+ "quality_gate_warning",
73
+ ):
74
+ assert actual_state.get(key) == expected_state.get(key), f"state:{key}"
75
+ if expected_state.get("warnings"):
76
+ assert actual_state.get("warnings"), "state warnings missing"
77
+
78
+
79
+ def load_meta(path: Path) -> dict[str, Any]:
80
+ return json.loads(path.read_text(encoding="utf-8-sig"))
@@ -0,0 +1,21 @@
1
+ from __future__ import annotations
2
+
3
+ import pandas as pd
4
+
5
+ from indiciumforge_core.labels.market_gate import REVIEW_COLUMNS
6
+
7
+
8
+ def format_code_text(frame: pd.DataFrame) -> pd.DataFrame:
9
+ column = REVIEW_COLUMNS["code"]
10
+ if column not in frame.columns:
11
+ return frame
12
+
13
+ def _format(value: object) -> str:
14
+ text = str(value).strip()
15
+ if text.startswith('="') and text.endswith('"'):
16
+ return text
17
+ return f'="{text.zfill(6)}"'
18
+
19
+ out = frame.copy()
20
+ out[column] = out[column].map(_format)
21
+ return out
@@ -0,0 +1,14 @@
1
+ from __future__ import annotations
2
+
3
+ from pathlib import Path
4
+
5
+ import pandas as pd
6
+
7
+
8
+ class LocalArtifactStore:
9
+ def read_csv(self, path: Path, **kwargs: object) -> pd.DataFrame:
10
+ return pd.read_csv(path, **kwargs)
11
+
12
+ def write_csv(self, path: Path, frame: pd.DataFrame) -> None:
13
+ path.parent.mkdir(parents=True, exist_ok=True)
14
+ frame.to_csv(path, index=False, encoding="utf-8-sig")