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

As a user, I want validate to report the value found on a valid-list failure #760

Open
rgdeen opened this issue Apr 25, 2024 · 4 comments
Open

Comments

@rgdeen
Copy link

rgdeen commented Apr 25, 2024

Checked for duplicates

Yes - I've already checked

πŸ§‘β€πŸ”¬ User Persona(s)

data engineer

πŸ’ͺ Motivation

When we have an attribute with a valid list, and the value is not in the list, we get an error message such as the following:

  FAIL: file:/project/m20/rgd/rav1ciun_overflow/boilerplate/bundle/data/qedr/vgr1/VGR_1223-MAMQTV-055580-DATA-055580.021.xml
      ERROR  [error.label.schematron]   line 86, 13: The attribute pds:type must be equal to one of the following values 'Asteroid', 'Astrophysical', 'Calibration', 'Calibration Field', 'Calibrator', 'Centaur', 'Comet', 'Dust', 'Dwarf Planet', 'Equipment', 'Exoplanet System', 'Galaxy', 'Globular Cluster', 'Laboratory Analog', 'Lunar Sample', 'Magnetic Field', 'Meteorite', 'Meteoroid', 'Meteoroid Stream', 'Nebula', 'Open Cluster', 'Planet', 'Planetary Nebula', 'Planetary System', 'Plasma Cloud', 'Plasma Stream', 'Ring', 'Sample', 'Satellite', 'Star', 'Star Cluster', 'Synthetic Sample', 'Terrestrial Sample', 'Trans-Neptunian Object'.
        14777 product validation(s) completed

It would be very helpful if it also reported what value it actually found (in this case, "Sun"). That way I could easily scan the validate output to find all the bad values and fix them at once, instead of having to go to each product individually to look up what's in the label. I'd wanted this feature several times in the past...

πŸ“– Additional Details

validate version 2.1.4

Acceptance Criteria

Given
When I perform
Then I expect

βš™οΈ Engineering Details

No response

@jordanpadams
Copy link
Member

@rsjoyner @jshughes can you help update this schematron rule? will this require an SCR?

@jordanpadams
Copy link
Member

@rgdeen this is a schematron rule that validate doesn't have any real control over, so this is something we can try to support in schematron in the future. Unfortunately, we cannot retrofit this into past IM releases.

@jordanpadams
Copy link
Member

@rgdeen that being said, that line number should also help in tracking down where this is in the label.

@rgdeen
Copy link
Author

rgdeen commented Apr 25, 2024

Ah. So the error is coming out of the schematron engine, not validate per se. Okay. This is not a big deal, just thought it would be an easy improvement... if not, don't worry about it. I guess we could pass a request along to the schematron folks but up to you if it's worth the trouble. Note that it was a general comment, not related to that specific attribute (it's just an example) so no need to update the schematron rule just for that item. (I'm not sure if you could, anyway). I use the line number a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ToDo
Development

No branches or pull requests

3 participants