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

Add minimal dtool dataset metadata schema #4246

Merged

Conversation

jotelha
Copy link
Contributor

@jotelha jotelha commented Nov 29, 2024

I would like to create a universal JSON schema for validating metadata attached to dtool datasets (see articles https://peerj.com/articles/6562/, https://doi.org/10.1371/journal.pone.0306100, and dserver demonstrator at https://demo.dtool.dev).

I have no experience with creating schema, but I believe these changes should be a minimal starting point.

Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

@jotelha
Copy link
Contributor Author

jotelha commented Nov 29, 2024

My apologies for cluttering this PR, I opened it a little early.

I have renamed the schema files to a versioned scheme.

Now, I have somehow messed up and cannot get rid of this error

$ node ./cli.js check 
===== VALIDATE PRECONDITIONS =====
---
>> Failed to find a schema file at "src/schemas/json/dtool-dataset-metadata.json"
---
Error
    at onTestDir (file:///mnt/dat2/git/dtool/schemastore/cli.js:839:29)
    at async Promise.all (index 0)
    at async assertFileSystemIsValid (file:///mnt/dat2/git/dtool/schemastore/cli.js:831:5)
    at async Object.taskCheck (file:///mnt/dat2/git/dtool/schemastore/cli.js:564:3)
    at async file:///mnt/dat2/git/dtool/schemastore/cli.js:1560:5

anymore, which I do not quite understand, as nothing in the tree points to the initial dtool-dataset-metadata.json without version suffix anymore.

Apologies again, some help would be much appreciated. Thank you!

@github-actions github-actions bot added the cli.js gruntfile.js is updated (auto-generated by labeler action) label Dec 20, 2024
@hyperupcall
Copy link
Member

hyperupcall commented Dec 20, 2024

anymore, which I do not quite understand, as nothing in the tree points to the initial dtool-dataset-metadata.json without version suffix anymore.

@jotelha Thanks for reporting! The error came from the name of the test directory: src/test/dtool-dataset-metadata. I fixed the directory name and updated the error message so there's more information for the next person that potentially stumbles upon this

Sorry for getting to this late, feel free to let me know if I missed anything!

@hyperupcall hyperupcall merged commit 3931db8 into SchemaStore:master Dec 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli.js gruntfile.js is updated (auto-generated by labeler action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants