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.
- stel/__init__.py +3 -0
- stel/_distribution.py +34 -0
- stel/adapters/__init__.py +77 -0
- stel/adapters/base.py +1512 -0
- stel/adapters/bigquery.py +3462 -0
- stel/adapters/duckdb.py +1414 -0
- stel/adapters/migration.py +106 -0
- stel/adapters/registry.py +194 -0
- stel/agent_context.py +1429 -0
- stel/backends/__init__.py +33 -0
- stel/backends/base.py +117 -0
- stel/backends/email_backend.py +100 -0
- stel/backends/html_backend.py +377 -0
- stel/backends/json_backend.py +42 -0
- stel/backends/llm_backend.py +1317 -0
- stel/backends/markdown_backend.py +85 -0
- stel/backends/options.py +449 -0
- stel/backends/pdf_backend.py +89 -0
- stel/backends/registry.py +91 -0
- stel/budget.py +255 -0
- stel/checks/__init__.py +11 -0
- stel/checks/python.py +85 -0
- stel/checks/runner.py +152 -0
- stel/checks/schema.py +1645 -0
- stel/chunking.py +124 -0
- stel/classic_ml/__init__.py +179 -0
- stel/classic_ml/artifacts.py +608 -0
- stel/classic_ml/classifier.py +515 -0
- stel/classic_ml/common.py +103 -0
- stel/classic_ml/contracts.py +14 -0
- stel/classic_ml/matrix.py +1031 -0
- stel/classic_ml/text.py +698 -0
- stel/cli.py +1928 -0
- stel/cli_services/__init__.py +8 -0
- stel/cli_services/context.py +67 -0
- stel/cli_services/serving.py +107 -0
- stel/cli_services/watch.py +115 -0
- stel/compiler.py +990 -0
- stel/concept_cloud/__init__.py +61 -0
- stel/concept_cloud/artifact.py +51 -0
- stel/concept_cloud/demo.py +237 -0
- stel/concept_cloud/export.py +339 -0
- stel/concept_cloud/schema.py +323 -0
- stel/config/__init__.py +47 -0
- stel/config/identifiers.py +65 -0
- stel/config/loader.py +684 -0
- stel/config/model.py +938 -0
- stel/config/profile.py +365 -0
- stel/config/project.py +67 -0
- stel/config/source.py +79 -0
- stel/config/yaml_diagnostics.py +274 -0
- stel/credentials.py +294 -0
- stel/dag.py +268 -0
- stel/dbt_embed/__init__.py +19 -0
- stel/dbt_embed/adapter.py +110 -0
- stel/dbt_embed/api.py +85 -0
- stel/dbt_embed/codegen.py +151 -0
- stel/dbt_export.py +251 -0
- stel/docs.py +120 -0
- stel/embedding.py +328 -0
- stel/endpoints.py +86 -0
- stel/env.py +71 -0
- stel/execution/__init__.py +13 -0
- stel/execution/chunk.py +244 -0
- stel/execution/contracts.py +39 -0
- stel/execution/cost.py +44 -0
- stel/execution/embed.py +393 -0
- stel/execution/errors.py +39 -0
- stel/execution/extraction.py +911 -0
- stel/execution/llm.py +450 -0
- stel/execution/ml.py +69 -0
- stel/execution/search.py +634 -0
- stel/execution/transform.py +575 -0
- stel/execution/usage.py +9 -0
- stel/execution/values.py +10 -0
- stel/execution/warehouse.py +16 -0
- stel/freshness.py +115 -0
- stel/hashing.py +163 -0
- stel/llm_map.py +278 -0
- stel/logging_setup.py +84 -0
- stel/manifest.py +664 -0
- stel/mcp_server/__init__.py +5 -0
- stel/mcp_server/authorization.py +238 -0
- stel/mcp_server/catalog.py +384 -0
- stel/mcp_server/contracts.py +323 -0
- stel/mcp_server/repository.py +86 -0
- stel/mcp_server/server.py +131 -0
- stel/mcp_server/service.py +1001 -0
- stel/ml_contracts.py +910 -0
- stel/optional_dependencies.py +33 -0
- stel/paths.py +46 -0
- stel/post_extract.py +186 -0
- stel/profile.py +627 -0
- stel/progress.py +237 -0
- stel/providers/__init__.py +99 -0
- stel/providers/anthropic.py +548 -0
- stel/providers/base.py +1398 -0
- stel/providers/deterministic.py +167 -0
- stel/providers/registry.py +503 -0
- stel/providers/vertex.py +705 -0
- stel/providers/vllm.py +342 -0
- stel/retrieval/__init__.py +74 -0
- stel/retrieval/base.py +346 -0
- stel/retrieval/coordination.py +623 -0
- stel/retrieval/lancedb.py +804 -0
- stel/retrieval/registry.py +90 -0
- stel/retrieval_eval.py +433 -0
- stel/retrieval_metrics.py +150 -0
- stel/runner.py +773 -0
- stel/search.py +880 -0
- stel/sources/__init__.py +20 -0
- stel/sources/base.py +72 -0
- stel/sources/gcs.py +248 -0
- stel/sources/local.py +502 -0
- stel/sql_models.py +213 -0
- stel/state_reconciliation.py +163 -0
- stel/synth/__init__.py +19 -0
- stel/synth/arxiv_papers.py +69 -0
- stel/synth/invoice_pdfs.py +118 -0
- stel/synth/invoice_text.py +65 -0
- stel/synth/invoices.py +50 -0
- stel/synth/posts.py +55 -0
- stel/synth/product_html.py +78 -0
- stel/synth/support_emails.py +50 -0
- stel/synth/support_tickets.py +81 -0
- stel/templates/concept_cloud/concept_cloud.html +335 -0
- stel/templates/concept_cloud/vendor/3d-force-graph.min.js +5 -0
- stel/templates/concept_cloud/vendor/README.md +21 -0
- stel/templates/docs/base.html +52 -0
- stel/templates/docs/index.html +61 -0
- stel/templates/docs/lineage.html +29 -0
- stel/templates/docs/model.html +149 -0
- stel/templates/html/models/raw_pages.yml +30 -0
- stel/templates/html/profiles.yml +8 -0
- stel/templates/html/sources/pages.yml +8 -0
- stel/templates/html/stel_project.yml +11 -0
- stel/templates/html/transforms/.gitkeep +0 -0
- stel/templates/json/.gitkeep +0 -0
- stel/templates/json/models/raw_invoices.yml +31 -0
- stel/templates/json/profiles.yml +8 -0
- stel/templates/json/sources/invoices.yml +8 -0
- stel/templates/json/stel_project.yml +11 -0
- stel/templates/json/transforms/.gitkeep +0 -0
- stel/templates/markdown/models/raw_documents.yml +26 -0
- stel/templates/markdown/profiles.yml +8 -0
- stel/templates/markdown/sources/documents.yml +8 -0
- stel/templates/markdown/stel_project.yml +11 -0
- stel/templates/markdown/transforms/.gitkeep +0 -0
- stel/templates/pdf/models/raw_pdf_text.yml +26 -0
- stel/templates/pdf/profiles.yml +13 -0
- stel/templates/pdf/sources/documents.yml +11 -0
- stel/templates/pdf/stel_project.yml +11 -0
- stel/templates/pdf/transforms/.gitkeep +0 -0
- stel/test_specs.py +467 -0
- stel/text/__init__.py +139 -0
- stel/text/dedup.py +74 -0
- stel/text/encoding.py +22 -0
- stel/text/features.py +246 -0
- stel/text/keyphrases.py +116 -0
- stel/text/language.py +25 -0
- stel/text/linking.py +917 -0
- stel/text/nlp.py +239 -0
- stel/text/pii.py +188 -0
- stel/text/relations.py +662 -0
- stel/text/stats.py +35 -0
- stel/text/tokens.py +57 -0
- stel/text/tone.py +232 -0
- stel/text/transforms/__init__.py +12 -0
- stel/text/transforms/_document_features.py +488 -0
- stel/text/transforms/_helpers.py +23 -0
- stel/text/transforms/_keyphrases.py +397 -0
- stel/text/transforms/_linking.py +290 -0
- stel/text/transforms/_nlp.py +267 -0
- stel/text/transforms/_relations.py +455 -0
- stel/text/transforms/_tone.py +440 -0
- stel/text/transforms/clean_encoding.py +28 -0
- stel/text/transforms/count_tokens.py +30 -0
- stel/text/transforms/detect_language.py +30 -0
- stel/text/transforms/document_tone.py +22 -0
- stel/text/transforms/extract_keyphrases.py +31 -0
- stel/text/transforms/extract_relations.py +41 -0
- stel/text/transforms/find_duplicates.py +43 -0
- stel/text/transforms/link_entities.py +34 -0
- stel/text/transforms/nlp_document_features.py +29 -0
- stel/text/transforms/nlp_entities.py +33 -0
- stel/text/transforms/nlp_tokens.py +33 -0
- stel/text/transforms/redact_pii.py +115 -0
- stel/text/transforms/text_stats.py +36 -0
- stel/transforms/__init__.py +21 -0
- stel/transforms/runner.py +393 -0
- stel/versioning.py +462 -0
- stel-0.9.0.dist-info/METADATA +2535 -0
- stel-0.9.0.dist-info/RECORD +196 -0
- stel-0.9.0.dist-info/WHEEL +4 -0
- stel-0.9.0.dist-info/entry_points.txt +2 -0
- stel-0.9.0.dist-info/licenses/LICENSE +21 -0
stel/__init__.py
ADDED
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
|
+
]
|