Custom-scaffold engine for data-product-forge — install, plug in any scaffold bundle (Python plugin or YAML/Jinja), generate a complete project from your contract
Project description
data-product-forge-custom-scaffold
The custom-scaffold engine for data-product-forge. Install it alongside the CLI, plug in any scaffold bundle, and generate a complete project from your contract.
pip install data-product-forge data-product-forge-custom-scaffold
This pulls data-product-forge-sdk transitively (import path: fluid_sdk). Requires Python >=3.10.
Then in any fluid contract:
extensions:
customScaffold:
libraries:
- id: ci
source: { kind: git, url: "https://github.com/example/my-bundle", ref: "v1.0" }
patterns:
- use: ci:basic
fluid generate custom-scaffold
# ✓ 3 files written, 0 failed
# README.md
# .gitlab-ci.yml
# docs/runbook.md
Deterministic, idempotent, atomic.
What this engine does
This is the runtime for data-product-forge's custom-scaffold feature:
- Discovers itself with the CLI via Python entry-points (just
pip install). - Resolves bundles from
path(local),git(clone into cache), orentrypoint(installed Python plugin). - Validates the
extensions.customScaffoldblock in your contract. - Renders each pattern through Jinja2.
- Writes the generated files atomically with path-traversal protection.
- Copies the bundle's
static/directory verbatim alongside rendered templates (for binary fixtures, sample data, pre-rendered files).
What's in the contract
extensions:
customScaffold:
libraries:
- id: ci # local alias
source:
kind: git # path | git
url: "https://github.com/example/ci-bundle"
ref: "v1.0"
subdir: "scaffold" # optional
auth: { secret_ref: GITHUB_TOKEN } # optional
patterns:
- use: ci:gitlab-ci # <library-id>:<pattern-name>
variables:
parentCiTemplateRef: "my-org/ci-templates@main"
Source kinds
| Kind | What it does | When to use |
|---|---|---|
path |
Reads a local directory. Relative paths anchor to the contract's directory. | Bundle development; private monorepos that vendor bundles. |
git |
git clone into the cache. |
Shared bundles distributed via a git repo. |
entrypoint |
Loads a Python CustomScaffold subclass registered via fluid_build.custom_scaffolds entry-point. |
Bundles that need full programmatic control (external API calls, complex conditionals). |
Auth via auth.secret_ref (env-var name, never persisted).
Note: explicit npm and pypi source kinds (auto-fetch from registry) are not in v0. For pip-installable Python plugins, use
kind: entrypointafterpip install-ing the plugin package. Git covers most YAML/Jinja distribution today. File an issue if you need direct-from-registry npm/pypi fetch.
Bundle authoring
Two paths — pick whichever fits:
A. YAML + Jinja bundle (no Python)
Drop a directory like this:
my-bundle/
├── fluid-scaffold.yaml ← manifest
├── templates/
│ ├── README.md.j2 ← Jinja templates
│ └── .gitlab-ci.yml.j2
└── static/ ← optional — copied verbatim
└── docs/
└── runbook.md
The engine's built-in TemplatedCustomScaffold reads the manifest, renders the templates, and copies static/ verbatim.
→ See docs/walkthrough/build-a-yaml-bundle.md for the step-by-step.
B. Python plugin bundle
Subclass fluid_sdk.CustomScaffold directly. Full programmatic control.
→ See the SDK walkthrough.
CLI surface
fluid generate custom-scaffold [OPTIONS]
-c, --contract PATH Path to contract.fluid.yaml (default: ./contract.fluid.yaml)
-o, --output PATH Output root (default: cwd)
--dry-run Plan only — print the file list, write nothing.
--pattern USE Restrict to specific patterns (repeatable)
--lib ID Restrict to specific library ids (repeatable)
--json Emit JSON instead of human output
Exit codes:
| Code | Meaning |
|---|---|
0 |
success |
1 |
bad CLI args / contract not found |
2 |
engine error (resolution, plan, or apply failed) |
3 |
at least one apply() action failed |
Documentation
| Doc | What's inside |
|---|---|
docs/getting-started/ |
5-min: install, run against a fixture bundle, see the output |
docs/walkthrough/build-a-yaml-bundle.md |
15-min: author your own YAML/Jinja bundle from scratch |
docs/walkthrough/from-git-bundle.md |
5-min: consume a public bundle straight from a git repo |
docs/reference/manifest-format.md |
Full fluid-scaffold.yaml reference |
License
Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file data_product_forge_custom_scaffold-0.1.0.tar.gz.
File metadata
- Download URL: data_product_forge_custom_scaffold-0.1.0.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7036afe400141a0669fce5713f35437df88addff90547e540e209f21a08a49e
|
|
| MD5 |
9cbc49be82445f8e8a59831e9d1585fd
|
|
| BLAKE2b-256 |
110f588e764a93fe1d258fa4e0feb7460e5ce4942fa23c6307e3df0af82361ac
|
Provenance
The following attestation bundles were made for data_product_forge_custom_scaffold-0.1.0.tar.gz:
Publisher:
release.yml on Agenticstiger/data-product-forge-custom-scaffold
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
data_product_forge_custom_scaffold-0.1.0.tar.gz -
Subject digest:
b7036afe400141a0669fce5713f35437df88addff90547e540e209f21a08a49e - Sigstore transparency entry: 1520265057
- Sigstore integration time:
-
Permalink:
Agenticstiger/data-product-forge-custom-scaffold@8209048fed38726b14a33de35725c1d3246ff979 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Agenticstiger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8209048fed38726b14a33de35725c1d3246ff979 -
Trigger Event:
push
-
Statement type:
File details
Details for the file data_product_forge_custom_scaffold-0.1.0-py3-none-any.whl.
File metadata
- Download URL: data_product_forge_custom_scaffold-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bfd175e42ab47e71de900757748a4b1585cf329c4b4124a780848d5ce4896b0
|
|
| MD5 |
f7b1d17f42fd000b58c2fa77a2aa6685
|
|
| BLAKE2b-256 |
96549f52626f483f614da587d99583fc17d2575c7c7cbbe0e553f0d94fc1bec5
|
Provenance
The following attestation bundles were made for data_product_forge_custom_scaffold-0.1.0-py3-none-any.whl:
Publisher:
release.yml on Agenticstiger/data-product-forge-custom-scaffold
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
data_product_forge_custom_scaffold-0.1.0-py3-none-any.whl -
Subject digest:
1bfd175e42ab47e71de900757748a4b1585cf329c4b4124a780848d5ce4896b0 - Sigstore transparency entry: 1520265311
- Sigstore integration time:
-
Permalink:
Agenticstiger/data-product-forge-custom-scaffold@8209048fed38726b14a33de35725c1d3246ff979 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Agenticstiger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8209048fed38726b14a33de35725c1d3246ff979 -
Trigger Event:
push
-
Statement type: