- Bug 1: replace dict .get() with dataclass attribute access on
AssociativeClass (name/connects/temporal/properties)
- Bug 2: add full URI to every ontology property and use BASE_URI-prefixed
URIs for all relationship types so TripletStore stores hr:<name>
instead of urn:property:<name>, fixing SPARQL PREFIX hr: queries
- Bug 3: filter None values from EmploymentEvent properties dict so
open-ended employment does not store the literal string "None" as endDate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Audited every module's __init__.py and source files. Fixes:
1. Temporal GraphRAG example — was garbled (two sections merged into one
code block). Restored clean single example with correct imports.
2. Semantic extraction — extract_entities/extract_relations/extract_triplets
are not standalone functions; replaced with correct class-based API:
NERExtractor().extract_entities(), RelationExtractor().extract_relations(),
TripletExtractor().extract_triplets(). extract_relations_llm is only in
semantica.semantic_extract.methods (not re-exported from __init__) and
requires entities as its required second positional arg — fixed both.
3. ReteEngine — add_rule() and match() do not exist on ReteEngine.
Replaced with correct API: Rule/Fact dataclasses + build_network([rule])
+ add_fact(fact) + match_patterns().
4. PipelineBuilder — add_stage(name, callable) does not exist; replaced
with add_step(name, type_str, **config). with_parallel_workers() does not
exist; replaced with set_parallelism(n). Pipeline.run() takes no
input_path; removed that kwarg.
5. ProvenanceTracker.track_entity — source_url is not a valid kwarg;
second param is positional source. Fixed in features list and comment.
6. Leftover SHACL section — removed second copy of the SHACL code block
that still referenced to_shacl(), export_shacl(), validate_graph() which
do not exist on OntologyEngine (confirmed in engine.py).
7. Duplicate pip install lines — semantica[shacl] and semantica[db-snowflake]
appeared twice in the installation block; removed duplicates.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bug 1 — Broken snapshot example:
- Replace graph.add_decision(category=...) with graph.record_decision()
which accepts keyword args (add_decision expects a Decision object)
- Define context = AgentContext(...) before calling context.checkpoint()
and context.diff_checkpoints() — these APIs live on AgentContext, not ContextGraph
Bug 2 — Invalid KG example imports:
- Remove KnowledgeGraph, Entity, Relationship, CentralityAnalyzer — not exported
- Replace with GraphBuilder.build() (dict-based API) and CentralityCalculator
which are the actual public exports from semantica.kg
- Fix pipeline example: KnowledgeGraph() → GraphBuilder()
Bug 3 — Nonexistent SHACL APIs:
- Remove export_shacl() and validate_graph() calls — not on OntologyEngine
- Rewrite SHACL section to use real APIs: from_data(), export_owl(),
validate(), from_text(), to_owl()
- Remove semantica[shacl] install instructions (extra not in pyproject.toml)
Bug 4 — Stale docs version badge:
- docs/index.md: bump version badge and release tag link from v0.3.0 → v0.4.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace dense tables with scannable bullet points throughout
- Add plain-English descriptions before each feature section
- Update What's New to cover full v0.4.0 temporal stack, SKOS, SHACL, and fixes
- Add learn-more references linking to docs and cookbook per section
- Slim code examples to focused real-world scenarios, remove API-dump patterns
- Fix duplicate badges, bump version badge to 0.4.0
- Fill empty Learning Resources section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bump version to 0.4.0, move [Unreleased] changelog entries to [0.4.0]
(2026-04-08), and remove duplicate changelog content appended in prior
merges. Release covers temporal data model, SHACL, SKOS, Knowledge
Explorer API, Agno integration, Named Graphs, Datalog Reasoner, and
many more features landed since 0.3.0.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove orphaned unclosed parenthesis (syntax error) in
test_unreleased_changelog_comprehensive.py (OllamaProvider block)
- Fix test_invalid_json_returns_error to assert compliant=False and
non-empty violations instead of missing "error" key — aligns with
check_policy() return schema
- Fix test_as_of_filters_future_decisions to extract scenario via
p["decision"]["scenario"] (correct nesting) and pass
similarity_threshold=0.0 so word-overlap doesn't filter out Bob's
decision below the 0.5 default
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- add_decision: pass valid_from/valid_until through kwargs path so
temporal bounds are not silently dropped into metadata (Codex P1)
- add_decision: raise ValueError when Decision object and kwargs are
both provided, instead of silently ignoring the kwargs (Codex P2)
- fix guard condition to exclude decision_maker (non-None default)
to avoid false-positive ValueError on plain add_decision(obj) calls
- test_395: remove unused `import time`; strengthen as_of test with
concrete assertions on scenarios list (github-code-quality)
- test_unreleased: remove unused `import time`; drop unused `snap =`
assignment; drop unused `provider =` assignment (github-code-quality)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- test_add_decision_kwargs_form: verifies add_decision() accepts kwargs
directly (category, scenario, reasoning, outcome, confidence) without
requiring a Decision object
- test_add_decision_kwargs_and_object_both_return_id: verifies both call
forms return a non-empty string ID
- test_agent_context_inmemory_store_and_retrieve: verifies AgentContext
with VectorStore(backend="inmemory") stores memories without faiss-cpu
Closes#433
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fixes#433
- ContextGraph.add_decision() now accepts keyword arguments (category,
scenario, reasoning, outcome, confidence, entities, decision_maker)
in addition to a Decision object, matching documented behaviour.
Both call forms return the decision ID string.
- Quickstart snippets in README, getting-started.md, and index.md
changed from VectorStore(backend="faiss") to VectorStore(backend="inmemory")
so they work without faiss-cpu installed.
- docs/reference/context.md methods table updated to reflect the dual
signature of add_decision().
- docs/bugs/quickstart_api_mismatch.md added to track the issue.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- honor enable_named_graphs flag when forwarding support
- prevent duplicate FROM/FROM NAMED clauses for same graph
- add default_graph_uri compatibility alias
- harden graph URI sanitization in prune DROP GRAPH path
- add regression tests for all fixes
Co-authored-by: Sameer6305 <sskadam6305@gmail.com>
Co-authored-by: KaifAhmad1 <kaifahmad087@gmail.com>