FAIRmat-NFDI / pynxtools

https://fairmat-nfdi.github.io/pynxtools/
Apache License 2.0
12 stars 8 forks source link

dataconverter does not correctly pick up --generate template flag #208

Closed lukaspie closed 6 months ago

lukaspie commented 6 months ago

The --generate-template flag of pynxtools/dataconverter seems to not be working for me at the moment. If I pass that flag, the template is not printed to the console.

Probably comes from changes to the logger in https://github.com/FAIRmat-NFDI/pynxtools/pull/191. This seems to be related to the setting of the logger level, see here.

Quick fix: Change to logger.error(template) in https://github.com/FAIRmat-NFDI/pynxtools/blob/c4d1b9cf8fdabe1a9d49ec54b09a78e5b773e28b/pynxtools/dataconverter/convert.py#L248

We should check that all other flags (like --fair, --undocumented) are still picked up correctly.

@domna @sherjeelshabih @RubelMozumder

sherjeelshabih commented 6 months ago

I had a quick look. It seems some other code is setting the logging level back to warning.

lukaspie commented 6 months ago

See the linked PR, there's some explanation why this might happen. I am not an expert on logging though, so would be nice if you could have a look.