install the fitplugin to bumps before starting cli#290
Conversation
This is needed for registering the serialized model migrations, as well as the specialized refl1d loader
| from bumps.cli import install_plugin | ||
|
|
||
| CLIENT_PATH = Path(__file__).parent.parent / "client" | ||
| install_plugin(fitplugin) |
There was a problem hiding this comment.
It feels like we have two interfaces: bumps.cli.install_plugin and bumps.webview.server.cli.plugin_main. We should refactor bumps with the following in mind:
- The old
bumps.cliis deprecated - We may be moving
bumps.webview.server.clitobumps.cli. - We may be using the plugin without calling main, such as from a jupyter notebook.
- The jupyter notebook may need app name, version and client path.
A possible solution is to define app_name, app_version and client_path in bumps.plugin and reference them from there in the cli and in webview.
A minimal 1.0 change is to move the install_plugin method out of bumps.cli. Maybe into bumps/__init__.py?
|
I think it would be better to do #292 instead of this ... |
|
The work on refactoring the plugin infrastructure to use entry points is largely complete, but testing etc. has been put off until after bumps 1.0, so I think we should do this (extremely minimal) PR in order to get refl1d working in the meantime, as this is a bugfix. |
This is needed for registering the serialized model migrations, as well as the specialized refl1d loader.
Currently the cli and webview interfaces start just fine without this PR, but older serialized models are not being migrated and therefore can't be opened.