Correctly support 1.20.5 and document 1.20.6 as a stubbed version#4
Merged
Conversation
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.
Replace 1.20.6 with 1.20.5; fix broken common() left over from the Pooch
refactor
Why
Two latent issues were hiding behind soft-skipped tests:
1.20.6is declared as a supported version but upstream ships no data forit. The PrismarineJS minecraft-data tarball publishes patch releases like
1.20.6,1.20.1,1.20.4, and1.21as stubs — directories containing onlyversion.json, because their game data is unchanged from the prior release. Soget_data_path("1.20.6")returned a directory with noitems.json/blocks.json/ etc., and 5 parametrized tests soft-skipped to hide the gap.common()was broken by the previous Pooch refactor. It still pointed atminecraft_data/data/data/— a bundled-data directory that no longer exists inthis repo — so it always raised
FileNotFoundError. Thetest_common_datatestcaught that and skipped, masking the breakage.
Changes
SUPPORTED_VERSIONS:["1.20.6", "1.21.6"]→["1.20.5", "1.21.6"].1.20.5is the nearest preceding full-data version in the 1.20 series.__init__.py: common(): now reuses the Pooch-extracted data root viaget_data_path(SUPPORTED_VERSIONS[0]). Common data is version-independent, so anysupported version's data root works.
test_common_data: removed thetry/except FileNotFoundError+pytest.skip— it now asserts on the result directly.test_get_data_path_error_message: asserts"1.20.5"instead of"1.20.6"appears in the error.
"Upstream data availability: full vs. stub versions" documenting which 1.20.x and
1.21.x versions ship full data vs. stubs.
3.20.2→3.20.3.Test impact
33 passed, 6 skipped→39 passed, 0 skipped. Five skips disappear because1.20.5actually has the data the parametrized tests expect; the sixth disappearsbecause
common()now works.Not in scope
__call__still has a# Fallback to bundled data if version not supported by Poochbranch that points at the same non-existent bundled directory. It'sunreachable in practice (any version not in
SUPPORTED_VERSIONSraisesValueErrorbefore the fallback runs in the current flow), but it's dead codefrom the same refactor. Worth a follow-up.