Metadata-Version: 2.2
Name: cf-pipeline-sdk
Version: 0.2.3
Summary: Cogniflow step-runtime contract provider package
Requires-Python: >=3.11
Requires-Dist: cf-package-contracts>=0.1.0
Provides-Extra: test
Requires-Dist: pytest<9.0,>=8.0; extra == "test"
Description-Content-Type: text/markdown

# cf_pipeline_sdk

`cf_pipeline_sdk` packages the native step-runtime contract provider owned by the
pipeline SDK package:

- the Python module `cogniflow_pipeline_sdk`
- the native `CfStepRuntimeContractV1` provider surface consumed by `cf_pipeline_engine`

Published distribution name:

```bash
pip install cf-pipeline-sdk
```

## Scope

The published distribution name is `cf-pipeline-sdk`.
The Python import package remains `cogniflow_pipeline_sdk`.

The engine resolves the packaged runtime provider through the provider registry
and package descriptor, not via SDK Python helper APIs.

Step build tooling, `siggen`, and validation-spec generation live in
`cf-step-tooling`.

## Validation Spec Output

`cf_step_tooling.validation.generate_validation_spec(...)` keeps the
existing normalized port fields unchanged:

- `id`
- `key`
- `types`
- `name`
- `multi` for input ports

When a step manifest port declares `cf:valueContract`, the generated port entry
now adds a `value_contract` object with additive metadata:

- `shape_kind`
- `element_types`
- `table_schema.columns[]` with `name`, `type`, and `nullable` when a table
  schema is declared

`cf:valueContract` is the only supported typed-contract source for validation
spec generation.

## Native build prerequisites

The SDK is built with `scikit-build-core` and CMake.

For Windows publish/preflight runs, use:

- CPython 3.14
- CMake on `PATH`
- a working Windows C++ toolchain compatible with that CMake installation

The CI publish workflow targets `windows-latest`.
If your local machine exposes multiple CMake/compiler combinations, keep the selected CMake and compiler toolchain consistent for the whole build.

## Publishing

`cf_pipeline_sdk` is published with the dedicated Windows workflow:

- Workflow: `.github/workflows/cf_pipeline_sdk_windows_publish.yml`
- Package directory: `sandcastle/cf_pipeline/cf_pipeline_sdk`
- PyPI tag: `cf-pipeline-sdk-v<version>`
- TestPyPI tag: `cf-pipeline-sdk-v<version>-test`

Local preflight:

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

Queue a dry-run dispatch:

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

