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

CSDGM Import Failing #614

Open
dwalt opened this issue Oct 18, 2023 · 6 comments
Open

CSDGM Import Failing #614

dwalt opened this issue Oct 18, 2023 · 6 comments
Assignees
Labels
bug Unexpected problem or unintended behavior !!Priority!! Needs to happen ASAP!

Comments

@dwalt
Copy link
Collaborator

dwalt commented Oct 18, 2023

Issue

mdEditor Version (find version under settings): 1.0.1+97c42afc

mdEditor Web Address (enter the URL): https://go.mdeditor.org/, https://dev.mdeditor.org/

Issue Description:

Provide a general description of the problem. If issue is a feature request, tell us why this feature is useful.
Import of CSDGM to mdJSON will not translate to any writer, both prod and dev

Steps to reproduce (Bug reports only):

  1. _____Import valid CSDGM record
  2. _____Add required fields to make a valid mdJSON file (no errors)
  3. _____Translated: tested translation on ScienceBase prod, dev-mdtranslator and port 3002

Observed Results (Bug reports only):

Error message of Schema Validation failed, mdjson reader
Created new mdJSON record from scratch and it translated successfully, confirming it is not the mdJSON reader, at least not directly. Appears to be the translation from CSDGM to mdJSON. Note: the CSDGM import ran without error.

Expected Results (Bug reports only):

An error free mdJSON file should translate to any format supported by the content
Note: cannot test CSDGM Translation bugs as a result

What did you expect to happen?

@dwalt dwalt added bug Unexpected problem or unintended behavior !!Priority!! Needs to happen ASAP! labels Oct 18, 2023
@jwaspin jwaspin self-assigned this Oct 25, 2023
@jwaspin jwaspin added this to the v1.0.3 milestone Oct 26, 2023
@jwaspin
Copy link
Contributor

jwaspin commented Nov 8, 2023

@dwalt The error is related to data quality but I'm not sure I understand what this error is saying so I was hoping you might have some insight:

The property '#/metadata/dataQuality/0/report/3/evaluationMethod' of type object did not match the following type: array in schema dataQualityReport.json#

I was able to import the CSDGM file and then export it in mdJson, so I was able to see that the format of the file does indeed look correct, but something about validation for data quality seems to think evaluationMethod is supposed to be an array instead of the object it found. That error also mentions the type, which looks like it's a string representing the code 000 for Data Quality types, so that's also a valid type. The only other thing I see in there is the methodDescription which is also a string and appears to be valid.

This appears to be an issue with the validation, but the validation incorrectly seems to think the object it found should be an array.

@jwaspin
Copy link
Contributor

jwaspin commented Nov 14, 2023

@dwalt I think the issue is in the dataQualityReport.json file in mdJson-schemas. It indicates evalutaionMethod should be an array, so either that schema definition is wrong or the schema visible in mdTools is wrong.

@dwalt
Copy link
Collaborator Author

dwalt commented Nov 21, 2023

@jwaspin That definition is incorrect, it is not an array. report is an array, and each report may have one and only one evaluationMethod, see: adiwg/mdJson-schemas#226

@jwaspin
Copy link
Contributor

jwaspin commented Dec 19, 2023

@dwalt I just came across this again in the process of trying to close out Data Quality. We will need to fix the schema in mdJson-schemas then I need to update the readers/writers in mdTranslator to look at evaluation method as an object and not an array.

@dwalt
Copy link
Collaborator Author

dwalt commented Dec 19, 2023

@jwaspin Review the schema issue here: adiwg/mdJson-schemas#224

@jwaspin
Copy link
Contributor

jwaspin commented Feb 21, 2024

Update: This should be fixed as part of mdTranslator v2.19.5 (then mdEditor updated to use that new version). Some testing of the mdTranslator may be necessary but this should fix the import errors.

@jwaspin jwaspin removed this from the v1.3.0 milestone Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior !!Priority!! Needs to happen ASAP!
Projects
None yet
Development

No branches or pull requests

2 participants