ACCESS-NRI / amami

ACCESS Models Accessory Multitool Interface (AMAMI) is a Python package that bundles a set of commands to handle ACCESS models input and output files.
Apache License 2.0
0 stars 0 forks source link

Set subfunction parsers dynamically #8

Closed atteggiani closed 6 months ago

atteggiani commented 7 months ago

As done with the main function in the entry point:

command = getattr(self.args, 'subcommand')
        from importlib import import_module
        mainfun = getattr(
            import_module(f'amami.core.{command}'),
            'main',
        )

do a similar thing with the parsers to avoid having to add all the single subcommand parsers manually.