test: CLARIN consumer-contract suite + main-tailored differential CI - #23
Open
jr-rk wants to merge 1 commit into
Open
test: CLARIN consumer-contract suite + main-tailored differential CI#23jr-rk wants to merge 1 commit into
jr-rk wants to merge 1 commit into
Conversation
Add characterization tests that replay how the three main-lineage consumers (dspace-import-clarin, dspace-rest-test, dspace-item-importer) actually call this library, plus a branch-differential CI job that runs the shared CLARIN contract against BOTH the dtq and main implementations. Only the HTTP transport is mocked; the real client builds URLs and parses responses. This PR is test + CI infrastructure only - no dspace_rest_client/ changes. The shared-surface fixes and dtq behaviour deltas that the tests would otherwise pin live in a separate, stacked PR, so this one stays scoped to validating main's usage surface and proposes nothing for main. Markers (pytest.ini): clarin - shared contract, must hold on both main and dtq dtq_only - existing dtq-only surface/behaviour, deselected on the main leg Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Testing infrastructure only. Adds CI + characterization tests tailor-made for
main's usage surface — how the three main-lineage consumers
(
dspace-import-clarin,dspace-rest-test,dspace-item-importer) actuallycall this library. No
dspace_rest_client/changes. Targetsdtqandproposes nothing for
main.Shared-surface fixes the tests would otherwise pin are split into a stacked PR
(
fix/clarin-shared-surface-hardening) so this one stays scoped to test/CI.What's here
test_repo_usage_contract.py: per-method andwhole-chain characterization tests, only the HTTP transport mocked (the real
client builds URLs and parses responses).
_helpers.pyCLARIN builders,pytest.inimarkers,requirements-test.txt..github/workflows/tests.yml: branch-aware triggers plus adifferential-contractjob that runs the shared CLARIN contract againstboth the
dtqand themainimplementation. The main leg checksorigin/main's client into the CI runner to test against it — read-only,nothing is written back to
main. A contract green on both is what a futuremerge would need to preserve.
Markers
clarin— shared contract, must hold on bothmainanddtq.dtq_only— existingdtq-only surface/behaviour, deselected on the main leg.Verified locally
dtqimpl): 123 pass.mainimpl): 44 pass, 3dtq_onlydeselected.