Skip to content

davelopez/galaxy-workflows-vscode

Repository files navigation

Galaxy Workflows VSCode Extension

License: MIT GitHub release (latest SemVer) CI Open in Visual Studio Code

VSCode extension to assist in editing Galaxy Workflow files while enforcing best practices. Use it in combination with Planemo for the best experience developing and maintaining your Galaxy workflows.

The extension can be installed either locally, or in a web context, like github.dev or vscode.dev. The aim is to support the maximum number of features in both modes but the web mode may have some limitations.

The extension aims to focus on assist in editing Format 2 Galaxy Workflow (.gxwf.yml) files. However, it will work with legacy or native Galaxy Workflow format (documents with .ga extension) as an experiment for legacy workflow maintainers.

⚠️ Please note the Native Galaxy Workflow format (.ga) is considered internal and legacy. The support provided here is temporal and experimental. If you are developing workflows manually use the new Format 2 Galaxy Workflow (.gxwf.yml).

If you find a bug or have an idea or suggestion that can improve your experience please create a new issue here or comment in any of the existing ones.

Quick Start

Option 1: Install extension locally

  1. Open VSCode
  2. Install the extension from the marketplace.
  3. Open any Galaxy Workflow document (.gxwf.yml or .ga) and the extension will activate.

Option 2: Use it directly in vscode.dev or github.dev

  1. For example, open the IWC (Intergalactic Workflow Commission) repository on GitHub

    Open in Visual Studio Code

  2. Install the extension if you haven't already:

    • Go to the extensions panel (Ctrl+Shift+x) and search for davelopez.galaxy-workflows then click Install
  3. Enjoy the workflow editing features directly on your browser ✨

Changelog

See the full changelog here.

Contributing

✨ Contributors are welcome! ✨

Just make sure to read the Contributing Guidelines 😉

Features

The following table shows all the implemented features and the current support for each workflow format.

Feature Legacy Workflows (.ga) Format 2 Workflows (.gxwf.yml)
Validation ✔️ ✔️
Documentation on Hover ✔️ ✔️
IntelliSense ✔️ ✔️
Formatting ✔️ ✔️
Custom Outline ✔️ ✔️
Workflow Cleanup Command ✔️
Simplified Workflow Diffs 🔶
Legend

✔️ Feature supported in latest version.

🔜 Feature not yet available but planned for future release.

❔ This feature may not apply to this format or not planned yet.

🔶 This feature is only supported in local repositories or file systems. Not supported in Web mode or Virtual File Systems.

❌ This feature is not supported for this format.

Workflow Validation

You will get diagnostics for every syntax error or incorrect property value as you type so you can fix them right away.

Gxformat2 (yaml)

Workflow Validation Demo

Legacy (ga)

Workflow Validation Demo

Back to Features ⬆️

Documentation on Hover

Hover over properties to get a description of what they are and how can you use them. The documentation displayed is based on the Workflow schema annotations, if you think you need more details or something is off, please help us improve the schema here!

Gxformat2 (yaml)

Documentation on Hover Demo

Legacy (ga)

Documentation on Hover Demo

Back to Features ⬆️

IntelliSense

Get IntelliSense suggestions depending on your cursor context. Remember that you can manually trigger the suggestions at your current cursor position using Ctrl+Space.

Gxformat2 (yaml)

IntelliSense Demo

Legacy (ga)

IntelliSense Demo

Back to Features ⬆️

Formatting

Keep your workflow document consistently formatted. We recommend enabling your VSCode setting to Format on Save so you don't have to manually format after the changes.

Gxformat2 (yaml)

Auto Formatting Demo

Legacy (ga)

Auto Formatting Demo

Back to Features ⬆️

Custom Outline

The Custom Outline allows you to navigate and find different parts of the Workflow faster using the Outline panel or the Breadcrumbs. The Outline representation has been enhanced, in comparison to the standard JSON Outline, by displaying relevant information more prominently (like using the workflow step name instead of the index on step nodes) or hiding non-essential nodes.

Gxformat2 (yaml)

Custom Outline Demo

Legacy (ga)

Custom Outline Demo

Back to Features ⬆️

Workflow Cleanup Command

You can clean up the non-essential properties of a (legacy .ga) workflow with this command. These properties are usually related to the display of the workflow in the editor and are not part of the workflow semantics. This command will remove those properties from the document, but you can also use the Preview clean workflow command, which will show you a preview of the clean workflow instead of making the changes to the original.

Legacy (ga)

Cleanup Command Demo

Back to Features ⬆️

Simplified Workflow Diffs

⚠️ This feature is experimental and is only available using a local git repository.

Sometimes you want to compare different revisions of the same (legacy .ga) workflow and see what has changed between them. If the workflow has been through the Galaxy editor or some of the nodes have been moved around, there can be many changes that are just cosmetical and not part of the workflow logic. In those cases, you may want to get a 'simplified' diff so you can focus on the 'real' changes. You can do so in the Timeline or the File Explorer by using Select workflow for (clean) compare in one revision and then Compare with this workflow (clean) on the other revision, this will compare both revisions using the 'clean' version of the workflow (see the Workflow Cleanup Command), meaning the non-essential parts are removed from both documents before the comparison.

⚠️ NOTE: This feature is no longer supported in the Timeline until a new version of the VSCode Timeline API is finalized and published. See this PR for more details.

Legacy (ga)

Simplified Workflow Diffs Demo

Back to Features ⬆️

About

VSCode extension to assist in Galaxy (https://galaxyproject.org/) workflows editing. (Work in progress)

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published