Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for dynamic plugins #24

Closed
asgibson opened this issue Aug 16, 2023 · 1 comment · Fixed by #36
Closed

Allow for dynamic plugins #24

asgibson opened this issue Aug 16, 2023 · 1 comment · Fixed by #36
Assignees

Comments

@asgibson
Copy link
Contributor

Currently, the DataDrivenLearning class requires that plugins are in a specific directory:

class DataDrivenLearning:
def __init__(self, headers, _ai_plugins:list=[]):
assert(len(headers)>0)
self.headers = headers
self.ai_constructs = [
importlib.import_module('onair.src.data_driven_components.' + plugin_name + '.' + f'{plugin_name}_plugin').Plugin(plugin_name, headers) for plugin_name in _ai_plugins
]

Write a function that allows plugins to be loaded on demand by name, by either providing the location of that module or using a pre-imported module (i.e., listed in sys.modules).

@Evana13G Evana13G added this to the OnAIR 1.0 refactor milestone Aug 28, 2023
@cfirth-nasa
Copy link
Contributor

Could add this to OnAIR config .ini - will draft

@cfirth-nasa cfirth-nasa self-assigned this Aug 31, 2023
@cfirth-nasa cfirth-nasa linked a pull request Sep 11, 2023 that will close this issue
the-other-james added a commit to dennisafa/OnAIR that referenced this issue Feb 23, 2024
…ngle-quote-strings' into 'main'

Resolve "remove deprecated use of escaped double quotes in single quote strings"

Closes nasa#24

See merge request cFS_lab/raisr_nos3/raisr-2.0!10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants