-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adds Resource.hash
in datapackage.json
#665
Merged
Merged
Conversation
This file contains 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
No longer needed since we have `pyproject.toml` Resolves an error I got while trying to run the script: ```cmd >>> uv run scripts/build_datapackage.py ``` ```py Traceback (most recent call last): File "../vega-datasets/scripts/build_datapackage.py", line 60, in <module> import niquests ModuleNotFoundError: No module named 'niquests' ```
dangotbanned
commented
Jan 12, 2025
@dsmedia ah you saw this early 😉 I've still got some docs to do, and then filling out the description (this PR simplifies |
domoritz
changed the title
docs: adds
feat: adds Jan 12, 2025
Resource.hash
in datapackage.json
Resource.hash
in datapackage.json
domoritz
approved these changes
Jan 12, 2025
dangotbanned
added a commit
to vega/altair
that referenced
this pull request
Jan 13, 2025
dangotbanned
added a commit
to vega/altair
that referenced
this pull request
Jan 14, 2025
Major switch from multiple github/npm endpoints -> a single file. Was Only possible following vega/vega-datasets#665 Still need to rewrite/fill out the `Metadata` doc, then moving onto features
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.
Related
Description
This PR adds a hash for each dataset, piggybacking directly from the GitHub trees API.
More info
vega-datasets/scripts/build_datapackage.py
Lines 520 to 547 in 062ee8a
Mostly just upstreaming existing code from https://github.com/vega/altair/blob/fdffed0a15be3967c6b9513787fd40feb59c9cdc/tools/datasets/github.py#L145-L159 with some tweaks.
I think this is a broadly useful inclusion to
datapackage.json
, since we have 74 datasets that have very few revisions.I've been using this in vega/altair#3631 for caching datasets across versions - and found that as of [email protected] there have only been 115 unique hash values.
Moving this logic here will greatly simplify (vega/altair#3631), as the hash is the last bit of metadata I'm currently not able to get from
datapackage.json
.I've been planning out some revisions to get that PR over the line, this will let me remove most of (https://github.com/vega/altair/tree/fdffed0a15be3967c6b9513787fd40feb59c9cdc/tools/datasets) since I no longer need to collect any metadata from multiple endpoints