ITxPT / DATA4PTTools

Shared space for the development of the DATA4PT Greenlight NeTEx validation tool(s)
MIT License
10 stars 2 forks source link

Config file not taken into account #18

Closed fchabouis closed 1 year ago

fchabouis commented 2 years ago

Hello,

I'm trying to launch the tool using a config file as follow:

docker run -it -v /home/francis/Downloads/TBM_NeTEx/bordeaux_metropole-aggregated-netex/OFFRE_bordeaux_metropole_20220302001237Z/BORDEAUX_METROPOLE_offre_Bus_1_54_54.xml:/greenlight/documents -v /home/francis/projects/transport/greenlight_validator/config.yaml:/greenlight/config.yaml lekojson/greenlight -i /greenlight

┌ /greenlight/documents ─╼
│ xsd ... ok
└───╼ 

The validation seems to be done successfuly. The config file contains the configuration given in example in the documentation:

schema: xsd/NeTEx_publication.xsd # schema to use for validation, comes shipped with the source/container image
logLevel: debug # default is undefined, setting this parameter disables the fancy setting, regardless of its value
fancy: true # displays a progress instead of log
inputs: # where to look for documents
  - ~/.greenlight/documents
  - /etc/greenlight/documents
  - /documents
  - /greenlight/documents
  - ./documents
outputs:
  - report: # logged in standard output
      format: mdext # mdext (markdown extended) or mds (markdown simple)
  - file:
      format: json # formats available are: json or xml
      path: . # where to save the file (filename format is ${path}/report-${current_date_time}.${format}
builtin: true # whether to use builtin scripts
scripts: # where to look for custom scripts
  - ~/.greenlight/scripts
  - /etc/greenlight/scripts
  - /scripts
  - /greenlight/scripts
  - ./scripts

I am expecting to have a json output report generated in the current directory but I have none. The only output I can see is the terminal output saying ok

Can you help me understand how to have access to a full output report? Thanks

lekotros commented 2 years ago

In its current iteration its a bit finicky to get the output, you can update the configuration by setting outputs.file.path to /greenlight and run the your command

docker run -it -v /home/francis/projects/transport/greenlight_validator:/greenlight lekojson/greenlight -v /home/francis/Downloads/TBM_NeTEx/bordeaux_metropole-aggregated-netex/OFFRE_bordeaux_metropole_20220302001237Z/BORDEAUX_METROPOLE_offre_Bus_1_54_54.xml:/greenlight/documents -i /greenlight

After completion the report should be created at /home/francis/projects/transport/greenlight_validator/report-{}.json

lekotros commented 1 year ago

Configuration have been removed and replaced by profiles and in some cases removed in its entirety. Documentation will be updated accordingly