galaxyproject / planemo

Command-line utilities to assist in developing Galaxy and Common Workflow Language artifacts - including tools, workflows, and training materials.
https://planemo.readthedocs.io/
MIT License
89 stars 85 forks source link

Improve docs with regards to running and testing workflows #1426

Open wm75 opened 8 months ago

wm75 commented 8 months ago

@mvdbeek you asked me to take a look at the documentation of planemo run.

I've added some smaller improvements here, but imo the biggest hurdle when trying to understand the documentation is not so much the content of individual chapters, but their outline. Depending on your entry point into the docs they can be very confusing. If you take a look at the sidebar, there is little logic in (but likely a lot of history behind) how chapters are organized and the titles are often misleading. I would really start there.

wm75 commented 8 months ago

More specifically, I'd ask what different things you can do with planemo and what people coming to the docs might be looking for: something like develop/test tools, interact with workflows, interacting with the tool shed, then use these as main topics and add sub-chapters for each.

wm75 commented 8 months ago

The chapter on "Running", now "Interacting with" workflows is actually rather good on its own. "Automating Galaxy workflows" on the other hand is very redundant with "Running", "Test Format" and "Best Practices for Maintaining Galaxy Workflows", and hardly worth keeping in its current form. We could think of documenting the large-scale SARS-CoV-2 automation there perhaps.

wm75 commented 8 months ago

I've noticed that the simple planemo workflow_edit tutorial.ga suggested early in https://planemo.readthedocs.io/en/latest/running.html#the-basics does not work without some profile information, presumably because you cannot access workflow editor functionality as an anonymous user? Suggestions how to rewrite this would be appreciated.

Here's the error message I'm getting with the command:

Traceback (most recent call last):
  File "/home/wolma/planemo_39/bin/planemo", line 8, in <module>
    sys.exit(planemo())
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/cli.py", line 102, in handle_blended_options
    return f(*args, **kwds)
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/commands/cmd_workflow_edit.py", line 21, in cli
    runnable = for_runnable_identifier(ctx, workflow_identifier, kwds.get("profile"))
  File "/home/wolma/planemo_39/lib64/python3.9/site-packages/planemo/runnable_resolve.py", line 21, in for_runnable_identifier
    current_profile = kwds.get("profile")
AttributeError: 'NoneType' object has no attribute 'get'
mvdbeek commented 8 months ago

I'll try fixing that up, however I think we should have people testing workflows from the IWC, not https://github.com/usegalaxy-eu/workflow-testing, which I think isn't very active or easily debuggable.

mvdbeek commented 8 months ago

The fix was pretty simple, no profile required, I'll merge and cut a new release once the tests pass.

mvdbeek commented 8 months ago

Sorry, got distracted a little. https://pypi.org/project/planemo/0.75.21/ should work for workflow_edit, though we should enable the prebuilt-client install to speed up planemo serve.