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

Load plugins without having to re-install Cylc Flow #3558

Closed
kinow opened this issue Apr 7, 2020 · 0 comments · Fixed by #3560
Closed

Load plugins without having to re-install Cylc Flow #3558

kinow opened this issue Apr 7, 2020 · 0 comments · Fixed by #3560
Assignees
Milestone

Comments

@kinow
Copy link
Member

kinow commented Apr 7, 2020

Describe exactly what you would like to see in an upcoming release

Given that we now have plug-ins in the main loop after #3492 (thanks to @oliver-sanders), we now should be able to work on the plug-in loading.

At the moment it's loading the entrypoints from the cylc-flow module, with a specific name. So after creating a new plug-in, users would need to check out the specific version of Cylc Flow they have, update setup.cfg, and then re-install it.

Instead, we should be able to navigate the python path and load all the entrypoints that match a specific name. The name would need to contain a namespace too.

Additional context

What we have:

def load(config, additional_plugins=None):
additional_plugins = additional_plugins or []
entry_points = pkg_resources.get_entry_map(
'cylc-flow'
).get('main_loop', {})
plugins = {
'state': {},
'timings': {}
}
for plugin_name in config['plugins'] + additional_plugins:

What we could try:

https://packaging.python.org/guides/creating-and-discovering-plugins/
Pull requests welcome!

@kinow kinow added this to the cylc-8.0a2 milestone Apr 7, 2020
@kinow kinow self-assigned this Apr 8, 2020
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.

1 participant