NASA-PDS / validate

Validates PDS4 product labels, data and PDS3 Volumes
https://nasa-pds.github.io/validate/
Apache License 2.0
16 stars 11 forks source link

Update software to handle catalog files the same fashion when specified via command-line versus config file #150

Open salvioli opened 4 years ago

salvioli commented 4 years ago

Describe the bug It seems that the configuration file attribute validate.catalog and the command line parameter -C are not equivalent.

To Reproduce Steps to reproduce the behavior:

  1. unzip dph_example_archive.zip
  2. run validate -c validate.conf -C catalog.xml
  3. run validate -c validate.conf
  4. The two results are different, hinting that the second run does not pick up the catalog file correctly. Indeed, in the second case, the list of parameters printed at the top of the validation report do not include the User Specified Catalogs item.

Expected behavior Output passing the catalog file via -C option or via validate.catalog should be the same.

Version of Software Used

gov.nasa.pds:validate
Version 1.17.4
Release Date: 2019-10-22 13:54:19
Core Schema: PDS4_PDS_1D00.xsd
Core Schematron: PDS4_PDS_1D00.sch

Copyright 2019, by the California Institute of Technology ("Caltech").
All rights reserved.

Desktop (please complete the following information):

jstone-psi commented 1 week ago

I just ran into this issue, as well.

It looks like the configuration handler never checks for ConfigKey.CATALOG, so the config file entry is being ignored:

https://github.com/NASA-PDS/validate/blob/5bd32aab792b54675265d70618035d74408a4f69/src/main/java/gov/nasa/pds/validate/ValidateLauncher.java#L676