knowledgecomplex 0.1.0__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,91 @@
1
+ # knowledgecomplex — typed simplicial complexes backed by OWL, SHACL, and SPARQL.
2
+ # Internal dependencies: rdflib, pyshacl, owlrl
3
+ # These are never re-exported. The public API is schema.py and graph.py only.
4
+
5
+ from knowledgecomplex.schema import SchemaBuilder, vocab, text, TextDescriptor, Codec
6
+ from knowledgecomplex.graph import KnowledgeComplex, Element
7
+ from knowledgecomplex.filtration import Filtration
8
+ from knowledgecomplex.exceptions import ValidationError, SchemaError, UnknownQueryError
9
+ from knowledgecomplex.audit import AuditReport, AuditViolation, audit_file
10
+ from knowledgecomplex.io import save_graph, load_graph, dump_graph
11
+ from knowledgecomplex.clique import find_cliques, infer_faces, fill_cliques
12
+ from knowledgecomplex.diff import ComplexDiff, ComplexSequence
13
+ from knowledgecomplex.codecs import MarkdownCodec, verify_documents
14
+ from knowledgecomplex.viz import (
15
+ to_networkx, verify_networkx, type_color_map,
16
+ plot_hasse, plot_hasse_star, plot_hasse_skeleton,
17
+ plot_geometric, plot_geometric_interactive,
18
+ plot_complex, plot_star, plot_skeleton, # deprecated aliases
19
+ )
20
+
21
+ try:
22
+ from knowledgecomplex.analysis import (
23
+ boundary_matrices,
24
+ betti_numbers,
25
+ euler_characteristic,
26
+ hodge_laplacian,
27
+ edge_pagerank,
28
+ edge_pagerank_all,
29
+ hodge_decomposition,
30
+ edge_influence,
31
+ hodge_analysis,
32
+ graph_laplacian,
33
+ approximate_pagerank,
34
+ heat_kernel_pagerank,
35
+ sweep_cut,
36
+ local_partition,
37
+ edge_sweep_cut,
38
+ edge_local_partition,
39
+ BoundaryMatrices,
40
+ HodgeDecomposition,
41
+ EdgeInfluence,
42
+ HodgeAnalysisResults,
43
+ SweepCut,
44
+ EdgeSweepCut,
45
+ )
46
+ _HAS_ANALYSIS = True
47
+ except ImportError:
48
+ _HAS_ANALYSIS = False
49
+
50
+ __all__ = [
51
+ # Schema authoring
52
+ "SchemaBuilder", "vocab", "text", "TextDescriptor", "Codec",
53
+ # Instance management
54
+ "KnowledgeComplex", "Element",
55
+ # Filtrations
56
+ "Filtration",
57
+ # Exceptions
58
+ "ValidationError", "SchemaError", "UnknownQueryError",
59
+ # File I/O
60
+ "save_graph", "load_graph", "dump_graph",
61
+ # Visualization — Hasse diagrams
62
+ "to_networkx", "verify_networkx", "type_color_map",
63
+ "plot_hasse", "plot_hasse_star", "plot_hasse_skeleton",
64
+ # Visualization — geometric realization
65
+ "plot_geometric", "plot_geometric_interactive",
66
+ # Visualization — deprecated aliases
67
+ "plot_complex", "plot_star", "plot_skeleton",
68
+ # Clique inference
69
+ "find_cliques", "infer_faces", "fill_cliques",
70
+ # Diffs and sequences
71
+ "ComplexDiff", "ComplexSequence",
72
+ # Codecs
73
+ "MarkdownCodec", "verify_documents",
74
+ # Audit
75
+ "AuditReport", "AuditViolation", "audit_file",
76
+ ]
77
+
78
+ if _HAS_ANALYSIS:
79
+ __all__ += [
80
+ # Algebraic topology
81
+ "boundary_matrices", "betti_numbers", "euler_characteristic",
82
+ "hodge_laplacian", "edge_pagerank", "edge_pagerank_all",
83
+ "hodge_decomposition", "edge_influence", "hodge_analysis",
84
+ "BoundaryMatrices", "HodgeDecomposition", "EdgeInfluence",
85
+ "HodgeAnalysisResults",
86
+ # Graph analysis
87
+ "graph_laplacian", "approximate_pagerank", "heat_kernel_pagerank",
88
+ "sweep_cut", "local_partition",
89
+ "edge_sweep_cut", "edge_local_partition",
90
+ "SweepCut", "EdgeSweepCut",
91
+ ]