Skip to content

Add support for conversion to Google dataset search metadata#293

Closed
satra wants to merge 9 commits intomasterfrom
enh/googledataset
Closed

Add support for conversion to Google dataset search metadata#293
satra wants to merge 9 commits intomasterfrom
enh/googledataset

Conversation

@satra
Copy link
Member

@satra satra commented Mar 13, 2025

This adds a function to convert a dandiset metadata schema to Google dataset search form.

However to embed the metadata on a webpage a few additional steps need to happen:

  • expand the metadata using jsonld expand
  • compact the metadata using a new context: {"@context": "http://schema.org/"}

this would either require adding pyld (which works but hasn't seen an update in a while), or doing it in javascript.

@codecov
Copy link

codecov bot commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 95.91837% with 6 lines in your changes missing coverage. Please review.

Project coverage is 97.74%. Comparing base (782c421) to head (fdf13e1).

Files with missing lines Patch % Lines
dandischema/utils.py 93.02% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
- Coverage   97.88%   97.74%   -0.14%     
==========================================
  Files          16       17       +1     
  Lines        1983     2129     +146     
==========================================
+ Hits         1941     2081     +140     
- Misses         42       48       +6     
Flag Coverage Δ
unittests 97.74% <95.91%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

satra and others added 5 commits March 13, 2025 00:32
…ledataset

* origin/enh/googledataset:
  [pre-commit.ci] auto fixes from pre-commit.com hooks
…ledataset

* origin/enh/googledataset:
  [pre-commit.ci] auto fixes from pre-commit.com hooks
@satra
Copy link
Member Author

satra commented Mar 13, 2025

i'm going to close this in favor of simply using datacite for now. i'll send a PR to dandiarchive for that.

curl -LH "Accept: application/ld+json" https://doi.org/10.48324/dandi.000617/0.250312.0130

what they generate doesn't pass the validator fully, but for our purposes it's a better route at the moment.

@satra satra closed this Mar 13, 2025
@satra
Copy link
Member Author

satra commented Mar 13, 2025

PR submitted: dandi/dandi-archive#2212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant