stel 0.9.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.
Files changed (196) hide show
  1. stel/__init__.py +3 -0
  2. stel/_distribution.py +34 -0
  3. stel/adapters/__init__.py +77 -0
  4. stel/adapters/base.py +1512 -0
  5. stel/adapters/bigquery.py +3462 -0
  6. stel/adapters/duckdb.py +1414 -0
  7. stel/adapters/migration.py +106 -0
  8. stel/adapters/registry.py +194 -0
  9. stel/agent_context.py +1429 -0
  10. stel/backends/__init__.py +33 -0
  11. stel/backends/base.py +117 -0
  12. stel/backends/email_backend.py +100 -0
  13. stel/backends/html_backend.py +377 -0
  14. stel/backends/json_backend.py +42 -0
  15. stel/backends/llm_backend.py +1317 -0
  16. stel/backends/markdown_backend.py +85 -0
  17. stel/backends/options.py +449 -0
  18. stel/backends/pdf_backend.py +89 -0
  19. stel/backends/registry.py +91 -0
  20. stel/budget.py +255 -0
  21. stel/checks/__init__.py +11 -0
  22. stel/checks/python.py +85 -0
  23. stel/checks/runner.py +152 -0
  24. stel/checks/schema.py +1645 -0
  25. stel/chunking.py +124 -0
  26. stel/classic_ml/__init__.py +179 -0
  27. stel/classic_ml/artifacts.py +608 -0
  28. stel/classic_ml/classifier.py +515 -0
  29. stel/classic_ml/common.py +103 -0
  30. stel/classic_ml/contracts.py +14 -0
  31. stel/classic_ml/matrix.py +1031 -0
  32. stel/classic_ml/text.py +698 -0
  33. stel/cli.py +1928 -0
  34. stel/cli_services/__init__.py +8 -0
  35. stel/cli_services/context.py +67 -0
  36. stel/cli_services/serving.py +107 -0
  37. stel/cli_services/watch.py +115 -0
  38. stel/compiler.py +990 -0
  39. stel/concept_cloud/__init__.py +61 -0
  40. stel/concept_cloud/artifact.py +51 -0
  41. stel/concept_cloud/demo.py +237 -0
  42. stel/concept_cloud/export.py +339 -0
  43. stel/concept_cloud/schema.py +323 -0
  44. stel/config/__init__.py +47 -0
  45. stel/config/identifiers.py +65 -0
  46. stel/config/loader.py +684 -0
  47. stel/config/model.py +938 -0
  48. stel/config/profile.py +365 -0
  49. stel/config/project.py +67 -0
  50. stel/config/source.py +79 -0
  51. stel/config/yaml_diagnostics.py +274 -0
  52. stel/credentials.py +294 -0
  53. stel/dag.py +268 -0
  54. stel/dbt_embed/__init__.py +19 -0
  55. stel/dbt_embed/adapter.py +110 -0
  56. stel/dbt_embed/api.py +85 -0
  57. stel/dbt_embed/codegen.py +151 -0
  58. stel/dbt_export.py +251 -0
  59. stel/docs.py +120 -0
  60. stel/embedding.py +328 -0
  61. stel/endpoints.py +86 -0
  62. stel/env.py +71 -0
  63. stel/execution/__init__.py +13 -0
  64. stel/execution/chunk.py +244 -0
  65. stel/execution/contracts.py +39 -0
  66. stel/execution/cost.py +44 -0
  67. stel/execution/embed.py +393 -0
  68. stel/execution/errors.py +39 -0
  69. stel/execution/extraction.py +911 -0
  70. stel/execution/llm.py +450 -0
  71. stel/execution/ml.py +69 -0
  72. stel/execution/search.py +634 -0
  73. stel/execution/transform.py +575 -0
  74. stel/execution/usage.py +9 -0
  75. stel/execution/values.py +10 -0
  76. stel/execution/warehouse.py +16 -0
  77. stel/freshness.py +115 -0
  78. stel/hashing.py +163 -0
  79. stel/llm_map.py +278 -0
  80. stel/logging_setup.py +84 -0
  81. stel/manifest.py +664 -0
  82. stel/mcp_server/__init__.py +5 -0
  83. stel/mcp_server/authorization.py +238 -0
  84. stel/mcp_server/catalog.py +384 -0
  85. stel/mcp_server/contracts.py +323 -0
  86. stel/mcp_server/repository.py +86 -0
  87. stel/mcp_server/server.py +131 -0
  88. stel/mcp_server/service.py +1001 -0
  89. stel/ml_contracts.py +910 -0
  90. stel/optional_dependencies.py +33 -0
  91. stel/paths.py +46 -0
  92. stel/post_extract.py +186 -0
  93. stel/profile.py +627 -0
  94. stel/progress.py +237 -0
  95. stel/providers/__init__.py +99 -0
  96. stel/providers/anthropic.py +548 -0
  97. stel/providers/base.py +1398 -0
  98. stel/providers/deterministic.py +167 -0
  99. stel/providers/registry.py +503 -0
  100. stel/providers/vertex.py +705 -0
  101. stel/providers/vllm.py +342 -0
  102. stel/retrieval/__init__.py +74 -0
  103. stel/retrieval/base.py +346 -0
  104. stel/retrieval/coordination.py +623 -0
  105. stel/retrieval/lancedb.py +804 -0
  106. stel/retrieval/registry.py +90 -0
  107. stel/retrieval_eval.py +433 -0
  108. stel/retrieval_metrics.py +150 -0
  109. stel/runner.py +773 -0
  110. stel/search.py +880 -0
  111. stel/sources/__init__.py +20 -0
  112. stel/sources/base.py +72 -0
  113. stel/sources/gcs.py +248 -0
  114. stel/sources/local.py +502 -0
  115. stel/sql_models.py +213 -0
  116. stel/state_reconciliation.py +163 -0
  117. stel/synth/__init__.py +19 -0
  118. stel/synth/arxiv_papers.py +69 -0
  119. stel/synth/invoice_pdfs.py +118 -0
  120. stel/synth/invoice_text.py +65 -0
  121. stel/synth/invoices.py +50 -0
  122. stel/synth/posts.py +55 -0
  123. stel/synth/product_html.py +78 -0
  124. stel/synth/support_emails.py +50 -0
  125. stel/synth/support_tickets.py +81 -0
  126. stel/templates/concept_cloud/concept_cloud.html +335 -0
  127. stel/templates/concept_cloud/vendor/3d-force-graph.min.js +5 -0
  128. stel/templates/concept_cloud/vendor/README.md +21 -0
  129. stel/templates/docs/base.html +52 -0
  130. stel/templates/docs/index.html +61 -0
  131. stel/templates/docs/lineage.html +29 -0
  132. stel/templates/docs/model.html +149 -0
  133. stel/templates/html/models/raw_pages.yml +30 -0
  134. stel/templates/html/profiles.yml +8 -0
  135. stel/templates/html/sources/pages.yml +8 -0
  136. stel/templates/html/stel_project.yml +11 -0
  137. stel/templates/html/transforms/.gitkeep +0 -0
  138. stel/templates/json/.gitkeep +0 -0
  139. stel/templates/json/models/raw_invoices.yml +31 -0
  140. stel/templates/json/profiles.yml +8 -0
  141. stel/templates/json/sources/invoices.yml +8 -0
  142. stel/templates/json/stel_project.yml +11 -0
  143. stel/templates/json/transforms/.gitkeep +0 -0
  144. stel/templates/markdown/models/raw_documents.yml +26 -0
  145. stel/templates/markdown/profiles.yml +8 -0
  146. stel/templates/markdown/sources/documents.yml +8 -0
  147. stel/templates/markdown/stel_project.yml +11 -0
  148. stel/templates/markdown/transforms/.gitkeep +0 -0
  149. stel/templates/pdf/models/raw_pdf_text.yml +26 -0
  150. stel/templates/pdf/profiles.yml +13 -0
  151. stel/templates/pdf/sources/documents.yml +11 -0
  152. stel/templates/pdf/stel_project.yml +11 -0
  153. stel/templates/pdf/transforms/.gitkeep +0 -0
  154. stel/test_specs.py +467 -0
  155. stel/text/__init__.py +139 -0
  156. stel/text/dedup.py +74 -0
  157. stel/text/encoding.py +22 -0
  158. stel/text/features.py +246 -0
  159. stel/text/keyphrases.py +116 -0
  160. stel/text/language.py +25 -0
  161. stel/text/linking.py +917 -0
  162. stel/text/nlp.py +239 -0
  163. stel/text/pii.py +188 -0
  164. stel/text/relations.py +662 -0
  165. stel/text/stats.py +35 -0
  166. stel/text/tokens.py +57 -0
  167. stel/text/tone.py +232 -0
  168. stel/text/transforms/__init__.py +12 -0
  169. stel/text/transforms/_document_features.py +488 -0
  170. stel/text/transforms/_helpers.py +23 -0
  171. stel/text/transforms/_keyphrases.py +397 -0
  172. stel/text/transforms/_linking.py +290 -0
  173. stel/text/transforms/_nlp.py +267 -0
  174. stel/text/transforms/_relations.py +455 -0
  175. stel/text/transforms/_tone.py +440 -0
  176. stel/text/transforms/clean_encoding.py +28 -0
  177. stel/text/transforms/count_tokens.py +30 -0
  178. stel/text/transforms/detect_language.py +30 -0
  179. stel/text/transforms/document_tone.py +22 -0
  180. stel/text/transforms/extract_keyphrases.py +31 -0
  181. stel/text/transforms/extract_relations.py +41 -0
  182. stel/text/transforms/find_duplicates.py +43 -0
  183. stel/text/transforms/link_entities.py +34 -0
  184. stel/text/transforms/nlp_document_features.py +29 -0
  185. stel/text/transforms/nlp_entities.py +33 -0
  186. stel/text/transforms/nlp_tokens.py +33 -0
  187. stel/text/transforms/redact_pii.py +115 -0
  188. stel/text/transforms/text_stats.py +36 -0
  189. stel/transforms/__init__.py +21 -0
  190. stel/transforms/runner.py +393 -0
  191. stel/versioning.py +462 -0
  192. stel-0.9.0.dist-info/METADATA +2535 -0
  193. stel-0.9.0.dist-info/RECORD +196 -0
  194. stel-0.9.0.dist-info/WHEEL +4 -0
  195. stel-0.9.0.dist-info/entry_points.txt +2 -0
  196. stel-0.9.0.dist-info/licenses/LICENSE +21 -0
stel/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ from ._distribution import distribution_version
2
+
3
+ __version__ = distribution_version()
stel/_distribution.py ADDED
@@ -0,0 +1,34 @@
1
+ """The installed distribution's name and version.
2
+
3
+ `DISTRIBUTION_NAME` must equal `[project] name` in pyproject.toml. Asking
4
+ `importlib.metadata` for a name that is not installed does not raise here — it
5
+ degrades to `"unknown"`, because a source checkout has no distribution metadata
6
+ and that must not break `--help`. The same tolerance means a stale name is
7
+ invisible: every lookup keeps working and just reports `"unknown"`.
8
+
9
+ That matters because the value is durable. It is written into run_results
10
+ metadata, into every extracted row's parser identity, and into the `runtime`
11
+ block of every fitted classic-ML artifact — where it is validated on load. Four
12
+ call sites each performed this lookup independently; one of them drifting would
13
+ silently change what those artifacts record. Hence one definition, and
14
+ `tests/test_frozen_names.py` asserting the resolved version is not `"unknown"`.
15
+
16
+ Not memoized: the lookup keeps `importlib.metadata`'s exact semantics so this
17
+ module changes no behavior.
18
+ """
19
+
20
+ from __future__ import annotations
21
+
22
+ from importlib.metadata import PackageNotFoundError, version
23
+
24
+ DISTRIBUTION_NAME = "stel"
25
+
26
+ UNKNOWN_VERSION = "unknown"
27
+
28
+
29
+ def distribution_version() -> str:
30
+ """The installed stel version, or `"unknown"` outside an installation."""
31
+ try:
32
+ return version(DISTRIBUTION_NAME)
33
+ except PackageNotFoundError:
34
+ return UNKNOWN_VERSION
@@ -0,0 +1,77 @@
1
+ from . import (
2
+ bigquery, # noqa: F401 # side-effect: registers BigQueryAdapter
3
+ duckdb, # noqa: F401 # side-effect: registers DuckDBAdapter
4
+ )
5
+ from .base import (
6
+ AdapterCapabilityError,
7
+ AdapterConfigError,
8
+ AdapterError,
9
+ LegacyWarehouseNamesError,
10
+ ReadOrdering,
11
+ ReadPredicate,
12
+ ReadPredicateOperator,
13
+ SchemaChangePlan,
14
+ StaleStateFenceError,
15
+ StateAbsenceProbe,
16
+ StatePage,
17
+ StatePageReader,
18
+ StatePageRecord,
19
+ StateRecord,
20
+ StateScope,
21
+ StateScopeFence,
22
+ StateValue,
23
+ TableReadRequest,
24
+ TableReadSnapshot,
25
+ WarehouseAdapter,
26
+ WarehouseCapability,
27
+ )
28
+ from .migration import (
29
+ MigrationConflictError,
30
+ TableRename,
31
+ apply_name_migration,
32
+ plan_name_migration,
33
+ )
34
+ from .registry import (
35
+ UnknownAdapterError,
36
+ adapter_capabilities,
37
+ create_adapter,
38
+ list_adapter_types,
39
+ parse_warehouse_config,
40
+ prepare_warehouse_profile_input,
41
+ register,
42
+ )
43
+
44
+ __all__ = [
45
+ "AdapterCapabilityError",
46
+ "AdapterConfigError",
47
+ "AdapterError",
48
+ "LegacyWarehouseNamesError",
49
+ "MigrationConflictError",
50
+ "ReadOrdering",
51
+ "ReadPredicate",
52
+ "ReadPredicateOperator",
53
+ "SchemaChangePlan",
54
+ "StaleStateFenceError",
55
+ "StateAbsenceProbe",
56
+ "StatePage",
57
+ "StatePageReader",
58
+ "StatePageRecord",
59
+ "StateRecord",
60
+ "StateScope",
61
+ "StateScopeFence",
62
+ "StateValue",
63
+ "TableReadRequest",
64
+ "TableReadSnapshot",
65
+ "TableRename",
66
+ "UnknownAdapterError",
67
+ "WarehouseAdapter",
68
+ "WarehouseCapability",
69
+ "adapter_capabilities",
70
+ "apply_name_migration",
71
+ "create_adapter",
72
+ "list_adapter_types",
73
+ "parse_warehouse_config",
74
+ "plan_name_migration",
75
+ "prepare_warehouse_profile_input",
76
+ "register",
77
+ ]