abstractsemantics 0.0.1__py3-none-any.whl → 0.0.2__py3-none-any.whl

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.
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: abstractsemantics
3
+ Version: 0.0.2
4
+ Summary: Semantics registry (predicates/types) for AbstractFramework.
5
+ Author: Laurent-Philippe Albou
6
+ License-Expression: MIT
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ Requires-Dist: PyYAML>=6.0
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
13
+ Dynamic: license-file
14
+
15
+ # AbstractSemantics (`abstractsemantics`)
16
+
17
+ Central, editable semantics registry (predicates + entity types) for AbstractFramework, with helpers to build a compact JSON Schema for knowledge-graph (KG) assertion structured outputs.
18
+
19
+ This package intentionally contains **definitions**, not storage:
20
+ - prefix mappings (CURIE namespaces)
21
+ - predicate allowlists (optional inverse pointers)
22
+ - entity-type allowlists
23
+
24
+ ## Status
25
+
26
+ Small, dependency-light package (only PyYAML) with a tiny public API:
27
+ - the default registry is shipped as package data (`abstractsemantics/semantics.yaml`; in this repo: `src/abstractsemantics/semantics.yaml`)
28
+ - the loader returns immutable dataclasses (`SemanticsRegistry`)
29
+ - the v0 schema builder produces a deterministic JSON Schema dict
30
+
31
+ ## Install
32
+
33
+ From PyPI:
34
+
35
+ ```bash
36
+ pip install abstractsemantics
37
+ ```
38
+
39
+ From source (editable, with test deps):
40
+
41
+ ```bash
42
+ pip install -e ".[dev]"
43
+ ```
44
+
45
+ Requires Python `>=3.10` (see `pyproject.toml`).
46
+
47
+ ## Quickstart
48
+
49
+ Load the default registry and build the v0 structured-output schema:
50
+
51
+ ```python
52
+ from abstractsemantics import load_semantics_registry, build_kg_assertion_schema_v0
53
+
54
+ reg = load_semantics_registry()
55
+ print(len(reg.predicates), len(reg.entity_types))
56
+
57
+ schema = build_kg_assertion_schema_v0(registry=reg, include_predicate_aliases=True)
58
+ ```
59
+
60
+ Use a custom registry YAML (must exist on disk):
61
+
62
+ ```bash
63
+ export ABSTRACTSEMANTICS_REGISTRY_PATH=/absolute/path/to/semantics.yaml
64
+ ```
65
+
66
+ ```python
67
+ from abstractsemantics import load_semantics_registry
68
+
69
+ reg = load_semantics_registry() # loads from ABSTRACTSEMANTICS_REGISTRY_PATH if set
70
+ ```
71
+
72
+ Note: `load_semantics_registry()` only requires at least 1 predicate, but `build_kg_assertion_schema_v0()` requires both predicate ids **and** entity-type ids (it raises `ValueError` if `entity_types` is empty).
73
+
74
+ ## Intended consumers (external)
75
+
76
+ This package is designed to be consumed by:
77
+ - AbstractRuntime (validation at ingestion boundary)
78
+ - AbstractFlow (UI dropdowns + authoring support)
79
+ - AbstractMemory (storage/query on top of validated semantics)
80
+
81
+ ## Documentation
82
+
83
+ Start with:
84
+ - `docs/getting-started.md` (recommended entrypoint)
85
+ - `docs/README.md` (documentation index)
86
+ - `docs/architecture.md` (what exists in this repo, with diagrams)
87
+ - `docs/registry.md` (registry YAML format)
88
+ - `docs/schema.md` (KG assertion JSON Schema + `$ref`)
89
+ - `docs/faq.md` (common questions and troubleshooting)
90
+
91
+ ## Project
92
+
93
+ - Changelog: `CHANGELOD.md`
94
+ - Contributing: `CONTRIBUTING.md`
95
+ - Security: `SECURITY.md`
96
+ - Acknowledgments: `ACKNOWLEDMENTS.md`
97
+
98
+ ## License
99
+
100
+ MIT (see `LICENSE`).
@@ -0,0 +1,9 @@
1
+ abstractsemantics/__init__.py,sha256=4v-QtKbj-XPzAWkin6wGtBjsvoEbUsDPUowwpVUgZjI,435
2
+ abstractsemantics/registry.py,sha256=p7RnE8CJrgi0jqbccxGaAxW0mpaTSKkdrqCcps_eZ1Q,3829
3
+ abstractsemantics/schema.py,sha256=euxAnpEyYIA4kDxmika8RhdrvgIyY5js_akea_ohJKQ,5244
4
+ abstractsemantics/semantics.yaml,sha256=BeFa6e-LmtTN01jjSO9_Tih6knOkhkNWro2gWXQKpkQ,4160
5
+ abstractsemantics-0.0.2.dist-info/licenses/LICENSE,sha256=ifO3lH7cJAMqNv7IWJlVUsJ_4FOBfoh1SkhzTkxQHd4,1079
6
+ abstractsemantics-0.0.2.dist-info/METADATA,sha256=8wXtlcMKfweeYDF-_e_7cMQOYtyr7VEvaX20huxEI6g,2966
7
+ abstractsemantics-0.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
8
+ abstractsemantics-0.0.2.dist-info/top_level.txt,sha256=vKH3yydhRsGZk5Jinb3B1RdJ-YvZMuDFT-RPaVF_tkM,18
9
+ abstractsemantics-0.0.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Laurent-Philippe Albou
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.
@@ -1,26 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: abstractsemantics
3
- Version: 0.0.1
4
- Summary: Semantics registry (predicates/types) for AbstractFramework.
5
- Author: Laurent-Philippe Albou
6
- License: MIT
7
- Requires-Python: >=3.10
8
- Description-Content-Type: text/markdown
9
- Requires-Dist: PyYAML>=6.0
10
- Provides-Extra: dev
11
- Requires-Dist: pytest>=7.0.0; extra == "dev"
12
-
13
- # AbstractSemantics
14
-
15
- Central, editable semantics registry for AbstractFramework.
16
-
17
- This package intentionally contains **definitions**, not storage:
18
- - prefix mappings (CURIE namespaces)
19
- - predicate allowlists (and optional inverses/constraints)
20
- - entity-type allowlists (optional in v0)
21
-
22
- It is designed to be consumed by:
23
- - AbstractRuntime (validation at ingestion boundary)
24
- - AbstractFlow (UI dropdowns + authoring support)
25
- - AbstractMemory (storage/query on top of validated semantics)
26
-
@@ -1,8 +0,0 @@
1
- abstractsemantics/__init__.py,sha256=4v-QtKbj-XPzAWkin6wGtBjsvoEbUsDPUowwpVUgZjI,435
2
- abstractsemantics/registry.py,sha256=p7RnE8CJrgi0jqbccxGaAxW0mpaTSKkdrqCcps_eZ1Q,3829
3
- abstractsemantics/schema.py,sha256=euxAnpEyYIA4kDxmika8RhdrvgIyY5js_akea_ohJKQ,5244
4
- abstractsemantics/semantics.yaml,sha256=BeFa6e-LmtTN01jjSO9_Tih6knOkhkNWro2gWXQKpkQ,4160
5
- abstractsemantics-0.0.1.dist-info/METADATA,sha256=wQSXAJG_CHxafhad9P09lrErZrMKfZ9_x5pm6SrNeKo,820
6
- abstractsemantics-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- abstractsemantics-0.0.1.dist-info/top_level.txt,sha256=vKH3yydhRsGZk5Jinb3B1RdJ-YvZMuDFT-RPaVF_tkM,18
8
- abstractsemantics-0.0.1.dist-info/RECORD,,