fair-workflows / FAIRWorkflowsExtension

A Jupyterlab extension for searching for Nanopublished computational steps.
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Issue with running Jupyterlab with extension using docker-compose #12

Closed vemonet closed 4 years ago

vemonet commented 4 years ago

Trying to start Jupyterlab with FAIRWorkflowsExtension using docker-compose fails

From this github repo:

docker-compose up

Raise issue:

  File "/app/FAIRWorkflowsExtension/__init__.py", line 2, in <module>
    from .nanopub_handlers import nanopub_search_handler, nanopub_step_handler
  File "/app/FAIRWorkflowsExtension/nanopub_handlers.py", line 10, in <module>
    import fairworkflows
  File "/opt/conda/lib/python3.7/site-packages/fairworkflows/__init__.py", line 5, in <module>
    from .ro_crate import ROCrate
  File "/opt/conda/lib/python3.7/site-packages/fairworkflows/ro_crate.py", line 7, in <module>
    from . import cwl
  File "/opt/conda/lib/python3.7/site-packages/fairworkflows/cwl.py", line 6, in <module>
    from toil.cwl import cwltoil
  File "/opt/conda/lib/python3.7/site-packages/toil/cwl/cwltoil.py", line 78, in <module>
    from cwltool.utils import aslist, convert_pathsep_to_unix, get_listing, normalizeFilesDirs, CWLObjectType
ImportError: cannot import name 'get_listing' from 'cwltool.utils' (/opt/conda/lib/python3.7/site-packages/cwltool/utils.py)
ERROR: Service 'jupyterlab' failed to build: The command '/bin/sh -c jupyter-serverextension enable --py FAIRWorkflowsExtension' returned a non-zero code: 1

Exactly the same issue happens with NanopubsJL

The issue seems to be related to https://github.com/fair-workflows/FAIRWorkbench/blob/master/fairworkflows/cwl.py#L6

CWL toil try to import get_listing from cwltool.utils, but cannot find it. It seems that get_listing has been introduced in cwltool 3.0, and the FAIRWorkbench requires cwltool 2.0

vemonet commented 4 years ago

Updating cwltool in the FAIRWorkbench requirements.txt to the latest release fix the import get_listing issue: https://github.com/fair-workflows/FAIRWorkbench/blob/master/requirements.txt#L7

vemonet commented 4 years ago

Issue fixed in FAIRWorkbench in pull request https://github.com/fair-workflows/FAIRWorkbench/pull/65

raar1 commented 4 years ago

Hi Vincent! Thanks a lot and sorry about the issue (you're right, it was affecting NanopubJL etc as well). Due to some design choices made last week we're actually now taking out the cwl component (at least, the execution stuff) and the workflowhub related elements (for now). It will likely be back, in one form or another, but currently we're trying to focus the design of the core library. I've removed the offending code completely, otherwise I would of course have merged your PR (thanks again).

If you have the time, would you be able to try running the extension(s) again just to check that they are now building/running for you as well?

vemonet commented 4 years ago

Yes, it is working fine now! Thanks