From d8c22031ca7398df6817c336113867ffa746eb92 Mon Sep 17 00:00:00 2001 From: ecrum19 Date: Tue, 22 Sep 2026 22:10:26 +0200 Subject: [PATCH] Test that the vendored vocabulary is actually packaged 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 --- conda-recipe/meta.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 3c888d8..385fc12 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -36,6 +36,10 @@ test: - vcf-rdfizer --help - vcf-rdfizer-rules --help - vcf-rdfizer-link list + # The vendored vocabulary is package data, not code, so no import touches + # it: a dropped package-data glob would pass every check above and only + # surface when SHACL validation runs. One file per glob in pyproject.toml. + - python -c "import importlib.resources as r; d = r.files('vcf_rdfizer_data'); assert d.joinpath('VOCABULARY_PROVENANCE.json').is_file() and d.joinpath('shacl').joinpath('vcf-4.5.shacl.ttl').is_file() and d.joinpath('ontology').joinpath('vcf-core-vocabulary.bundle.ttl').is_file()" imports: - vcf_rdfizer # The vocabulary terms, VCF-version model and lexical parsers. Importing it