calc-flow-python 4.0.0__cp313-abi3-win_amd64.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.
- calc_flow/__init__.py +169 -0
- calc_flow/_native.pyd +0 -0
- calc_flow/_native.pyi +366 -0
- calc_flow/array.py +1324 -0
- calc_flow/capabilities.py +775 -0
- calc_flow/config.py +219 -0
- calc_flow/errors.py +25 -0
- calc_flow/join_spec.py +156 -0
- calc_flow/pipeline.py +1123 -0
- calc_flow/py.typed +0 -0
- calc_flow/runtime.py +979 -0
- calc_flow/store.py +138 -0
- calc_flow/symbolic/__init__.py +65 -0
- calc_flow/symbolic/_generated_rolling_kernels.py +23 -0
- calc_flow/symbolic/analyzer.py +2280 -0
- calc_flow/symbolic/domains.py +77 -0
- calc_flow/symbolic/errors.py +58 -0
- calc_flow/symbolic/expr.py +662 -0
- calc_flow/symbolic/lower/__init__.py +31 -0
- calc_flow/symbolic/lower/planners.py +1270 -0
- calc_flow/symbolic/lower/program.py +840 -0
- calc_flow/symbolic/lower/segments.py +836 -0
- calc_flow/symbolic/lower/strategies.py +1472 -0
- calc_flow/symbolic/nodes.py +603 -0
- calc_flow/symbolic/ops.py +1155 -0
- calc_flow/symbolic/optimizer.py +600 -0
- calc_flow/symbolic/program.py +377 -0
- calc_flow/symbolic/types.py +110 -0
- calc_flow/symbolic/windows.py +153 -0
- calc_flow/udf.py +19 -0
- calc_flow_python-4.0.0.dist-info/METADATA +376 -0
- calc_flow_python-4.0.0.dist-info/RECORD +35 -0
- calc_flow_python-4.0.0.dist-info/WHEEL +4 -0
- calc_flow_python-4.0.0.dist-info/licenses/LICENSE +202 -0
- calc_flow_python-4.0.0.dist-info/sboms/calc-flow-python.cyclonedx.json +10081 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: calc-flow-python
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Requires-Dist: pydantic>=2.12.0,<3
|
|
5
|
+
Requires-Dist: pyarrow>=24.0.0,<25
|
|
6
|
+
Requires-Dist: jax>=0.4 ; extra == 'array'
|
|
7
|
+
Requires-Dist: numpy>=2.0.0 ; extra == 'array'
|
|
8
|
+
Requires-Dist: ta-lib==0.7.1 ; extra == 'benchmark'
|
|
9
|
+
Requires-Dist: datafusion==54.0.0 ; extra == 'benchmark'
|
|
10
|
+
Requires-Dist: jax>=0.4 ; extra == 'benchmark'
|
|
11
|
+
Requires-Dist: numpy>=2.0.0 ; extra == 'benchmark'
|
|
12
|
+
Requires-Dist: polars>=1.32,<2 ; extra == 'benchmark'
|
|
13
|
+
Requires-Dist: psutil>=6.1 ; extra == 'benchmark'
|
|
14
|
+
Requires-Dist: py-cpuinfo>=9 ; extra == 'benchmark'
|
|
15
|
+
Requires-Dist: pytest>=8 ; extra == 'benchmark'
|
|
16
|
+
Requires-Dist: pytest-benchmark>=5.2 ; extra == 'benchmark'
|
|
17
|
+
Requires-Dist: hypothesis>=6.100 ; extra == 'dev'
|
|
18
|
+
Requires-Dist: jax>=0.4 ; extra == 'dev'
|
|
19
|
+
Requires-Dist: maturin>=1.14.1,<2.0 ; extra == 'dev'
|
|
20
|
+
Requires-Dist: numpy>=2.0.0 ; extra == 'dev'
|
|
21
|
+
Requires-Dist: psutil>=6.1 ; extra == 'dev'
|
|
22
|
+
Requires-Dist: py-cpuinfo>=9 ; extra == 'dev'
|
|
23
|
+
Requires-Dist: pytest>=8 ; extra == 'dev'
|
|
24
|
+
Requires-Dist: pytest-cov>=7.1 ; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest-xdist>=3.6 ; extra == 'dev'
|
|
26
|
+
Requires-Dist: ruff==0.16.0 ; extra == 'dev'
|
|
27
|
+
Requires-Dist: jax>=0.4 ; extra == 'jax'
|
|
28
|
+
Requires-Dist: numpy>=2.0.0 ; extra == 'numpy'
|
|
29
|
+
Provides-Extra: array
|
|
30
|
+
Provides-Extra: benchmark
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Provides-Extra: jax
|
|
33
|
+
Provides-Extra: numpy
|
|
34
|
+
License-File: LICENSE
|
|
35
|
+
Summary: Rust-native DataFusion batch and streaming calculation pipelines
|
|
36
|
+
License-Expression: Apache-2.0
|
|
37
|
+
Requires-Python: >=3.13
|
|
38
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
39
|
+
Project-URL: Repository, https://github.com/wegamekinglc/calc-flow
|
|
40
|
+
|
|
41
|
+
# Calc Flow
|
|
42
|
+
|
|
43
|
+
[](https://github.com/wegamekinglc/calc-flow/actions/workflows/ci-linux.yml)
|
|
44
|
+
[](https://github.com/wegamekinglc/calc-flow/actions/workflows/ci-windows.yml)
|
|
45
|
+
[](https://coveralls.io/github/wegamekinglc/calc-flow?branch=main)
|
|
46
|
+
|
|
47
|
+
Calc Flow 4.0 is a Rust-native calculation engine for immutable Arrow
|
|
48
|
+
micro-batches and stateful streams. The core crate compiles typed calculation
|
|
49
|
+
graphs, runs every table expression and query with Apache DataFusion, and owns
|
|
50
|
+
checkpoint/recovery semantics. The Python package is a PyO3 binding to that
|
|
51
|
+
engine; it is not a second implementation. Calc Flow Studio remains a separate
|
|
52
|
+
local FastAPI and React application.
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
Python 3.13 or newer:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uv add calc-flow-python
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Optional array providers:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
uv add "calc-flow-python[numpy]"
|
|
66
|
+
uv add "calc-flow-python[jax]"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Rust:
|
|
70
|
+
|
|
71
|
+
```toml
|
|
72
|
+
[dependencies]
|
|
73
|
+
calc-flow = "4.0.0"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Python quickstart
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from datetime import UTC, datetime, timedelta
|
|
80
|
+
|
|
81
|
+
import pyarrow as pa
|
|
82
|
+
|
|
83
|
+
from calc_flow import Batch, ExecutionOptions, PipelineBuilder
|
|
84
|
+
|
|
85
|
+
batch = Batch.from_pyarrow(pa.table({"a": [1, 3], "b": [2, 4]}))
|
|
86
|
+
plan = (
|
|
87
|
+
PipelineBuilder("totals").expression("calculate", "total = a + b").compile_batch()
|
|
88
|
+
)
|
|
89
|
+
result = plan.execute(
|
|
90
|
+
{"input": batch},
|
|
91
|
+
options=ExecutionOptions(
|
|
92
|
+
settings={"request": {"source": "readme"}},
|
|
93
|
+
deadline=datetime.now(UTC) + timedelta(seconds=30),
|
|
94
|
+
),
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
assert result.outputs["output"].to_pyarrow()["total"].to_pylist() == [3, 7]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`PipelineBuilder` is functional: every method returns a new builder and leaves
|
|
101
|
+
its input unchanged. Unconnected input ports become graph inputs; unconnected
|
|
102
|
+
output ports become graph outputs. Use `execute_async()` inside an event loop.
|
|
103
|
+
Both execution forms accept keyword-only, frozen `ExecutionOptions` carrying
|
|
104
|
+
deep-copied strict-JSON settings and an optional timezone-aware deadline that
|
|
105
|
+
is normalized to UTC. Settings may be nested mappings/lists; `settings=None`
|
|
106
|
+
means empty settings.
|
|
107
|
+
|
|
108
|
+
See [the Python API guide](docs/python-api.md) and the executable
|
|
109
|
+
[examples](examples/README.md) for SQL, Python scalar UDFs, continuous
|
|
110
|
+
execution and recovery, asyncio, and NumPy/JAX.
|
|
111
|
+
The [symbolic workflow guide](docs/symbolic-workflows.md) covers composed
|
|
112
|
+
financial features, checkpoint recovery, static matrices, bounded stream
|
|
113
|
+
joins, capability errors, Studio inspection, and performance output.
|
|
114
|
+
|
|
115
|
+
## Rust quickstart
|
|
116
|
+
|
|
117
|
+
The Rust crate exposes the native data, operator, graph, runtime, project, and
|
|
118
|
+
checkpoint types directly. A table `Batch` contains one or more Arrow
|
|
119
|
+
`RecordBatch` values plus immutable metadata. Build a graph with
|
|
120
|
+
`PipelineBuilder`, compile it against a `UdfRegistrySnapshot`, then await
|
|
121
|
+
`BatchExecutionPlan::execute`. The canonical first example is
|
|
122
|
+
[`crates/calc-flow/examples/expression_pipeline.rs`](crates/calc-flow/examples/expression_pipeline.rs),
|
|
123
|
+
a true twin of the Python quickstart:
|
|
124
|
+
|
|
125
|
+
```rust
|
|
126
|
+
use std::{collections::BTreeMap, sync::Arc};
|
|
127
|
+
|
|
128
|
+
use calc_flow::{
|
|
129
|
+
Batch, BatchMetadata, ExecutionOptions, ExpressionOperator, PipelineBuilder, UdfRegistry,
|
|
130
|
+
};
|
|
131
|
+
use datafusion::arrow::{array::Int64Array, record_batch::RecordBatch};
|
|
132
|
+
|
|
133
|
+
#[tokio::main]
|
|
134
|
+
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
135
|
+
let plan = PipelineBuilder::new("totals")?
|
|
136
|
+
.add_node(
|
|
137
|
+
"calculate",
|
|
138
|
+
Box::new(ExpressionOperator::new(
|
|
139
|
+
"calculate",
|
|
140
|
+
"total = a + b",
|
|
141
|
+
Vec::new(),
|
|
142
|
+
None,
|
|
143
|
+
Vec::new(),
|
|
144
|
+
)?),
|
|
145
|
+
)?
|
|
146
|
+
.compile_batch(&UdfRegistry::new().snapshot())?;
|
|
147
|
+
let input = RecordBatch::try_from_iter(vec![
|
|
148
|
+
(
|
|
149
|
+
"a",
|
|
150
|
+
Arc::new(Int64Array::from(vec![1, 3])) as Arc<dyn datafusion::arrow::array::Array>,
|
|
151
|
+
),
|
|
152
|
+
("b", Arc::new(Int64Array::from(vec![2, 4])) as _),
|
|
153
|
+
])?;
|
|
154
|
+
let result = plan
|
|
155
|
+
.execute(
|
|
156
|
+
BTreeMap::from([(
|
|
157
|
+
"input".into(),
|
|
158
|
+
Batch::table(vec![input], BatchMetadata::default())?,
|
|
159
|
+
)]),
|
|
160
|
+
ExecutionOptions::default(),
|
|
161
|
+
)
|
|
162
|
+
.await?;
|
|
163
|
+
let output = result.outputs["output"].table_payload()?;
|
|
164
|
+
let totals = output.batches()[0]
|
|
165
|
+
.column_by_name("total")
|
|
166
|
+
.expect("expression output contains total")
|
|
167
|
+
.as_any()
|
|
168
|
+
.downcast_ref::<Int64Array>()
|
|
169
|
+
.expect("total is an Int64 column");
|
|
170
|
+
|
|
171
|
+
assert_eq!(totals.values(), &[3, 7]);
|
|
172
|
+
println!("calculated totals: {totals:?}");
|
|
173
|
+
Ok(())
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Run the checked examples:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
cargo run -p calc-flow --example expression_pipeline
|
|
181
|
+
cargo run -p calc-flow --example sql_join
|
|
182
|
+
cargo run -p calc-flow --example continuous_runtime
|
|
183
|
+
cargo run -p calc-flow --example windowed_streaming
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
See [the Rust API guide](docs/rust-api.md) for paired source examples and links
|
|
187
|
+
to the public types, or the [Rust examples index](crates/calc-flow/examples/README.md).
|
|
188
|
+
|
|
189
|
+
## Architecture
|
|
190
|
+
|
|
191
|
+
```text
|
|
192
|
+
crates/calc-flow (Rust core: Batch, graph compiler, DataFusion, runners, stores)
|
|
193
|
+
├─ crates/calc-flow-connectors (trusted transport implementations)
|
|
194
|
+
└─ crates/calc-flow-python (PyO3 _native binding + registered connectors)
|
|
195
|
+
└─ python/calc_flow (pure-Python public API + functional adapters)
|
|
196
|
+
└─ web-ui/backend (calc-flow-studio FastAPI, /api/v3, loopback only)
|
|
197
|
+
└─ web-ui/src (React + TypeScript + Vite + React Flow studio, via REST)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The native dependency edges are `crates/calc-flow ← calc-flow-connectors` and
|
|
201
|
+
`crates/calc-flow ← crates/calc-flow-python ← python/calc_flow ← web-ui/backend`.
|
|
202
|
+
The frontend talks to the backend over the `/api/v3` REST contract only; the
|
|
203
|
+
Python package is not a second engine.
|
|
204
|
+
|
|
205
|
+
| Path | Purpose |
|
|
206
|
+
|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
|
|
207
|
+
| `crates/calc-flow/` | Native core: batches, ports/operators, graph compiler, DataFusion runtime, UDF/provider registries, runners, checkpoints, project stores |
|
|
208
|
+
| `crates/calc-flow-connectors/` | Trusted file, Kafka, PostgreSQL, MySQL, ClickHouse, HTTP, and WebSocket connectors behind feature gates |
|
|
209
|
+
| `crates/calc-flow-python/` | PyO3 binding exposing the core as `calc_flow._native` |
|
|
210
|
+
| `python/calc_flow/` | Pure-Python public API, functional `PipelineBuilder`, runner/store adapters, NumPy/JAX provider registration, exception hierarchy |
|
|
211
|
+
| `web-ui/backend/` | `calc-flow-studio` FastAPI service under `/api/v3`, loopback-bound, spawned bounded continuous-job workers |
|
|
212
|
+
| `web-ui/src/` | React + TypeScript + Vite + React Flow studio; API types generated from `web-ui/openapi.json` |
|
|
213
|
+
| `schemas/` | `project-v3.schema.json`, the canonical generated project contract |
|
|
214
|
+
| `examples/` | Executable v3 Python examples |
|
|
215
|
+
| `benchmarks/` | pytest-benchmark harness (informational) |
|
|
216
|
+
|
|
217
|
+
## Data and execution model
|
|
218
|
+
|
|
219
|
+
- Table data is Arrow-backed and calculated only by DataFusion.
|
|
220
|
+
- NumPy and JAX are optional Python array providers. They are registered
|
|
221
|
+
explicitly and evaluate a bounded, allowlisted expression language.
|
|
222
|
+
- Raw tables or arrays never cross a graph or runner boundary; they are wrapped
|
|
223
|
+
in immutable `Batch` envelopes.
|
|
224
|
+
- Project documents are strict, data-only JSON/YAML with
|
|
225
|
+
`format_version: 3`. They select batch or stream runtime mode explicitly;
|
|
226
|
+
stream documents reference registered connectors and named secrets without
|
|
227
|
+
embedding credentials, callables, import paths, or table backend selectors.
|
|
228
|
+
- Table and mixed graph runs own one run-scoped DataFusion session. External-only
|
|
229
|
+
NumPy/JAX runs own no DataFusion configuration, UDF state, or runtime and
|
|
230
|
+
return an empty DataFusion metrics list.
|
|
231
|
+
- Every graph run returns named outputs, per-node row counts/timings, and run
|
|
232
|
+
metadata; table work additionally reports DataFusion plans and timings.
|
|
233
|
+
- Python executions accept reusable frozen `ExecutionOptions` with
|
|
234
|
+
deep-copied strict-JSON settings and a cooperative, timezone-aware deadline
|
|
235
|
+
normalized to UTC.
|
|
236
|
+
- The source-driven `StreamingRunner` consumes a `StreamExecutionPlan`, owns
|
|
237
|
+
async source/sink bindings, and returns a one-owner `StreamingJob`.
|
|
238
|
+
- Managed epoch checkpoints use `LocalStateBackend` segments and strict v3
|
|
239
|
+
`CheckpointManifest` documents. Exactly-once compatibility is proved per
|
|
240
|
+
requested output; ordinary sinks remain at least once.
|
|
241
|
+
|
|
242
|
+
The capabilities and execution model are introduced in
|
|
243
|
+
[docs/introduction.md](docs/introduction.md). The complete component and
|
|
244
|
+
lifecycle design is in [docs/design.md](docs/design.md), and the practical
|
|
245
|
+
continuous tutorial is [docs/streaming-guide.md](docs/streaming-guide.md).
|
|
246
|
+
|
|
247
|
+
## Trusted extensions
|
|
248
|
+
|
|
249
|
+
Python applications may register trusted vectorized DataFusion scalar UDFs on
|
|
250
|
+
a `Runtime`. Every registration declares provider, name, version, exact Arrow
|
|
251
|
+
input types, return type, and volatility. Graph nodes select registrations
|
|
252
|
+
explicitly with `(provider, name, version)` references. Serialized projects
|
|
253
|
+
contain references only.
|
|
254
|
+
|
|
255
|
+
Rust applications use `UdfRegistry` for native DataFusion UDFs and
|
|
256
|
+
`ProviderRegistry` for explicitly registered external operators.
|
|
257
|
+
|
|
258
|
+
## Studio
|
|
259
|
+
|
|
260
|
+
`web-ui/backend/` is the independently packaged `calc-flow-studio` FastAPI
|
|
261
|
+
service. `web-ui/` is the React, TypeScript, Vite, and React Flow client.
|
|
262
|
+
The local service:
|
|
263
|
+
|
|
264
|
+
- exposes the v3 REST API under `/api/v3`;
|
|
265
|
+
- binds only to loopback and is intentionally single-user;
|
|
266
|
+
- validates and stores v3 project documents;
|
|
267
|
+
- runs bounded continuous jobs in spawned workers;
|
|
268
|
+
- serves generated frontend assets from the Studio wheel.
|
|
269
|
+
|
|
270
|
+
Start both development processes on macOS, Linux, or WSL:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
./web-ui/scripts/start_web_ui.sh
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
On native Windows PowerShell:
|
|
277
|
+
|
|
278
|
+
```powershell
|
|
279
|
+
.\web-ui\scripts\start_web_ui.ps1
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Open `http://127.0.0.1:5173`, then stop the managed processes with the
|
|
283
|
+
matching command for your platform:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
./web-ui/scripts/stop_web_ui.sh
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
```powershell
|
|
290
|
+
.\web-ui\scripts\stop_web_ui.ps1
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Both launchers keep logs and process state under `.calc-flow-web/`.
|
|
294
|
+
|
|
295
|
+
The checked OpenAPI contract is
|
|
296
|
+
[web-ui/openapi.json](web-ui/openapi.json); generated TypeScript request and
|
|
297
|
+
response types are in `web-ui/src/api/schema.d.ts`.
|
|
298
|
+
|
|
299
|
+
## Project contracts
|
|
300
|
+
|
|
301
|
+
Calc Flow 4.0 accepts strict project-v3 documents and exposes the Studio
|
|
302
|
+
`/api/v3` surface. Read [projects and persistence](docs/projects-guide.md)
|
|
303
|
+
for validation, serialization, and reloading a graph. Historical changes are
|
|
304
|
+
recorded in [CHANGELOG.md](CHANGELOG.md).
|
|
305
|
+
|
|
306
|
+
## Development
|
|
307
|
+
|
|
308
|
+
Large Cargo and Maturin outputs should use the repository `target/` tree.
|
|
309
|
+
A typical local verification sequence is:
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
uv sync --extra dev
|
|
313
|
+
cargo fmt --all --check
|
|
314
|
+
cargo clippy --workspace --all-targets --all-features -- -D warnings
|
|
315
|
+
uv run python scripts/run_rust_tests.py
|
|
316
|
+
CALC_FLOW_CONNECTOR_CONTAINERS=1 \
|
|
317
|
+
CALC_FLOW_KAFKA_BOOTSTRAP=localhost:9092 \
|
|
318
|
+
CALC_FLOW_PG_TEST_URL=postgresql://postgres:postgres@localhost:5432/postgres \
|
|
319
|
+
CALC_FLOW_MYSQL_TEST_URL=mysql://root:calcflow-test@localhost:3306/calcflow \
|
|
320
|
+
CH_TEST_URL=http://localhost:8123 \
|
|
321
|
+
uv run python scripts/run_rust_coverage.py
|
|
322
|
+
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps
|
|
323
|
+
|
|
324
|
+
uv run maturin develop
|
|
325
|
+
JAX_PLATFORMS=cpu uv run pytest python/tests -q
|
|
326
|
+
JAX_PLATFORMS=cpu uv run python scripts/run_examples.py
|
|
327
|
+
uv run ruff check .
|
|
328
|
+
uv run ruff format --check .
|
|
329
|
+
|
|
330
|
+
cd web-ui/backend
|
|
331
|
+
uv run --project . --extra dev pytest --cov=calc_flow_studio
|
|
332
|
+
|
|
333
|
+
cd ..
|
|
334
|
+
npm ci
|
|
335
|
+
npm run sync:api
|
|
336
|
+
npm run build
|
|
337
|
+
npm test
|
|
338
|
+
npm run test:e2e
|
|
339
|
+
npm audit --omit=dev
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
Release gates also run `cargo audit`, `cargo deny --locked check`, package
|
|
343
|
+
inspectors, isolated wheel smoke tests, `cargo package`, and
|
|
344
|
+
`cargo publish --dry-run`. See [AGENTS.md](AGENTS.md) for the maintained
|
|
345
|
+
repository commands and constraints.
|
|
346
|
+
|
|
347
|
+
## Documentation
|
|
348
|
+
|
|
349
|
+
- **[Documentation index](docs/README.md)** — reading order for all published docs
|
|
350
|
+
- **[Introduction](docs/introduction.md)** — capabilities, vocabulary, and execution modes
|
|
351
|
+
- **[getting started](docs/getting-started.md)** — installation and smoke test
|
|
352
|
+
- **[Executable examples](docs/examples.md)** — verified example matrix and runner
|
|
353
|
+
- **[Batch calculations](docs/batch-guide.md)** — expressions, SQL, UDFs, and async execution
|
|
354
|
+
- **[Arrays and matrices](docs/array-guide.md)** — NumPy/JAX and static weights
|
|
355
|
+
- **[Continuous streaming](docs/streaming-guide.md)** — source-to-recovery tutorial
|
|
356
|
+
- **[Connectors](docs/connectors.md)** — transport configuration and guarantees
|
|
357
|
+
- **[Projects and persistence](docs/projects-guide.md)** — JSON/YAML and file stores
|
|
358
|
+
- **[Studio](docs/studio-guide.md)** — local editing, inspection, and job controls
|
|
359
|
+
- **[Python API](docs/python-api.md)** — Python surface and examples
|
|
360
|
+
- **[Symbolic workflows](docs/symbolic-workflows.md)** — declaration-to-Studio
|
|
361
|
+
batch, stream, recovery, static matrix, and performance workflows
|
|
362
|
+
- **[Rust API](docs/rust-api.md)** — native surface and examples
|
|
363
|
+
- **[API reference](docs/api-reference.md)** — supported surfaces at a glance
|
|
364
|
+
- **[Symbolic API](docs/symbolic-api.md)** — declarations, analysis, and compile requirements
|
|
365
|
+
- **[Design and architecture](docs/design.md)** — component ownership and execution design
|
|
366
|
+
- **[Verification](docs/verification.md)** — documentation, examples, and implementation checks
|
|
367
|
+
- **[Python release guide](docs/python-release.md)** — packaging, verification,
|
|
368
|
+
Trusted Publishers, and the PyPI procedure
|
|
369
|
+
- **[Benchmark suite](docs/benchmark-suite.md)** — complete CI tables, scale matrices,
|
|
370
|
+
external-engine comparisons and historical regression evidence
|
|
371
|
+
- **[Changelog](CHANGELOG.md)** — the single history of changes
|
|
372
|
+
|
|
373
|
+
## License
|
|
374
|
+
|
|
375
|
+
Apache-2.0 — see [LICENSE](LICENSE).
|
|
376
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
calc_flow/__init__.py,sha256=P_XRJZ4t4d8uYuQdnFouQTm4xpK3exW1d_C9D9K_wGo,4059
|
|
2
|
+
calc_flow/_native.pyd,sha256=mvysRAnFWdo86VKdztUXp0u_tm1q71wSbz_KWrFChbo,147412480
|
|
3
|
+
calc_flow/_native.pyi,sha256=av4dj4RYKw_L5nXicJ78sJzV2WshamHhxrP3zARg04s,11413
|
|
4
|
+
calc_flow/array.py,sha256=zytOlk3TkhmwFLRyDCVTJypCE9K8-PtqcIf1n546Bfk,45421
|
|
5
|
+
calc_flow/capabilities.py,sha256=2CBdHuxqlbPymR-VBGzXzX1unQbtzo1RJzaqufjXP3U,29535
|
|
6
|
+
calc_flow/config.py,sha256=lkKuKEmH41ptpXGyANvjGlxwnehwTeb6WFCCNx5v4gI,7838
|
|
7
|
+
calc_flow/errors.py,sha256=iuPOFP2zD9ZQLVo38kZ7Tb0NvYDBeXFk2MjAXTonNxY,528
|
|
8
|
+
calc_flow/join_spec.py,sha256=Kdz2_EQPkMVgefUNZxIFFopPqQNswuNm2md6o2UxkWE,5395
|
|
9
|
+
calc_flow/pipeline.py,sha256=phiV3fQG2LZbrJ_lbKwG2V9cevb2Lwk53VYN1E6pSKk,41875
|
|
10
|
+
calc_flow/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
calc_flow/runtime.py,sha256=QSJe4_uVCkb8rmTFm-X6fCcBEJme54mbIqgNe1mwBos,33238
|
|
12
|
+
calc_flow/store.py,sha256=_-FM0LtHMuyNcLb431qGjPlPEXS4bjhXVJZCR_2bgJs,4845
|
|
13
|
+
calc_flow/symbolic/__init__.py,sha256=FAnx4NlWyJhMo_GwiEzIvJTYEyV2dhdpcQfR-keZucM,1699
|
|
14
|
+
calc_flow/symbolic/_generated_rolling_kernels.py,sha256=-G2tQAzl0n9THWRB3Davmil_L3W7dtIbC5I6wATCK4U,976
|
|
15
|
+
calc_flow/symbolic/analyzer.py,sha256=r8cA6yskob_oQmezinXBBv3PXR9YP34hlvk9yBpmIFA,82892
|
|
16
|
+
calc_flow/symbolic/domains.py,sha256=RV59EIBIy0dArXFZz97FIaVmDcjT3rC42-mdzmT5p84,2303
|
|
17
|
+
calc_flow/symbolic/errors.py,sha256=CjIo6re4Or6WOIBnunN1YE-8oztORaR97uMnFir3WRc,1661
|
|
18
|
+
calc_flow/symbolic/expr.py,sha256=bQXon0N1v_klF--hIsU4q2HyQste5VJmB_7p9M5NHjI,21471
|
|
19
|
+
calc_flow/symbolic/lower/__init__.py,sha256=Q6ltOLc51HVrkeM-4JFGhFRaUCup2c9e2s0189fUVOE,1240
|
|
20
|
+
calc_flow/symbolic/lower/planners.py,sha256=E4UyWxfmNQA-uawJInp64rxh803L-_-QOTrdlrJAEDs,45333
|
|
21
|
+
calc_flow/symbolic/lower/program.py,sha256=Xd757t4rrPUnxBTApmalVBK08E5npD9kd4Xj-BpGlCk,31451
|
|
22
|
+
calc_flow/symbolic/lower/segments.py,sha256=QRD3xshXrifIVTDOTBRJfNllcYKjEA-kgRNhlEklx9M,25065
|
|
23
|
+
calc_flow/symbolic/lower/strategies.py,sha256=vuoNW-uKuFUYNaWmaRUqnn71oWHZZp4uMDboQb_C3fk,44610
|
|
24
|
+
calc_flow/symbolic/nodes.py,sha256=SfwVGrNHTnsQK1NuhOsN4JDcbbHFy19DzeWiHubyG40,18305
|
|
25
|
+
calc_flow/symbolic/ops.py,sha256=7QQPzeajuDmVDOJfXle6bR3CS9VqlG9Cpv9zmyPTg48,36690
|
|
26
|
+
calc_flow/symbolic/optimizer.py,sha256=9Z0HngoZr6C1QHH8075p4ErEwHum9t7Ill4RL9HtdKc,21005
|
|
27
|
+
calc_flow/symbolic/program.py,sha256=b-JvMRvL9s7JI0zh363OlpjE6nayvULhVpDqpsDJ7Kg,13149
|
|
28
|
+
calc_flow/symbolic/types.py,sha256=YiyXesC0blFNKanztR5UmdYdye1XGCzAsJWG_X8i2Vk,3642
|
|
29
|
+
calc_flow/symbolic/windows.py,sha256=EgzWH5i_5nUl6na6eXez4YHIEdQ1eYtv_xoSdol1658,5091
|
|
30
|
+
calc_flow/udf.py,sha256=3vsY02jdxVEuUZdisaterxF7bvYu119nBLsToh6GhJY,778
|
|
31
|
+
calc_flow_python-4.0.0.dist-info/METADATA,sha256=vGH6SdUOtKP1ZPL3XiVfsp-3_3LBbWmQzoiHANKIr6E,16762
|
|
32
|
+
calc_flow_python-4.0.0.dist-info/WHEEL,sha256=ZabH5xxlwnCjl57ftEQBbNmdiu_GwBo2USq4vbg1zTo,96
|
|
33
|
+
calc_flow_python-4.0.0.dist-info/licenses/LICENSE,sha256=Pd-b5cKP4n2tFDpdx27qJSIq0d1ok0oEcGTlbtL6QMU,11560
|
|
34
|
+
calc_flow_python-4.0.0.dist-info/sboms/calc-flow-python.cyclonedx.json,sha256=4iNHeJNSxQiMeC83Z-O3p1qV0_sIVC2bIGVHflU_2wc,342282
|
|
35
|
+
calc_flow_python-4.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|