cf-pipeline-engine 0.1.0__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 (63) hide show
  1. cf_pipeline_engine-0.1.0/CMakeLists.txt +140 -0
  2. cf_pipeline_engine-0.1.0/PKG-INFO +111 -0
  3. cf_pipeline_engine-0.1.0/README.md +90 -0
  4. cf_pipeline_engine-0.1.0/cf-package.yaml +154 -0
  5. cf_pipeline_engine-0.1.0/cf_pipeline_engine/__init__.py +45 -0
  6. cf_pipeline_engine-0.1.0/examples/invocations/opcua_fifo_avg.endpoint_4840.invocation.jsonld +22 -0
  7. cf_pipeline_engine-0.1.0/examples/invocations/opcua_fifo_avg.endpoint_4841.invocation.jsonld +22 -0
  8. cf_pipeline_engine-0.1.0/examples/omp_reduction_parallel.jsonld +38 -0
  9. cf_pipeline_engine-0.1.0/examples/opcua_fifo_avg_to_duckdb_parquet_triggered.jsonld +855 -0
  10. cf_pipeline_engine-0.1.0/examples/opcua_temp_fifo_avg_to_duckdb_parquet_triggered.jsonld +470 -0
  11. cf_pipeline_engine-0.1.0/include/cf_datacube.h +21 -0
  12. cf_pipeline_engine-0.1.0/include/cf_plugin_table.h +45 -0
  13. cf_pipeline_engine-0.1.0/include/cf_step_abi.h +248 -0
  14. cf_pipeline_engine-0.1.0/include/cf_step_utils.h +791 -0
  15. cf_pipeline_engine-0.1.0/pyproject.toml +45 -0
  16. cf_pipeline_engine-0.1.0/src/common/sha256.cpp +186 -0
  17. cf_pipeline_engine-0.1.0/src/common/sha256.h +15 -0
  18. cf_pipeline_engine-0.1.0/src/common/type_registry.cc +320 -0
  19. cf_pipeline_engine-0.1.0/src/common/type_registry.h +48 -0
  20. cf_pipeline_engine-0.1.0/src/compiler/jsonld_loader.cpp +436 -0
  21. cf_pipeline_engine-0.1.0/src/compiler/jsonld_loader.h +75 -0
  22. cf_pipeline_engine-0.1.0/src/compiler/pipeline_parser.cpp +324 -0
  23. cf_pipeline_engine-0.1.0/src/compiler/pipeline_parser.h +36 -0
  24. cf_pipeline_engine-0.1.0/src/compiler/plan_builder.cpp +382 -0
  25. cf_pipeline_engine-0.1.0/src/compiler/plan_builder.h +29 -0
  26. cf_pipeline_engine-0.1.0/src/compiler/signature.cpp +89 -0
  27. cf_pipeline_engine-0.1.0/src/compiler/signature.h +24 -0
  28. cf_pipeline_engine-0.1.0/src/main.cpp +254 -0
  29. cf_pipeline_engine-0.1.0/src/plugin_loader/plugin_loader.cpp +218 -0
  30. cf_pipeline_engine-0.1.0/src/plugin_loader/plugin_loader.h +41 -0
  31. cf_pipeline_engine-0.1.0/src/runtime/concurrency_controller.cpp +494 -0
  32. cf_pipeline_engine-0.1.0/src/runtime/concurrency_controller.h +83 -0
  33. cf_pipeline_engine-0.1.0/src/runtime/datacube.h +28 -0
  34. cf_pipeline_engine-0.1.0/src/runtime/execution_plan.h +48 -0
  35. cf_pipeline_engine-0.1.0/src/scheduler/scheduler.cpp +405 -0
  36. cf_pipeline_engine-0.1.0/src/scheduler/scheduler.h +21 -0
  37. cf_pipeline_engine-0.1.0/src/scheduler/thread_pool.cpp +64 -0
  38. cf_pipeline_engine-0.1.0/src/scheduler/thread_pool.h +35 -0
  39. cf_pipeline_engine-0.1.0/tests/Release/cf_pipeline_v2_test_plugin.dll +0 -0
  40. cf_pipeline_engine-0.1.0/tests/Release/cf_pipeline_v2_test_plugin.exp +0 -0
  41. cf_pipeline_engine-0.1.0/tests/Release/cf_pipeline_v2_test_plugin.lib +0 -0
  42. cf_pipeline_engine-0.1.0/tests/pipeline_basic_io_inline.jsonld +44 -0
  43. cf_pipeline_engine-0.1.0/tests/pipeline_budget_aware_hints.jsonld +30 -0
  44. cf_pipeline_engine-0.1.0/tests/pipeline_budget_deterministic.jsonld +17 -0
  45. cf_pipeline_engine-0.1.0/tests/pipeline_budget_weighted.jsonld +26 -0
  46. cf_pipeline_engine-0.1.0/tests/pipeline_edges.jsonld +26 -0
  47. cf_pipeline_engine-0.1.0/tests/pipeline_invalid.jsonld +15 -0
  48. cf_pipeline_engine-0.1.0/tests/pipeline_json_scalar_to_double.jsonld +58 -0
  49. cf_pipeline_engine-0.1.0/tests/pipeline_json_scalar_to_double_execute.jsonld +68 -0
  50. cf_pipeline_engine-0.1.0/tests/pipeline_json_to_double_mismatch.jsonld +42 -0
  51. cf_pipeline_engine-0.1.0/tests/pipeline_levels.jsonld +38 -0
  52. cf_pipeline_engine-0.1.0/tests/pipeline_mismatch.jsonld +16 -0
  53. cf_pipeline_engine-0.1.0/tests/pipeline_parallel.jsonld +23 -0
  54. cf_pipeline_engine-0.1.0/tests/pipeline_type_mismatch.jsonld +30 -0
  55. cf_pipeline_engine-0.1.0/tests/test_install_surface.py +40 -0
  56. cf_pipeline_engine-0.1.0/tests/test_main.cpp +749 -0
  57. cf_pipeline_engine-0.1.0/tests/test_opcua_fifo_avg_datahive_integration.py +313 -0
  58. cf_pipeline_engine-0.1.0/tests/test_plugin.cpp +183 -0
  59. cf_pipeline_engine-0.1.0/tests/test_steps.jsonld +107 -0
  60. cf_pipeline_engine-0.1.0/tests/test_steps_invalid_type.jsonld +27 -0
  61. cf_pipeline_engine-0.1.0/tests/test_steps_mismatch.jsonld +30 -0
  62. cf_pipeline_engine-0.1.0/tools/bench_parallelism.py +122 -0
  63. cf_pipeline_engine-0.1.0/tools/cf_siggen_main.cpp +204 -0
@@ -0,0 +1,140 @@
1
+ cmake_minimum_required(VERSION 3.20)
2
+ project(cf_pipeline_engine LANGUAGES CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
+ set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
7
+
8
+ find_package(Python3 REQUIRED COMPONENTS Interpreter)
9
+
10
+ execute_process(
11
+ COMMAND ${Python3_EXECUTABLE} -c "from pathlib import Path; import cf_ontology.datatypes_mapping as m; print(Path(m.__file__).resolve().with_name('type_registry.v0.json'))"
12
+ OUTPUT_VARIABLE TYPE_REGISTRY_V0_SOURCE_PATH
13
+ OUTPUT_STRIP_TRAILING_WHITESPACE
14
+ )
15
+
16
+ include(FetchContent)
17
+ FetchContent_Declare(
18
+ nlohmann_json
19
+ GIT_REPOSITORY https://github.com/nlohmann/json.git
20
+ GIT_TAG v3.11.2
21
+ )
22
+ FetchContent_MakeAvailable(nlohmann_json)
23
+
24
+ add_library(cf_pipeline_v2_utils STATIC
25
+ src/common/sha256.cpp
26
+ src/common/type_registry.cc
27
+ src/compiler/jsonld_loader.cpp
28
+ src/compiler/signature.cpp
29
+ )
30
+
31
+ target_include_directories(cf_pipeline_v2_utils PUBLIC
32
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
33
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
34
+ )
35
+
36
+ set(TYPE_REGISTRY_V0_FILENAME "type_registry.v0.json")
37
+
38
+ if (TYPE_REGISTRY_V0_SOURCE_PATH STREQUAL "" OR NOT EXISTS "${TYPE_REGISTRY_V0_SOURCE_PATH}")
39
+ message(FATAL_ERROR "cf_ontology type_registry.v0.json not found in '${TYPE_REGISTRY_V0_SOURCE_PATH}'. Reinstall cf-ontology.")
40
+ endif()
41
+
42
+ file(TO_CMAKE_PATH "${TYPE_REGISTRY_V0_SOURCE_PATH}" TYPE_REGISTRY_V0_SOURCE_PATH)
43
+
44
+ target_compile_definitions(cf_pipeline_v2_utils PRIVATE
45
+ CF_TYPE_REGISTRY_V0_PATH="${TYPE_REGISTRY_V0_SOURCE_PATH}"
46
+ CF_TYPE_REGISTRY_V0_FILENAME="${TYPE_REGISTRY_V0_FILENAME}"
47
+ )
48
+
49
+ target_link_libraries(cf_pipeline_v2_utils PUBLIC nlohmann_json::nlohmann_json)
50
+
51
+ add_executable(cf_siggen tools/cf_siggen_main.cpp)
52
+ target_include_directories(cf_siggen PRIVATE
53
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
54
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
55
+ )
56
+ target_link_libraries(cf_siggen PRIVATE cf_pipeline_v2_utils)
57
+
58
+ set(GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated)
59
+ file(MAKE_DIRECTORY ${GENERATED_DIR})
60
+
61
+ add_custom_command(
62
+ OUTPUT ${GENERATED_DIR}/cf_test_signature_hashes.h
63
+ COMMAND ${Python3_EXECUTABLE} -m cogniflow_pipeline_sdk.siggen
64
+ --steps ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_steps.jsonld
65
+ --out ${GENERATED_DIR}/cf_test_signature_hashes.h
66
+ --scratch
67
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_steps.jsonld
68
+ COMMENT "Generating test signature hashes"
69
+ )
70
+
71
+ add_library(cf_pipeline_v2_core STATIC
72
+ src/compiler/pipeline_parser.cpp
73
+ src/compiler/plan_builder.cpp
74
+ src/plugin_loader/plugin_loader.cpp
75
+ src/runtime/concurrency_controller.cpp
76
+ src/scheduler/thread_pool.cpp
77
+ src/scheduler/scheduler.cpp
78
+ )
79
+
80
+ target_include_directories(cf_pipeline_v2_core PUBLIC
81
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
82
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
83
+ )
84
+
85
+ target_link_libraries(cf_pipeline_v2_core PUBLIC cf_pipeline_v2_utils)
86
+
87
+ if(UNIX AND NOT APPLE)
88
+ target_link_libraries(cf_pipeline_v2_core PUBLIC dl)
89
+ endif()
90
+
91
+ add_executable(cf_pipeline_v2 src/main.cpp)
92
+
93
+ target_link_libraries(cf_pipeline_v2 PRIVATE cf_pipeline_v2_core)
94
+
95
+ add_custom_command(TARGET cf_pipeline_v2 POST_BUILD
96
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
97
+ ${TYPE_REGISTRY_V0_SOURCE_PATH}
98
+ $<TARGET_FILE_DIR:cf_pipeline_v2>/${TYPE_REGISTRY_V0_FILENAME}
99
+ )
100
+
101
+ # Tests
102
+ add_library(cf_pipeline_v2_test_plugin SHARED
103
+ ${CMAKE_CURRENT_SOURCE_DIR}/tests/test_plugin.cpp
104
+ ${GENERATED_DIR}/cf_test_signature_hashes.h
105
+ )
106
+
107
+ target_include_directories(cf_pipeline_v2_test_plugin PUBLIC
108
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
109
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
110
+ ${GENERATED_DIR}
111
+ )
112
+
113
+ target_link_libraries(cf_pipeline_v2_test_plugin PUBLIC cf_pipeline_v2_utils)
114
+ target_compile_definitions(cf_pipeline_v2_test_plugin PRIVATE CF_STEP_ABI_EXPORTS)
115
+
116
+ set_target_properties(cf_pipeline_v2_test_plugin PROPERTIES
117
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests
118
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests
119
+ ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests
120
+ )
121
+
122
+ add_executable(cf_pipeline_v2_tests tests/test_main.cpp)
123
+
124
+ target_include_directories(cf_pipeline_v2_tests PRIVATE
125
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
126
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
127
+ )
128
+
129
+ target_link_libraries(cf_pipeline_v2_tests PRIVATE cf_pipeline_v2_core)
130
+
131
+ add_custom_command(TARGET cf_pipeline_v2_tests POST_BUILD
132
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
133
+ ${TYPE_REGISTRY_V0_SOURCE_PATH}
134
+ $<TARGET_FILE_DIR:cf_pipeline_v2_tests>/${TYPE_REGISTRY_V0_FILENAME}
135
+ )
136
+
137
+ install(TARGETS cf_siggen RUNTIME DESTINATION bin)
138
+ install(TARGETS cf_pipeline_v2 RUNTIME DESTINATION bin)
139
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION include)
140
+ install(FILES ${TYPE_REGISTRY_V0_SOURCE_PATH} DESTINATION bin)
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.2
2
+ Name: cf-pipeline-engine
3
+ Version: 0.1.0
4
+ Summary: Cogniflow pipeline engine (C++ core) with a thin Python package wrapper.
5
+ Keywords: cogniflow,pipeline,engine,cpp
6
+ Author-Email: ODEA Project <info@odea-project.org>
7
+ License: Apache-2.0
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: C++
17
+ Requires-Python: >=3.10
18
+ Provides-Extra: test
19
+ Requires-Dist: pytest>=8.0; extra == "test"
20
+ Description-Content-Type: text/markdown
21
+
22
+ # cf-pipeline-engine
23
+
24
+ The Cogniflow pipeline engine implemented in C++ (compiler, scheduler, runtime).
25
+
26
+ This folder is structured as a Python package for consistency with the other
27
+ `cf_*` components, even though the core implementation is native C++ and built
28
+ via CMake.
29
+
30
+ ## Build (CMake)
31
+
32
+ ```bash
33
+ cmake -S . -B build
34
+ cmake --build build
35
+ ```
36
+
37
+ ## Python package wrapper
38
+
39
+ The Python package is intentionally thin and provides access to the packaged
40
+ native engine assets:
41
+
42
+ - `cf_pipeline_engine.cf_pipeline_v2_path()`
43
+ - `cf_pipeline_engine.cf_siggen_path()`
44
+ - `cf_pipeline_engine.cf_engine_include_path()`
45
+ - `cf_pipeline_engine.cf_type_registry_path()`
46
+
47
+ Published distribution name:
48
+
49
+ ```bash
50
+ pip install cf-pipeline-engine
51
+ ```
52
+
53
+ The published wheel installs:
54
+
55
+ - `bin/cf_pipeline_v2(.exe)`
56
+ - `bin/cf_siggen(.exe)`
57
+ - `bin/type_registry.v0.json`
58
+ - `include/*.h`
59
+
60
+ ## Publishing
61
+
62
+ `cf_pipeline_engine` is published with the dedicated Windows workflow:
63
+
64
+ - Workflow: `.github/workflows/cf_pipeline_engine_windows_publish.yml`
65
+ - Package directory: `sandcastle/cf_pipeline/cf_pipeline_engine`
66
+ - PyPI tag: `cf-pipeline-engine-v<version>`
67
+ - TestPyPI tag: `cf-pipeline-engine-v<version>-test`
68
+
69
+ Local preflight:
70
+
71
+ ```powershell
72
+ powershell -ExecutionPolicy Bypass -File scripts/mimic_windows_python_publish_workflow.ps1 `
73
+ -WorkflowFile .github/workflows/cf_pipeline_engine_windows_publish.yml `
74
+ -PackageDir sandcastle/cf_pipeline/cf_pipeline_engine `
75
+ -PythonExe py `
76
+ -PythonVersion 3.13
77
+ ```
78
+
79
+ Queue a dry-run dispatch:
80
+
81
+ ```powershell
82
+ powershell -ExecutionPolicy Bypass -File scripts/queue_windows_python_publish_workflow.ps1 `
83
+ -WorkflowFile .github/workflows/cf_pipeline_engine_windows_publish.yml `
84
+ -PackageDir sandcastle/cf_pipeline/cf_pipeline_engine `
85
+ -PublishTarget testpypi `
86
+ -Ref main `
87
+ -RequireLocalPass `
88
+ -DryRun
89
+ ```
90
+
91
+ ## OPC UA Demo Pipeline Sink
92
+
93
+ The existing demo pipeline
94
+ `examples/opcua_fifo_avg_to_duckdb_parquet_triggered.jsonld` now uses
95
+ `cfsink:DataHiveParquetSinkStep` from `cf_basic_sinks`.
96
+
97
+ The sink writes through the C++ gatekeeper library `cf_datahive_cpp`,
98
+ producing one committed data hive run with 20 rows (`cycle_id` 0..19) and no
99
+ `archive.jsonl`.
100
+
101
+ Run the one-click demo:
102
+
103
+ ```powershell
104
+ .\scripts\fresh_install.ps1 -Clean -RunDemo
105
+ ```
106
+
107
+ Expected output layout after one demo session:
108
+
109
+ - `workspace/<data_hive>/opcua_fifo_avg/latest.txt`
110
+ - `workspace/<data_hive>/opcua_fifo_avg/runs/<run_id>/manifest.json`
111
+ - `workspace/<data_hive>/opcua_fifo_avg/runs/<run_id>/tables/measurements/part-*.parquet`
@@ -0,0 +1,90 @@
1
+ # cf-pipeline-engine
2
+
3
+ The Cogniflow pipeline engine implemented in C++ (compiler, scheduler, runtime).
4
+
5
+ This folder is structured as a Python package for consistency with the other
6
+ `cf_*` components, even though the core implementation is native C++ and built
7
+ via CMake.
8
+
9
+ ## Build (CMake)
10
+
11
+ ```bash
12
+ cmake -S . -B build
13
+ cmake --build build
14
+ ```
15
+
16
+ ## Python package wrapper
17
+
18
+ The Python package is intentionally thin and provides access to the packaged
19
+ native engine assets:
20
+
21
+ - `cf_pipeline_engine.cf_pipeline_v2_path()`
22
+ - `cf_pipeline_engine.cf_siggen_path()`
23
+ - `cf_pipeline_engine.cf_engine_include_path()`
24
+ - `cf_pipeline_engine.cf_type_registry_path()`
25
+
26
+ Published distribution name:
27
+
28
+ ```bash
29
+ pip install cf-pipeline-engine
30
+ ```
31
+
32
+ The published wheel installs:
33
+
34
+ - `bin/cf_pipeline_v2(.exe)`
35
+ - `bin/cf_siggen(.exe)`
36
+ - `bin/type_registry.v0.json`
37
+ - `include/*.h`
38
+
39
+ ## Publishing
40
+
41
+ `cf_pipeline_engine` is published with the dedicated Windows workflow:
42
+
43
+ - Workflow: `.github/workflows/cf_pipeline_engine_windows_publish.yml`
44
+ - Package directory: `sandcastle/cf_pipeline/cf_pipeline_engine`
45
+ - PyPI tag: `cf-pipeline-engine-v<version>`
46
+ - TestPyPI tag: `cf-pipeline-engine-v<version>-test`
47
+
48
+ Local preflight:
49
+
50
+ ```powershell
51
+ powershell -ExecutionPolicy Bypass -File scripts/mimic_windows_python_publish_workflow.ps1 `
52
+ -WorkflowFile .github/workflows/cf_pipeline_engine_windows_publish.yml `
53
+ -PackageDir sandcastle/cf_pipeline/cf_pipeline_engine `
54
+ -PythonExe py `
55
+ -PythonVersion 3.13
56
+ ```
57
+
58
+ Queue a dry-run dispatch:
59
+
60
+ ```powershell
61
+ powershell -ExecutionPolicy Bypass -File scripts/queue_windows_python_publish_workflow.ps1 `
62
+ -WorkflowFile .github/workflows/cf_pipeline_engine_windows_publish.yml `
63
+ -PackageDir sandcastle/cf_pipeline/cf_pipeline_engine `
64
+ -PublishTarget testpypi `
65
+ -Ref main `
66
+ -RequireLocalPass `
67
+ -DryRun
68
+ ```
69
+
70
+ ## OPC UA Demo Pipeline Sink
71
+
72
+ The existing demo pipeline
73
+ `examples/opcua_fifo_avg_to_duckdb_parquet_triggered.jsonld` now uses
74
+ `cfsink:DataHiveParquetSinkStep` from `cf_basic_sinks`.
75
+
76
+ The sink writes through the C++ gatekeeper library `cf_datahive_cpp`,
77
+ producing one committed data hive run with 20 rows (`cycle_id` 0..19) and no
78
+ `archive.jsonl`.
79
+
80
+ Run the one-click demo:
81
+
82
+ ```powershell
83
+ .\scripts\fresh_install.ps1 -Clean -RunDemo
84
+ ```
85
+
86
+ Expected output layout after one demo session:
87
+
88
+ - `workspace/<data_hive>/opcua_fifo_avg/latest.txt`
89
+ - `workspace/<data_hive>/opcua_fifo_avg/runs/<run_id>/manifest.json`
90
+ - `workspace/<data_hive>/opcua_fifo_avg/runs/<run_id>/tables/measurements/part-*.parquet`
@@ -0,0 +1,154 @@
1
+ schema_version: 1
2
+ package_id: "cf-pipeline-engine"
3
+ defaults:
4
+ owner: "cf-team"
5
+ last_reviewed: "2026-02-09"
6
+ files:
7
+ entries:
8
+ - path: CMakeLists.txt
9
+ status: current
10
+ purpose: build
11
+ - path: README.md
12
+ status: current
13
+ purpose: docs
14
+ - path: cf-package.yaml
15
+ status: current
16
+ purpose: metadata
17
+ - path: pyproject.toml
18
+ status: current
19
+ purpose: build
20
+ - path: cf_pipeline_engine/__init__.py
21
+ status: current
22
+ purpose: source
23
+ - path: examples/omp_reduction_parallel.jsonld
24
+ status: current
25
+ purpose: examples
26
+ - path: examples/opcua_fifo_avg_to_duckdb_parquet_triggered.jsonld
27
+ status: current
28
+ purpose: examples
29
+ - path: examples/opcua_temp_fifo_avg_to_duckdb_parquet_triggered.jsonld
30
+ status: current
31
+ purpose: examples
32
+ - path: include/cf_datacube.h
33
+ status: current
34
+ purpose: source
35
+ - path: include/cf_plugin_table.h
36
+ status: current
37
+ purpose: source
38
+ - path: include/cf_step_abi.h
39
+ status: current
40
+ purpose: source
41
+ - path: include/cf_step_utils.h
42
+ status: current
43
+ purpose: source
44
+ - path: src/common/sha256.cpp
45
+ status: current
46
+ purpose: source
47
+ - path: src/common/sha256.h
48
+ status: current
49
+ purpose: source
50
+ - path: src/compiler/jsonld_loader.cpp
51
+ status: current
52
+ purpose: source
53
+ - path: src/compiler/jsonld_loader.h
54
+ status: current
55
+ purpose: source
56
+ - path: src/compiler/pipeline_parser.cpp
57
+ status: current
58
+ purpose: source
59
+ - path: src/compiler/pipeline_parser.h
60
+ status: current
61
+ purpose: source
62
+ - path: src/compiler/plan_builder.cpp
63
+ status: current
64
+ purpose: source
65
+ - path: src/compiler/plan_builder.h
66
+ status: current
67
+ purpose: source
68
+ - path: src/compiler/signature.cpp
69
+ status: current
70
+ purpose: source
71
+ - path: src/compiler/signature.h
72
+ status: current
73
+ purpose: source
74
+ - path: src/main.cpp
75
+ status: current
76
+ purpose: source
77
+ - path: src/plugin_loader/plugin_loader.cpp
78
+ status: current
79
+ purpose: source
80
+ - path: src/plugin_loader/plugin_loader.h
81
+ status: current
82
+ purpose: source
83
+ - path: src/runtime/concurrency_controller.cpp
84
+ status: current
85
+ purpose: source
86
+ - path: src/runtime/concurrency_controller.h
87
+ status: current
88
+ purpose: source
89
+ - path: src/runtime/datacube.h
90
+ status: current
91
+ purpose: source
92
+ - path: src/runtime/execution_plan.h
93
+ status: current
94
+ purpose: source
95
+ - path: src/scheduler/scheduler.cpp
96
+ status: current
97
+ purpose: source
98
+ - path: src/scheduler/scheduler.h
99
+ status: current
100
+ purpose: source
101
+ - path: src/scheduler/thread_pool.cpp
102
+ status: current
103
+ purpose: source
104
+ - path: src/scheduler/thread_pool.h
105
+ status: current
106
+ purpose: source
107
+ - path: tests/pipeline_budget_aware_hints.jsonld
108
+ status: current
109
+ purpose: tests
110
+ - path: tests/pipeline_budget_deterministic.jsonld
111
+ status: current
112
+ purpose: tests
113
+ - path: tests/pipeline_budget_weighted.jsonld
114
+ status: current
115
+ purpose: tests
116
+ - path: tests/pipeline_edges.jsonld
117
+ status: current
118
+ purpose: tests
119
+ - path: tests/pipeline_invalid.jsonld
120
+ status: current
121
+ purpose: tests
122
+ - path: tests/pipeline_levels.jsonld
123
+ status: current
124
+ purpose: tests
125
+ - path: tests/pipeline_mismatch.jsonld
126
+ status: current
127
+ purpose: tests
128
+ - path: tests/pipeline_parallel.jsonld
129
+ status: current
130
+ purpose: tests
131
+ - path: tests/test_main.cpp
132
+ status: current
133
+ purpose: tests
134
+ - path: tests/test_plugin.cpp
135
+ status: current
136
+ purpose: tests
137
+ - path: tests/test_opcua_fifo_avg_datahive_integration.py
138
+ status: current
139
+ purpose: tests
140
+ - path: tests/test_install_surface.py
141
+ status: current
142
+ purpose: tests
143
+ - path: tests/test_steps.jsonld
144
+ status: current
145
+ purpose: tests
146
+ - path: tests/test_steps_mismatch.jsonld
147
+ status: current
148
+ purpose: tests
149
+ - path: tools/bench_parallelism.py
150
+ status: current
151
+ purpose: tools
152
+ - path: tools/cf_siggen_main.cpp
153
+ status: current
154
+ purpose: tools
@@ -0,0 +1,45 @@
1
+ """Python package wrapper for the C++ Cogniflow pipeline engine."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from importlib import metadata
6
+ from pathlib import Path
7
+
8
+ __version__ = "0.1.0"
9
+
10
+
11
+ def _locate_distribution_file(*relative_candidates: str) -> Path:
12
+ distribution = metadata.distribution("cf-pipeline-engine")
13
+ files = distribution.files or []
14
+ for candidate in relative_candidates:
15
+ for entry in files:
16
+ if entry.as_posix() == candidate:
17
+ return Path(distribution.locate_file(entry)).resolve()
18
+ raise FileNotFoundError(
19
+ f"Could not locate any of {relative_candidates!r} in cf-pipeline-engine distribution files."
20
+ )
21
+
22
+
23
+ def cf_pipeline_v2_path() -> str:
24
+ return str(_locate_distribution_file("bin/cf_pipeline_v2.exe", "bin/cf_pipeline_v2"))
25
+
26
+
27
+ def cf_siggen_path() -> str:
28
+ return str(_locate_distribution_file("bin/cf_siggen.exe", "bin/cf_siggen"))
29
+
30
+
31
+ def cf_engine_include_path() -> str:
32
+ return str(_locate_distribution_file("include/cf_step_abi.h").parent)
33
+
34
+
35
+ def cf_type_registry_path() -> str:
36
+ return str(_locate_distribution_file("bin/type_registry.v0.json"))
37
+
38
+
39
+ __all__ = [
40
+ "__version__",
41
+ "cf_pipeline_v2_path",
42
+ "cf_siggen_path",
43
+ "cf_engine_include_path",
44
+ "cf_type_registry_path",
45
+ ]
@@ -0,0 +1,22 @@
1
+ {
2
+ "@context": {
3
+ "cf": "https://cogniflow.org/ns#",
4
+ "ex": "http://cogniflow.org/examples/pipeline#",
5
+ "schema": "https://schema.org/"
6
+ },
7
+ "@id": "ex:opcua_fifo_avg_invocation_endpoint_4840",
8
+ "@type": "cf:PipelineInvocation",
9
+ "cf:invokesPipeline": "ex:OpcuaFifoMeanToDuckDb",
10
+ "cf:overridesEntryPoint": {
11
+ "@type": "cf:EntryPointOverride",
12
+ "cf:targetsNode": "ex:n1",
13
+ "cf:overrideSettings": {
14
+ "@type": "schema:StructuredValue",
15
+ "schema:additionalProperty": {
16
+ "@type": "schema:PropertyValue",
17
+ "schema:propertyID": "endpoint",
18
+ "schema:value": "opc.tcp://127.0.0.1:4840/VirtualPhServer"
19
+ }
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "@context": {
3
+ "cf": "https://cogniflow.org/ns#",
4
+ "ex": "http://cogniflow.org/examples/pipeline#",
5
+ "schema": "https://schema.org/"
6
+ },
7
+ "@id": "ex:opcua_fifo_avg_invocation_endpoint_4841",
8
+ "@type": "cf:PipelineInvocation",
9
+ "cf:invokesPipeline": "ex:OpcuaFifoMeanToDuckDb",
10
+ "cf:overridesEntryPoint": {
11
+ "@type": "cf:EntryPointOverride",
12
+ "cf:targetsNode": "ex:n1",
13
+ "cf:overrideSettings": {
14
+ "@type": "schema:StructuredValue",
15
+ "schema:additionalProperty": {
16
+ "@type": "schema:PropertyValue",
17
+ "schema:propertyID": "endpoint",
18
+ "schema:value": "opc.tcp://127.0.0.1:4841/VirtualPhServer"
19
+ }
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "@context": [
3
+ "../../../cf_ontology/src/cf_ontology/ontology/cf_context.jsonld",
4
+ {
5
+ "cfbd": "http://cogniflow.org/basic-dev#"
6
+ }
7
+ ],
8
+ "@id": "https://cogniflow.org/examples/pipeline/omp_reduction_parallel",
9
+ "@type": "cf:Pipeline",
10
+ "cf:hasStepsHeader": {
11
+ "cf:stepsPath": [
12
+ "../../../cf_basic_steps/cf_basic_dev/src/cf_basic_dev/steps.jsonld"
13
+ ]
14
+ },
15
+ "cf:hasPluginsHeader": {
16
+ "cf:pluginPath": [
17
+ "../../../cf_basic_steps/cf_basic_dev/src/cf_basic_dev/bin"
18
+ ]
19
+ },
20
+ "cf:hasNode": [
21
+ {
22
+ "@id": "n1",
23
+ "@type": "cf:PipelineNode",
24
+ "cf:nodeDefinition": "cfbd:OmpReductionStep",
25
+ "cf:hasParameter": [
26
+ {"cf:parameterName": "terms", "cf:parameterValue": 5000000}
27
+ ]
28
+ },
29
+ {
30
+ "@id": "n2",
31
+ "@type": "cf:PipelineNode",
32
+ "cf:nodeDefinition": "cfbd:OmpReductionStep",
33
+ "cf:hasParameter": [
34
+ {"cf:parameterName": "terms", "cf:parameterValue": 5000000}
35
+ ]
36
+ }
37
+ ]
38
+ }