FAIRmat-NFDI / pynxtools

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

Declutter kwargs in convert_cli #410

Open lukaspie opened 4 weeks ago

lukaspie commented 4 weeks ago

In #404, we used a workaroung to add config_file to the kwargs (it is an input to thie `convert_cli? function).

if config_file:
    kwargs["config_file"] = config_file

Actually, this whole discussion is part of a bigger problem, namely that we call

data = data_reader().read(  # type: ignore[operator]
        template=Template(template), file_paths=input_file, **kwargs
    )

in the convert function. But, most of our reader don't actually accept kwargs, so this will always be a bit unstable. We should fix the kwargs downstream passing and general argument handling.

lukaspie commented 4 weeks ago

Relevant discussion here: https://github.com/FAIRmat-NFDI/pynxtools/pull/404#discussion_r1726687480