Skip to main content

Cogniflow pipeline engine (C++ core) with a thin Python package wrapper.

Project description

cf-pipeline-engine

The Cogniflow pipeline engine implemented in C++ (compiler, scheduler, runtime).

This folder is structured as a Python package for consistency with the other cf_* components, even though the core implementation is native C++ and built via CMake.

Build (CMake)

cmake -S . -B build
cmake --build build

Python package wrapper

The Python package is intentionally thin and provides access to the packaged native engine assets:

  • cf_pipeline_engine.cf_pipeline_v2_path()
  • cf_pipeline_engine.cf_type_registry_path()
  • cf_pipeline_engine.resolve_cf_pipeline_v2_executable()

Published distribution name:

pip install cf-pipeline-engine

The published wheel installs:

  • bin/cf_pipeline_v2(.exe)
  • bin/type_registry.v0.json

The engine compiles natively only against cf_package_contracts. Owner providers from cf-pipeline-sdk, cf-opcua-server, and cf-datahive are resolved at runtime via the provider registry and exported contract symbols.

cfio:OpcuaReaderStep is executed by the cf_basic_io plugin and consumes the installed cf-opcua-server owner contract injected by the engine. If the owner provider needs a custom script location, set CF_OPCUA_SERVER_CMD to the absolute script or executable path.

Python CLI

The legacy standalone Python wrapper package has been retired. Its CLI surface now lives in this cf_pipeline_engine package.

Direct invocation remains policy-gated by CF_ALLOW_DIRECT_ENGINE:

CF_ALLOW_DIRECT_ENGINE=1 python -m cf_pipeline_engine.cli \
  --pipeline sandcastle/cf_pipeline/cf_pipeline_engine/examples/opcua_fifo_avg_to_duckdb_parquet_triggered.nq \
  --interval 1 \
  --duration 10

Equivalent module entrypoint:

CF_ALLOW_DIRECT_ENGINE=1 python -m cf_pipeline_engine --help

Publishing

cf_pipeline_engine is published with the dedicated Windows workflow:

  • Workflow: .github/workflows/cf_pipeline_engine_windows_publish.yml
  • Package directory: sandcastle/cf_pipeline/cf_pipeline_engine
  • PyPI tag: cf-pipeline-engine-v<version>
  • TestPyPI tag: cf-pipeline-engine-v<version>-test

Local preflight:

powershell -ExecutionPolicy Bypass -File scripts/mimic_windows_python_publish_workflow.ps1 `
  -WorkflowFile .github/workflows/cf_pipeline_engine_windows_publish.yml `
  -PackageDir sandcastle/cf_pipeline/cf_pipeline_engine `
  -PythonExe py `
  -PythonVersion 3.14

Queue a dry-run dispatch:

powershell -ExecutionPolicy Bypass -File scripts/queue_windows_python_publish_workflow.ps1 `
  -WorkflowFile .github/workflows/cf_pipeline_engine_windows_publish.yml `
  -PackageDir sandcastle/cf_pipeline/cf_pipeline_engine `
  -PublishTarget testpypi `
  -Ref main `
  -RequireLocalPass `
  -DryRun

OPC UA Demo Pipeline Sink

Packaged demo resources are owned by cf_setup. The repo keeps source examples under examples/ for development and test use.

The existing demo pipeline examples/opcua_fifo_avg_to_duckdb_parquet_triggered.nq uses plugin-executed cfio:OpcuaReaderStep and cfsink:DataHiveParquetSinkStep.

cf_basic_io consumes the injected OPC UA owner contract exported by cf-opcua-server, and cf_basic_sinks consumes the injected Data Hive sink contract exported by cf-datahive, producing one committed data hive run with 20 rows (cycle_id 0..19).

Run the one-click demo:

cf install --dev --clean --run-demo --show-details

Expected Data Hive evidence after one demo session, owned by the DataHive contracts:

  • workspace/<data_hive>/opcua_fifo_avg/latest.txt
  • workspace/<data_hive>/opcua_fifo_avg/latest_session.txt
  • workspace/<data_hive>/opcua_fifo_avg/<yyyy>/<mm>/<dd>/<session_id>/runs/<run_id>/manifest.json
  • workspace/<data_hive>/opcua_fifo_avg/<yyyy>/<mm>/<dd>/<session_id>/tables/measurements/run_id=<run_id>/part-*.parquet

Consumers should inspect this output through DataHiveRunsContractV1 rather than reimplementing path discovery in package code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cf_pipeline_engine-0.2.9.tar.gz (83.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cf_pipeline_engine-0.2.9-cp314-cp314-win_amd64.whl (297.3 kB view details)

Uploaded CPython 3.14Windows x86-64

File details

Details for the file cf_pipeline_engine-0.2.9.tar.gz.

File metadata

  • Download URL: cf_pipeline_engine-0.2.9.tar.gz
  • Upload date:
  • Size: 83.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for cf_pipeline_engine-0.2.9.tar.gz
Algorithm Hash digest
SHA256 e88daa876d3925588ad099ba276bf852164fd7a8d5972fc5d83947f9d2bd0223
MD5 dc4abc2f9a05395f7a017b1cc73dc5ed
BLAKE2b-256 b3ce7b343cba3f5c9fa65043e93dbbbcd61ac33bb15298cbe92e9e48da03d040

See more details on using hashes here.

File details

Details for the file cf_pipeline_engine-0.2.9-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for cf_pipeline_engine-0.2.9-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 58c8daab631a776b244a8b5a26279740cb82260f78af99898fa02a8aebf38026
MD5 0f55fe61ff3cc9487627e1bd1ec1b706
BLAKE2b-256 46b4bca5038d2832feba7150710299bdf92436dcac2ab90d97eae01da2136db7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page