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

Importing plugins on time for using xcube-gen-.. #67

Merged
merged 1 commit into from
May 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Added `xcube vars2dim` command to make variables a cube dimension (#31)
* Added `xcube serve` option `--traceperf` that allows switching on performance diagnostics.
* Fixed error in plugins when importing `xcube.api.gen` (#62)
* Fixed import of plugins only when executing `xcube.cli` (#66)


## Changes in 0.1.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ The SwaggerHub allows to choose the xcube-server project and therefore the datas

To run the server on default port 8080:

$ xcube server -v -c xcube_server/res/demo/config.yml
$ xcube serve -v -c xcube/webapi/res/demo/config.yml


Test it:
Expand Down
3 changes: 3 additions & 0 deletions xcube/api/gen/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ def gen_cube(input_files: Sequence[str] = None, input_processor: str = None, inp
:param monitor: A progress monitor.
:return: A tuple (output_path, status). If status is True, output_path will be the path to the output.
"""
# Force loading of plugins
__import__('xcube.util.plugin')

input_processor = get_input_processor(input_processor)
if not input_processor:
raise ValueError(f'unknown input_processor {input_processor!r}')
Expand Down