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
90 stars 85 forks source link

Fix autoupdate for workflows with overlapping tool updates #1452

Closed bernt-matthias closed 2 months ago

bernt-matthias commented 6 months ago

An attempt to solve the problem that the workflow autoupdate does not update all workflows in a dir. I think the problem occurs if the tool set of the workflows overlaps (e.g. https://github.com/galaxyproject/iwc/pull/422/).

The symptom that is fixed by my change is that config.updated_repos gets empty for some workflows which are therefore skipped.

I guess a cleaner way to fix this might be to uninstall all tools again after a workflow was processed?

mvdbeek commented 5 months ago

I would really appreciate it if we didn't need one instance per workflow. To make it simpler, we could update all workflows by dropping if config.updated_repos.get(workflow.path) or kwds.get("engine") == "external_galaxy":.

We then check if any tool has actually been upgraded. That means it will also work for local non-TS tools (e.g. built-in tools and converters). The cost of running the refactoring action is minimal, compared to one instance per workflow. This way we also get syntax upgrades or fixes "for free" if we decide to do that in the future

bernt-matthias commented 5 months ago

We then check if any tool has actually been upgraded.

Would we need to implement this? Or is this already included?