Skip to content

Add tap source install target derivation#30

Merged
eric-tramel merged 1 commit intocodex/epic-15-plugin-tapfrom
codex/issue-18-source-metadata
May 7, 2026
Merged

Add tap source install target derivation#30
eric-tramel merged 1 commit intocodex/epic-15-plugin-tapfrom
codex/issue-18-source-metadata

Conversation

@eric-tramel
Copy link
Copy Markdown
Contributor

What

Implements concrete source generation and validation for all [tool.ddp.tap].default-source modes in the ddp catalog tooling.

  • PyPI sources generate {"type": "pypi", "package": <package>}.
  • Git sources generate {"type": "git", "url": <repository-git-url>, "ref": <release-ref>, "subdirectory": <package.path>}.
  • Path sources generate {"type": "path", "path": <package.path>, "editable": true}.
  • Catalog consumers can now derive a structured install target from source metadata via InstallTarget and install_target_for_source_metadata.

Why

Tap catalog schema v2 needs source objects that are concrete enough for Data Designer install flows. The generated catalog also needs to reject malformed source configuration early so invalid tap metadata does not publish unusable install instructions.

Usage

For the default NVIDIA tap config, catalog output remains PyPI-only:

{
  "source": {
    "type": "pypi",
    "package": "data-designer-template"
  }
}

For an external tap configured with Git sources:

[tool.ddp.tap]
default-source = "git"
repository-git-url = "https://git.example.test/acme/dd-plugins.git"
release-ref-template = "{package}/v{version}"

A package named data-designer-example at version 0.2.0 derives this install target:

data-designer-example @ git+https://git.example.test/acme/dd-plugins.git@data-designer-example/v0.2.0#subdirectory=plugins/data-designer-example

Path sources return an install plan such as:

InstallTarget(target="plugins/data-designer-example", editable=True)

How

  • Makes repository-git-url and release-ref-template Git-source requirements instead of global tap requirements.
  • Adds reusable package path validation for generated package.path, Git subdirectory, and path path fields.
  • Keeps source generation package-scoped so all runtime plugin entries from a multi-plugin package share the same source object.
  • Adds install-target derivation for PyPI exact pins, Git PEP 508 direct refs, and editable local path plans.

Validation

  • make sync
  • uv run pytest devtools/ddp/tests/test_catalog.py devtools/ddp/tests/test_tap_config.py -q
  • uv run ruff check devtools/ddp/src/ddp/catalog.py devtools/ddp/src/ddp/tap_config.py devtools/ddp/tests/test_catalog.py devtools/ddp/tests/test_tap_config.py
  • uv run ruff format --check devtools/ddp/src/ddp/catalog.py devtools/ddp/src/ddp/tap_config.py devtools/ddp/tests/test_catalog.py devtools/ddp/tests/test_tap_config.py
  • make catalog
  • make check-catalog
  • make check

@eric-tramel eric-tramel requested a review from a team as a code owner May 7, 2026 19:47
@eric-tramel eric-tramel merged commit 6c24621 into codex/epic-15-plugin-tap May 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant