-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Right now, components are added to flowcraft by including a nextflow template file and a python class with the attributes of that component. Then, we have a dictionary that maps the template and the class. This is cumbersome to maintain, as the dictionary is getting quite large with the addition of new components and we could improve on this.
By using a similar system to the recipes (see https://github.com/assemblerflow/flowcraft/blob/recipes/flowcraft/generator/recipe.py#L647), we could automate the "loading" of components into flowcraft by searching for all classes in one or more submodules. We can also extend this search to other paths, which would allow users to add new components locally without having to push them to flowcraft.
For this, we would need to:
- Create a loader function that gathers all classes in specified modules/paths
- Add a new attribute (e.g.
name) to each class, containing the same key as in the current dictionary mapping.