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

validator #38

Open
jcolomb opened this issue Nov 5, 2021 · 9 comments
Open

validator #38

jcolomb opened this issue Nov 5, 2021 · 9 comments
Assignees

Comments

@jcolomb
Copy link
Member

jcolomb commented Nov 5, 2021

@frederik @xldrkp should look into this.
We will get a json intermediate for the validation.

@jcolomb will write some documentation for entries when we will require specific entries (CREDIT and PID for instance).

@frederik
Copy link

Just a quick dump of knowledge of what I've found to work:

In our project (MIT) we currently use typescript-json-schema to generate a JSON schema from a TypeScript definition. [Examples are for templates but you get the idea].

I am sure this exists in other languages as well, but nodejs is generally widely supported.

Schemas could then be integrated into development (e.g. VS Code in yaml.schemas) or directly into an online instance of Monaco YAML or be used to generate a generic UI like JSON Editor.

In the long run - I am convinced - these will not be enough to get the typical MS Word users to enter data like that because it is still too technical - but it could be a dynamic start for people to experience the format without having to do a setup.

@xldrkp
Copy link

xldrkp commented Feb 23, 2022

@frederik I agree with your assessment of the situation. The closest approach to enter meta data for non-tech-savvy authors is the tenzing project. What if we wrote a mapper from the spreadsheets to the schema and put a validator in the middle?

@jcolomb
Copy link
Member Author

jcolomb commented Feb 23, 2022

That is the plan for the tenzing project: spreadsheet -> text works quite good at the moment, but future version would like to do spreadsheet -> JAMS -> all different outputs we can think of (text, jatsxml, bioarchiv spreadsheet, gin yaml, .cff, zenodo.json, manubot yaml, ...).

Another point is to do orcid -> jams -> spreadsheet to initialise the spreadsheet (user friendly, easy to share)...

@xldrkp
Copy link

xldrkp commented Feb 23, 2022

What stack is this written in? R?

@jcolomb
Copy link
Member Author

jcolomb commented Feb 23, 2022

It is in R and RShiny, but the plan is to move it to JS I think @marton-balazs-kovacs ?

@xldrkp
Copy link

xldrkp commented Feb 23, 2022

Then I'd be in. What about leaving G**** behind and give https://baserow.io/ a try?

@marton-balazs-kovacs
Copy link

marton-balazs-kovacs commented Feb 23, 2022

I am thinking of rewriting tenzing by using a MEVN stack. I have two goals, to make managing contributor information easy on the researchers and nudge them to keep their ORCID updated. The new app would take a slightly different approach than using tables.

@marton-balazs-kovacs
Copy link

So my plan is to create a frontend for tenzing with authentication and table editing within the app. All the contributors' tables (the table that stores the contributors' information for a project) would be stored in JAMS format in the backend. For this, it would be great if we could create a standalone API that takes the information from the table and validates it first, then transforms it into the JAMS schema. This API could be used by the frontend to communicate with the backend upon table editing. What I am not sure about is that should we send only the changed info through the API on each edit or should we send the whole table each time an edit happens.

@mjaquiery
Copy link

PR #52 includes documentation about validating the JSON schema with an onlin jsonvalidator. YAML is a superset of JSON, so the JSON will work just fine here.

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

No branches or pull requests

5 participants