kgmodule-utils 0.30.0__tar.gz → 0.30.2__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 (54) hide show
  1. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/PKG-INFO +12 -4
  2. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/README.md +11 -3
  3. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/pyproject.toml +1 -1
  4. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/__init__.py +1 -1
  5. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/synthesis/_config.py +7 -6
  6. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/synthesis/_text.py +13 -5
  7. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/LICENSE +0 -0
  8. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/analysis/__init__.py +0 -0
  9. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/analysis/scores.py +0 -0
  10. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/corpus_embedder.py +0 -0
  11. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/devicepack.py +0 -0
  12. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/embed.py +0 -0
  13. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/embedder.py +0 -0
  14. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/extractor.py +0 -0
  15. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/ingest/__init__.py +0 -0
  16. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/ingest/converters.py +0 -0
  17. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/ingest/derived.py +0 -0
  18. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/ingest/manifest.py +0 -0
  19. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/ingest/pipeline.py +0 -0
  20. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/mcp/__init__.py +0 -0
  21. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/mcp/_names.py +0 -0
  22. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/mcp/cli.py +0 -0
  23. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/mcp/server.py +0 -0
  24. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/module.py +0 -0
  25. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/pipeline.py +0 -0
  26. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/py.typed +0 -0
  27. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/retrieval/__init__.py +0 -0
  28. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/retrieval/hits.py +0 -0
  29. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/semantic.py +0 -0
  30. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/snapshots/__init__.py +0 -0
  31. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/snapshots/manager.py +0 -0
  32. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/snapshots/models.py +0 -0
  33. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/specs.py +0 -0
  34. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/stats.py +0 -0
  35. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/store.py +0 -0
  36. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/synthesis/__init__.py +0 -0
  37. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/synthesis/_anthropic.py +0 -0
  38. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/synthesis/_image.py +0 -0
  39. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/synthesis/factory.py +0 -0
  40. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/temporal.py +0 -0
  41. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/validation.py +0 -0
  42. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/vector_backend.py +0 -0
  43. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/viz/__init__.py +0 -0
  44. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/viz/graph_html.py +0 -0
  45. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/viz/theme.py +0 -0
  46. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/viz/tooltip.py +0 -0
  47. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/viz3d/__init__.py +0 -0
  48. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/viz3d/layout.py +0 -0
  49. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/viz3d/organic.py +0 -0
  50. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/viz3d/qt.py +0 -0
  51. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/viz3d/species.py +0 -0
  52. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/worker/__init__.py +0 -0
  53. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/worker/client.py +0 -0
  54. {kgmodule_utils-0.30.0 → kgmodule_utils-0.30.2}/src/kg_utils/worker/ops.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kgmodule-utils
3
- Version: 0.30.0
3
+ Version: 0.30.2
4
4
  Summary: Shared types, graph store, semantic index, and pipeline base for the KGModule SDK
5
5
  License-Expression: Elastic-2.0
6
6
  License-File: LICENSE
@@ -59,7 +59,7 @@ Description-Content-Type: text/markdown
59
59
 
60
60
  [![Python](https://img.shields.io/badge/python-3.12%20%7C%203.13-blue.svg)](https://www.python.org/)
61
61
  [![License: Elastic-2.0](https://img.shields.io/badge/License-Elastic%202.0-blue.svg)](https://www.elastic.co/licensing/elastic-license)
62
- [![Version](https://img.shields.io/badge/version-0.30.0-blue.svg)](https://github.com/Flux-Frontiers/KG_utils/releases)
62
+ [![Version](https://img.shields.io/badge/version-0.30.2-blue.svg)](https://github.com/Flux-Frontiers/KG_utils/releases)
63
63
  [![CI](https://github.com/Flux-Frontiers/KG_utils/actions/workflows/ci.yml/badge.svg)](https://github.com/Flux-Frontiers/KG_utils/actions/workflows/ci.yml)
64
64
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
65
65
  [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.21284866-blue.svg)](https://doi.org/10.5281/zenodo.21284866)
@@ -84,6 +84,14 @@ Fleet modules use it in two ways. [PyCodeKG](https://github.com/Flux-Frontiers/p
84
84
 
85
85
  ## Latest News
86
86
 
87
+ - **0.30.2 (2026-11-17)** -- A synthesis key now goes only to its own backend.
88
+ The `omlx` backend no longer sends `OPENAI_API_KEY` to the local oMLX server
89
+ when `VLLM_API_KEY` is unset, and cloud backends no longer get oMLX's key.
90
+ - **0.30.1 (2026-11-17)** -- The image rewrite prompt asks for an accurate
91
+ scene: the end of the moment, a person turned into something shown only as
92
+ what they became, the narrator in the scene, everyone clothed, and no
93
+ lettering. A rewrite model of Qwen3.6-35B-A3B or Qwen3.8-27B follows the
94
+ rules; a 4B model mostly ignores them.
87
95
  - **0.30.0 (2026-11-05)** -- An Anthropic text backend: `SYNTH_BACKEND=anthropic`
88
96
  (or `backend="anthropic"`) answers through Claude via the `anthropic` SDK,
89
97
  now part of the `synthesis` extras. And OpenAI's gpt-5 and later answer
@@ -883,7 +891,7 @@ If you use kgmodule-utils in research or a project, please cite it:
883
891
 
884
892
  **APA**
885
893
 
886
- > Suchanek, E. G. (2026). *kgmodule-utils: Shared SDK for the KGModule Knowledge-Graph Ecosystem* (Version 0.30.0) [Software]. Flux-Frontiers. https://doi.org/10.5281/zenodo.21284866
894
+ > Suchanek, E. G. (2026). *kgmodule-utils: Shared SDK for the KGModule Knowledge-Graph Ecosystem* (Version 0.30.2) [Software]. Flux-Frontiers. https://doi.org/10.5281/zenodo.21284866
887
895
 
888
896
  **BibTeX**
889
897
 
@@ -891,7 +899,7 @@ If you use kgmodule-utils in research or a project, please cite it:
891
899
  @software{suchanek_kgmodule_utils,
892
900
  author = {Suchanek, Eric G.},
893
901
  title = {{kgmodule-utils}: Shared SDK for the KGModule Knowledge-Graph Ecosystem},
894
- version = {0.30.0},
902
+ version = {0.30.2},
895
903
  year = {2026},
896
904
  publisher = {Flux-Frontiers},
897
905
  url = {https://github.com/Flux-Frontiers/KG_utils},
@@ -1,7 +1,7 @@
1
1
 
2
2
  [![Python](https://img.shields.io/badge/python-3.12%20%7C%203.13-blue.svg)](https://www.python.org/)
3
3
  [![License: Elastic-2.0](https://img.shields.io/badge/License-Elastic%202.0-blue.svg)](https://www.elastic.co/licensing/elastic-license)
4
- [![Version](https://img.shields.io/badge/version-0.30.0-blue.svg)](https://github.com/Flux-Frontiers/KG_utils/releases)
4
+ [![Version](https://img.shields.io/badge/version-0.30.2-blue.svg)](https://github.com/Flux-Frontiers/KG_utils/releases)
5
5
  [![CI](https://github.com/Flux-Frontiers/KG_utils/actions/workflows/ci.yml/badge.svg)](https://github.com/Flux-Frontiers/KG_utils/actions/workflows/ci.yml)
6
6
  [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
7
7
  [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.21284866-blue.svg)](https://doi.org/10.5281/zenodo.21284866)
@@ -26,6 +26,14 @@ Fleet modules use it in two ways. [PyCodeKG](https://github.com/Flux-Frontiers/p
26
26
 
27
27
  ## Latest News
28
28
 
29
+ - **0.30.2 (2026-11-17)** -- A synthesis key now goes only to its own backend.
30
+ The `omlx` backend no longer sends `OPENAI_API_KEY` to the local oMLX server
31
+ when `VLLM_API_KEY` is unset, and cloud backends no longer get oMLX's key.
32
+ - **0.30.1 (2026-11-17)** -- The image rewrite prompt asks for an accurate
33
+ scene: the end of the moment, a person turned into something shown only as
34
+ what they became, the narrator in the scene, everyone clothed, and no
35
+ lettering. A rewrite model of Qwen3.6-35B-A3B or Qwen3.8-27B follows the
36
+ rules; a 4B model mostly ignores them.
29
37
  - **0.30.0 (2026-11-05)** -- An Anthropic text backend: `SYNTH_BACKEND=anthropic`
30
38
  (or `backend="anthropic"`) answers through Claude via the `anthropic` SDK,
31
39
  now part of the `synthesis` extras. And OpenAI's gpt-5 and later answer
@@ -825,7 +833,7 @@ If you use kgmodule-utils in research or a project, please cite it:
825
833
 
826
834
  **APA**
827
835
 
828
- > Suchanek, E. G. (2026). *kgmodule-utils: Shared SDK for the KGModule Knowledge-Graph Ecosystem* (Version 0.30.0) [Software]. Flux-Frontiers. https://doi.org/10.5281/zenodo.21284866
836
+ > Suchanek, E. G. (2026). *kgmodule-utils: Shared SDK for the KGModule Knowledge-Graph Ecosystem* (Version 0.30.2) [Software]. Flux-Frontiers. https://doi.org/10.5281/zenodo.21284866
829
837
 
830
838
  **BibTeX**
831
839
 
@@ -833,7 +841,7 @@ If you use kgmodule-utils in research or a project, please cite it:
833
841
  @software{suchanek_kgmodule_utils,
834
842
  author = {Suchanek, Eric G.},
835
843
  title = {{kgmodule-utils}: Shared SDK for the KGModule Knowledge-Graph Ecosystem},
836
- version = {0.30.0},
844
+ version = {0.30.2},
837
845
  year = {2026},
838
846
  publisher = {Flux-Frontiers},
839
847
  url = {https://github.com/Flux-Frontiers/KG_utils},
@@ -9,7 +9,7 @@ build-backend = "poetry.core.masonry.api"
9
9
 
10
10
  [project]
11
11
  name = "kgmodule-utils"
12
- version = "0.30.0"
12
+ version = "0.30.2"
13
13
  description = "Shared types, graph store, semantic index, and pipeline base for the KGModule SDK"
14
14
  readme = "README.md"
15
15
  license = "Elastic-2.0"
@@ -72,4 +72,4 @@ The core install is stdlib-only; everything heavier is opt-in.
72
72
  pip install 'kgmodule-utils[synthesis-mflux]' # + mflux (Apple Silicon local gen)
73
73
  """
74
74
 
75
- __version__ = "0.30.0"
75
+ __version__ = "0.30.2"
@@ -130,12 +130,13 @@ def text_config_from_env() -> TextConfig:
130
130
  backend = TextBackend.OMLX
131
131
 
132
132
  endpoint = os.environ.get("SYNTH_ENDPOINT") or os.environ.get("VLLM_ENDPOINT_URL") or ""
133
- api_key = (
134
- os.environ.get("SYNTH_API_KEY")
135
- or os.environ.get("VLLM_API_KEY")
136
- or os.environ.get("OPENAI_API_KEY")
137
- or ""
138
- )
133
+ # Each key goes only to its own backend: VLLM_API_KEY is oMLX's and
134
+ # OPENAI_API_KEY is OpenAI's, so neither reaches another server.
135
+ api_key = os.environ.get("SYNTH_API_KEY") or ""
136
+ if not api_key and backend is TextBackend.OMLX:
137
+ api_key = os.environ.get("VLLM_API_KEY") or ""
138
+ elif not api_key and backend is TextBackend.OPENAI:
139
+ api_key = os.environ.get("OPENAI_API_KEY") or ""
139
140
  if backend == TextBackend.ANTHROPIC:
140
141
  # An OpenAI key is never a Claude key; empty lets the SDK resolve one.
141
142
  api_key = os.environ.get("ANTHROPIC_API_KEY") or ""
@@ -44,11 +44,19 @@ _RAG_SYSTEM = (
44
44
  )
45
45
 
46
46
  _IMAGE_REWRITE_SYSTEM = (
47
- "You are an expert art director. Given a passage of historical text, write a single concise "
48
- "image generation prompt (one paragraph, no bullet points, no quotation marks) that vividly "
49
- "describes the scene for a text-to-image model. Focus on visual elements: setting, lighting, "
50
- "figures, mood, and artistic style. Do NOT include any text, labels, captions, or words in "
51
- "the scene description. Output ONLY the prompt, nothing else."
47
+ "You are an expert art director. Given a passage of historical text, write a single "
48
+ "concise image generation prompt (one paragraph, no bullet points, no quotation marks) "
49
+ "that vividly and ACCURATELY describes the scene for a text-to-image model. Focus on "
50
+ "visual elements: setting, lighting, figures, mood, and artistic style. Be faithful to "
51
+ "the passage: show the scene as it stands at the END of the moment described. Anyone the "
52
+ "passage says was turned into something no longer exists as a person; show only the thing"
53
+ " they became. Name every key subject concretely (the animal, the object, its material). "
54
+ "If the passage has a narrator or eyewitness, place them in the scene, watching. Describe"
55
+ " people by appearance and period clothing, since the image model does not know names. Do"
56
+ " NOT include any text, labels, captions, or words in the scene description. Anyone "
57
+ "shown, including a figure turned to stone or salt, is fully clothed in period dress. "
58
+ "Never ask for names, titles or lettering to appear on ships, signs or anything else. "
59
+ "Keep it under 120 words. Output ONLY the prompt, nothing else."
52
60
  )
53
61
 
54
62
 
File without changes