Repository navigation
test: add offline tests for the JSON-LD parsers in download.py - #118
Open
Partha-Shankar wants to merge 1 commit into
Open
Partha-Shankar wants to merge 1 commit into
Partha-Shankar wants to merge 1 commit into
Conversation
Cover _get_file_download_urls_from_artifact_jsonld and _get_databus_artifacts_of_group: Part-only file extraction, skipped malformed nodes, single vs list artifacts, version URIs dropped, and the ValueError for an unexpected type.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 52 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch has not been deployed
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.
Pull Request
Description
Adds offline unit tests for the two JSON-LD parsers in
databusclient/api/download.pythat no test reached so far:_get_file_download_urls_from_artifact_jsonld: returns thefileofPartnodes only, in order; skipsPartnodes whosefileis missing or not a string; returns[]when there is no@graph._get_databus_artifacts_of_group: keeps artifact URIs and drops version URIs; accepts a single object as well as a list; skips entries without an@id; returns[]whendatabus:hasArtifactis missing; raisesValueErrorfor an unexpected type.Tests only (new file
tests/test_download_jsonld_parsers.py), no source change, in the same style as #106. With these tests both functions are fully covered.Related Issues
None.
Type of change
Checklist:
pytest- all tests passed (286 passed, 3 skipped; Windows, Python 3.11, installed with pip instead of Poetry)ruff check- no linting errors (ruff 0.5.7)