Skip to content
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

contentUrl for each format of a file (original proprietary vs archival) #641

Open
pdurbin opened this issue Apr 29, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@pdurbin
Copy link
Member

pdurbin commented Apr 29, 2024

For some proprietary file formats such as Excel, Stata, and SPSS, Dataverse creates non-proprietary formats (TSV and RData) of uploaded files for archival purposes. Plus a TSV version might be good enough for a researcher who doesn't have the proprietary software installed.

Our Croissant output is still a work in progress but for now I'm favoring the original, proprietary format under contentUrl like this:

{
    "@type": "cr:FileObject",
    "@id": "stata13-auto.dta",
    "name": "stata13-auto.dta",
    "encodingFormat": "application/x-stata-13",
    "md5": "7b1201ce6b469796837a835377338c5a",
    "contentSize": "6443 B",
    "contentUrl": "http://localhost:8080/api/access/datafile/6?format=original"
}

However, if I wanted to advertise that non-proprietary formats (TSV and RData) are available as well, what's the best practice in Croissant?

Would each format be another FileObject? In our UI (below), we show a single file with multiple download options but maybe from the Croissant perspective these formats would be better represented as different files? They would have different checksums and sizes, after all. 🤔

Screenshot 2024-04-29 at 4 35 26 PM

@benjelloun
Copy link
Contributor

I would lean towards representing them as separate FileObjects. If we want to preserve the connection between them, we could specify sc:encoding pointing from the original file to each of the alternative formats. Would that make sense?

@pdurbin
Copy link
Member Author

pdurbin commented May 17, 2024

@benjelloun sort of? Is there a concrete example in the examples at https://github.com/mlcommons/croissant/tree/v1.0.5/datasets/1.0 ? I looked quickly but couldn't find one.

Either way, it sounds like this could be something we add later. I think most of our users will be happy with the original file.

@benjelloun benjelloun added the enhancement New feature or request label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants