wmo-im / pywcmp

pywcmp provides validation and quality assessment capabilities for the WMO WIS Core Metadata Profile (WCMP)
https://community.wmo.int/activity-areas/wis
Other
9 stars 8 forks source link

Code list files are missing #54

Closed david-i-berry closed 2 years ago

david-i-berry commented 2 years ago

External files referenced from util.py are missing:

https://github.com/wmo-im/pywcmp/blob/4cd02de0f5217bc739db9da301ab95710175453b/pywcmp/util.py#L98-L101 https://github.com/wmo-im/pywcmp/blob/4cd02de0f5217bc739db9da301ab95710175453b/pywcmp/util.py#L345

One of these is available from https://wis.wmo.int/2012/codelists/WMOCodeLists.xml but it is unclear where to get the others from. Without these pywcmp returns an error message, e.g.

root@8448d2a2f6aa:/data# pywcmp ats validate --file ./urn_x-wmo_md_int.wmo.wis__HHUL85LFPW.xml Validating file /data/urn_x-wmo_md_int.wmo.wis__HHUL85LFPW.xml OTHER ERROR: Error reading file '/root/.pywcmp/iso-all.xsd': failed to load external entity "/root/.pywcmp/iso-all.xsd"

josusky commented 2 years ago

Hi, @david-i-berry the code lists and schemas are downloaded when you run python3 setup.py build. I am not sure if we use the most authoritative sources, but it works for me. It outputs something like:

Downloading WMO ISO XML Schemas and Codelists.xml to /home/jano/.pywcmp running build running build_py

and as the result of the first step, it populates $HOME/.pywcmp with about 115 files and folders.

tomkralidis commented 2 years ago

@david-i-berry does this work for you given @josusky 's comments?

david-i-berry commented 2 years ago

Apologies for the delay in replying. I've just tried again and it work so I'll close the issue. I expect I missed the setup step before.