Open antirotor opened 1 month ago
Hey, does the --output-dir
flag that's already in trait-gen meet your requirements? https://github.com/OpenAssetIO/OpenAssetIO-TraitGen/blob/fcbbabe27672759412b8ed9cc562c2b21b9ff058/python/openassetio_traitgen/__main__.py#L80
Problem
We would like to include generated trait python files in our repos because they are bound to the functionality and must be versioned together with code using them. So we have trait yaml file in our project and I am generating python files from them using traitgen. Because I can't set destination, I am doing it in temporary directory and after traits are generated, I move them to final their final destination.
As a bonus (because I am aggregating multiple sources of trait definitions - more yaml files) I create on higher level
__init__.py
that is adding imports and and__all__ = []
declaration for easier use.But it would be nice to just set output path.