Skip to content

Test that the vendored vocabulary is actually packaged - #21

Merged
ecrum19 merged 1 commit into
mainfrom
conda/test-vendored-data
Sep 23, 2026
Merged

ecrum19 merged 1 commit into
mainfrom
conda/test-vendored-data

Conversation

@ecrum19

@ecrum19 ecrum19 commented Sep 22, 2026

Copy link
Copy Markdown
Owner

v3.1.0 ships the target vocabulary's SHACL shapes and ontology as setuptools package-data under vcf_rdfizer_data/. The conda recipe's tests import modules and run --help — none of which touches package data — so a glob dropped from pyproject.toml would pass every existing check and only fail when a user ran SHACL validation.

This adds one test command asserting a file per package-data glob (VOCABULARY_PROVENANCE.json, shacl/, ontology/) through importlib.resources, the same API the wrapper uses to load them.

Verified before it goes near a release

  • Passes against a wheel built from the exact v3.1.0 source archive, installed into a clean venv and run from outside the source tree so it cannot pick up the checkout by accident.
  • Fails when any one of the three files is missing — each check was tested independently, so the test is not vacuous.
  • Parses: the recipe renders through Jinja and loads as YAML, and the command round-trips byte-for-byte to the string that was tested.

The joinpath calls are single-segment. A slash-separated path works for a filesystem package on every supported Python, but this runs on the feedstock's python_min (3.10) and gates a release, and this repository's CI only exercises 3.11 — so chaining removes the question instead of relying on the answer.

Keeping the recipes in sync

The same change is on the feedstock in conda-forge/vcf-rdfizer-feedstock#7, the v3.1.0 bump, which is the release that first ships this data. scripts/RELEASING.md has the feedstock copied from this recipe, so landing it here keeps the next release from silently dropping the test.

🤖 Generated with Claude Code

v3.1.0 ships the SHACL shapes and ontology as setuptools package-data under
vcf_rdfizer_data/. The recipe's tests import modules and run --help, none of
which touches package data, so a dropped glob in pyproject.toml would pass
every existing check and only fail when a user ran SHACL validation.

The new test asserts one file per package-data glob -- provenance, shacl/,
ontology/ -- through importlib.resources, the same API the wrapper uses to
load them. It passes against a wheel built from the v3.1.0 source archive,
and each of its three checks independently fails when its file is removed.

The joinpath calls are single-segment. A slash-separated relative path works
for a filesystem package on every supported Python, but this test gates a
release, and chaining removes the question rather than relying on it.

The feedstock recipe carries the identical change, so the two stay in sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ecrum19
ecrum19 merged commit a072b95 into main Sep 23, 2026
24 checks passed
@ecrum19
ecrum19 deleted the conda/test-vendored-data branch September 24, 2026 19:00
@ecrum19 ecrum19 mentioned this pull request Sep 25, 2026
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.

2 participants