Git Product home page Git Product logo

wdl-ide's Introduction

IDE for WDL

This project aims to provide a "batteries-included" environment for developing WDL workflows.

Please note: it is currently under active development, and is not yet feature-complete.

Editor-agnostic WDL support

We will provide a WDL Language Server plugin, based on Language Server Protocol (LSP), cromwell-tools, pygls, and miniwdl.

This protocol is supported by many code editors, and enables universal support for language features.

More specifically, our plugin will enable you to:

  • check the syntax of a workflow
  • submit a workflow for execution to Cromwell API
  • watch for completion/failure of each workflow (or cancel it)
  • highlight task-specific failures
  • get feedback on runtime resource management
  • enjoy rich editor support (jump to definition etc.)

You can find the following published extensions based on this plugin:

Other editors are supported via their respective LSP plugins. Examples on how to connect them are in the client directory.

Browser IDE

Additionally, we provide an Integrated Development Environment (IDE), which runs in a web browser and is based on Theia.

It bundles WDL extensions for Visual Studio Code - WDL DevTools and WDL Syntax Highlighter - along with a "local" instance of Cromwell.

The bundle consists of Docker containers, which you can set up with a single Docker Compose command.

This approach is used to

  • develop workflows locally, with an ultra-fast feedback loop
  • run workflows in the cloud from developer machine - no need for a Cromwell server
  • create reproducible setup - it works on any OS with Docker Compose
  • run the same setup on a remote server - think Notebooks, but for WDL!
  • simplify local development - it just worksβ„’

Deployment

To deploy the IDE:

  • clone or download this repo into a local folder
  • install Docker Compose
  • for local-only development, run this command in the cloned folder:
    docker-compose pull && docker-compose up
    
  • for local and Google Cloud development, do the following instead [*]:
    • create a project on Google Cloud Platform
    • create a service account with project-wide Genomics Pipelines Runner role, and download its key in JSON format
    • grant it Service Account User permission on Compute Engine default service account in that project
    • create a bucket for Cromwell executions
    • grant Storage Object Admin permission on the Cromwell executions bucket
    • run this command, replacing <...> with your values:
      docker-compose pull && \
      GOOGLE_APPLICATION_CREDENTIALS=./<your-service-account-key>.json \
      GOOGLE_AUTH_MODE=service-account \
      GOOGLE_CLOUD_PROJECT=<your-project-name> \
      GOOGLE_EXECUTIONS_BUCKET=<executions-bucket-name> \
      docker-compose up
      
    [*] In the future, we may provide a simplified script to do most of the above. Additionally, we may add settings for other cloud providers (PRs are welcome!).

The first time you run the Docker compose command, it will take ~5 minutes to compile the IDE from sources and bring up the environment. Later on, we will provide a Docker image to speed that up.

When you no longer see the log messages, the IDE is running and you can navigate to it in a browser at this address: localhost:3000.

wdl-ide's People

Contributors

dependabot[bot] avatar dinvlad avatar illusional avatar pshapiro4broad avatar vincent-czi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wdl-ide's Issues

Blank screen on localhost:3000 even after successful start of the process

Hi Team,

I'm running wdl-ide over mac os "local only", I'm able to issue docker-compose up command which is downloading images and bringing up all the components such DB, Cromwell. But somehow I'm getting blank screen at localhost:3000.

I'm not sure whats going wrong here, could you please suggest as in what I need to check here? one error which I can notice while issuing command is as below:


docker_1    | time="2019-08-04T20:11:57.156457000Z" level=warning msg="Running modprobe bridge br_netfilter failed with message: ip: can't find device 'bridge'\nip: can't find device 'br_netfilter'\nmodprobe: can't change directory to '/lib/modules': No such file or directory\n, error: exit status 1"
docker_1    | time="2019-08-04T20:11:57.217250700Z" level=warning msg="Running modprobe nf_nat failed with message: `ip: can't find device 'nf_nat'\nmodprobe: can't change directory to '/lib/modules': No such file or directory`, error: exit status 1"
docker_1    | time="2019-08-04T20:11:57.288521600Z" level=warning msg="Running modprobe xt_conntrack failed with message: `ip: can't find device 'xt_conntrack'\nmodprobe: can't change directory to '/lib/modules': No such file or directory`, error: exit status 1"
docker_1    | time="2019-08-04T20:11:57.800937800Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
docker_1    | time="2019-08-04T20:11:58.077172900Z" level=info msg="Loading containers: done."
docker_1    | time="2019-08-04T20:11:58.234116900Z" level=info msg="Docker daemon" commit=74b1e89e8a graphdriver(s)=overlay2 version=19.03.1
docker_1    | time="2019-08-04T20:11:58.239849600Z" level=info msg="Daemon has completed initialization"
docker_1    | time="2019-08-04T20:11:58.420574000Z" level=info msg="API listen on [::]:2376"
docker_1    | time="2019-08-04T20:11:58.420716900Z" level=info msg="API listen on /var/run/docker.sock"
db_1        | 2019-08-04T20:11:56.774076Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
db_1        | 2019-08-04T20:11:56.774256Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.17) starting as process 1
db_1        | 2019-08-04T20:11:58.841015Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
db_1        | 2019-08-04T20:11:58.845862Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1        | 2019-08-04T20:11:59.019507Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.17'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
db_1        | 2019-08-04T20:11:59.140236Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
theia_1     | yarn run v1.16.0
theia_1     | $ /tmp/wdl-language-support/node_modules/.bin/theia start /home/theia/workspace --hostname=0.0.0.0
theia_1     | root INFO Theia app listening on http://0.0.0.0:3000.
cromwell_1  | 2019-08-04 20:12:05,555  INFO  - Running with database db.url = jdbc:mysql://db:3306/cromwell?rewriteBatchedStatements=true
theia_1     | root ERROR Uncaught Exception:  TypeError: Cannot read property 'versions' of undefined
theia_1     | root ERROR TypeError: Cannot read property 'versions' of undefined
theia_1     |     at Request._callback (/tmp/wdl-language-support/node_modules/@theia/plugin-ext-vscode/lib/node/plugin-vscode-resolver.js:129:55)
theia_1     |     at Request.self.callback (/tmp/wdl-language-support/node_modules/request/request.js:185:22)
theia_1     |     at Request.emit (events.js:198:13)
theia_1     |     at Request.<anonymous> (/tmp/wdl-language-support/node_modules/request/request.js:1161:10)
theia_1     |     at Request.emit (events.js:198:13)
theia_1     |     at IncomingMessage.<anonymous> (/tmp/wdl-language-support/node_modules/request/request.js:1083:12)
theia_1     |     at Object.onceWrapper (events.js:286:20)
theia_1     |     at IncomingMessage.emit (events.js:203:15)
theia_1     |     at endReadableNT (_stream_readable.js:1129:12)
theia_1     |     at process._tickCallback (internal/process/next_tick.js:63:19)
theia_1     | root ERROR Uncaught Exception:  Error: No extension
theia_1     | root ERROR Error: No extension
theia_1     |     at Request._callback (/tmp/wdl-language-support/node_modules/@theia/plugin-ext-vscode/lib/node/plugin-vscode-resolver.js:120:44)
theia_1     |     at Request.self.callback (/tmp/wdl-language-support/node_modules/request/request.js:185:22)
theia_1     |     at Request.emit (events.js:198:13)
theia_1     |     at Request.<anonymous> (/tmp/wdl-language-support/node_modules/request/request.js:1161:10)
theia_1     |     at Request.emit (events.js:198:13)
theia_1     |     at IncomingMessage.<anonymous> (/tmp/wdl-language-support/node_modules/request/request.js:1083:12)
theia_1     |     at Object.onceWrapper (events.js:286:20)
theia_1     |     at IncomingMessage.emit (events.js:203:15)
theia_1     |     at endReadableNT (_stream_readable.js:1129:12)
theia_1     |     at process._tickCallback (internal/process/next_tick.js:63:19)
db_1        | mbind: Operation not permitted
cromwell_1  | 2019-08-04 20:12:18,798  INFO  - Successfully acquired change log lock
cromwell_1  | 2019-08-04 20:12:22,896  INFO  - Reading from cromwell.DATABASECHANGELOG
cromwell_1  | 2019-08-04 20:12:23,324  INFO  - Successfully released change log lock
cromwell_1  | 2019-08-04 20:12:23,388  INFO  - Running with database db.url = jdbc:mysql://db:3306/cromwell?rewriteBatchedStatements=true
cromwell_1  | 2019-08-04 20:12:23,654  INFO  - Successfully acquired change log lock
db_1        | mbind: Operation not permitted
cromwell_1  | 2019-08-04 20:12:23,896  INFO  - Reading from cromwell.SQLMETADATADATABASECHANGELOG
cromwell_1  | 2019-08-04 20:12:23,954  INFO  - Successfully released change log lock
cromwell_1  | 2019-08-04 20:12:25,382  WARN  - Unrecognized configuration key(s) for Jes: default-runtime-attributes.maxRetries
cromwell_1  | 2019-08-04 20:12:27,379  INFO  - Slf4jLogger started
cromwell_1  | 2019-08-04 20:12:28,409 cromwell-system-akka.dispatchers.engine-dispatcher-7 INFO  - Workflow heartbeat configuration:
cromwell_1  | {
cromwell_1  |   "cromwellId" : "cromid-163ae8b",
cromwell_1  |   "heartbeatInterval" : "2 minutes",
cromwell_1  |   "ttl" : "10 minutes",
cromwell_1  |   "failureShutdownDuration" : "5 minutes",
cromwell_1  |   "writeBatchSize" : 10000,
cromwell_1  |   "writeThreshold" : 10000
cromwell_1  | }
cromwell_1  | 2019-08-04 20:12:28,929  WARN  - 'docker.hash-lookup.gcr-api-queries-per-100-seconds' is being deprecated, use 'docker.hash-lookup.gcr.throttle' instead (see reference.conf)
cromwell_1  | 2019-08-04 20:12:28,953 cromwell-system-akka.dispatchers.service-dispatcher-18 INFO  - Metadata summary refreshing every 1 second.
cromwell_1  | 2019-08-04 20:12:29,002 cromwell-system-akka.actor.default-dispatcher-5 INFO  - KvWriteActor configured to flush with batch size 200 and process rate 5 seconds.
cromwell_1  | 2019-08-04 20:12:29,015 cromwell-system-akka.dispatchers.engine-dispatcher-27 INFO  - CallCacheWriteActor configured to flush with batch size 100 and process rate 3 seconds.
cromwell_1  | 2019-08-04 20:12:29,017 cromwell-system-akka.dispatchers.engine-dispatcher-24 INFO  - JobStoreWriterActor configured to flush with batch size 1000 and process rate 1 second.
cromwell_1  | 2019-08-04 20:12:29,022 cromwell-system-akka.dispatchers.service-dispatcher-16 INFO  - WriteMetadataActor configured to flush with batch size 200 and process rate 5 seconds.
cromwell_1  | 2019-08-04 20:12:29,970 cromwell-system-akka.dispatchers.engine-dispatcher-29 INFO  - JobExecutionTokenDispenser - Distribution rate: 50 per 1 seconds.
cromwell_1  | 2019-08-04 20:12:30,423 cromwell-system-akka.dispatchers.backend-dispatcher-32 INFO  - PAPI request worker batch interval is 666 milliseconds
cromwell_1  | 2019-08-04 20:12:30,435 cromwell-system-akka.dispatchers.backend-dispatcher-32 INFO  - PAPI request worker batch interval is 666 milliseconds
cromwell_1  | 2019-08-04 20:12:30,447 cromwell-system-akka.dispatchers.backend-dispatcher-32 INFO  - PAPI request worker batch interval is 666 milliseconds
cromwell_1  | 2019-08-04 20:12:30,473 cromwell-system-akka.dispatchers.backend-dispatcher-33 INFO  - Running with 3 PAPI request workers
cromwell_1  | 2019-08-04 20:12:34,986 cromwell-system-akka.dispatchers.engine-dispatcher-30 INFO  - Not triggering log of token queue status. Effective log interval = None
cromwell_1  | 2019-08-04 20:12:37,014 cromwell-system-akka.dispatchers.engine-dispatcher-27 INFO  - Cromwell 41-d8e27c1 service started on 0.0.0.0:8000...

Docker-Compose fails when running on Windows WSL2

I'm using Windows 10, WSL2, and running a clean git clone of this project in a new WSL2 Ubuntu instance.

After executing docker-compose pull && docker-compose up, and going to localhost:3000 and attempting to create a new file in Theia, I get the logs below. I've tried editing the docker-compose.yaml to use my WSL2 uid/gid (1000:1000), and creating all the volumes (db, docker-*, executions, google-nocred, and home) and chown-ing to theia's user 1001:1001, and still no go.

I'll keep having a go, but I'd appreciate it if you have some notes on this.

cromwell_1 | 2021-09-20 12:12:43,654 INFO - Successfully released change log lock
cromwell_1 | 2021-09-20 12:12:43,773 WARN - Unrecognized configuration key(s) for PAPIv2: default-runtime-attributes.maxRetries
cromwell_1 | 2021-09-20 12:12:43,943 INFO - Slf4jLogger started
cromwell_1 | 2021-09-20 12:12:44,044 cromwell-system-akka.dispatchers.engine-dispatcher-5 INFO - Workflow heartbeat configuration:
cromwell_1 | {
cromwell_1 | "cromwellId" : "cromid-9533e6d",
cromwell_1 | "heartbeatInterval" : "2 minutes",
cromwell_1 | "ttl" : "10 minutes",
cromwell_1 | "failureShutdownDuration" : "5 minutes",
cromwell_1 | "writeBatchSize" : 10000,
cromwell_1 | "writeThreshold" : 10000
cromwell_1 | }
cromwell_1 | 2021-09-20 12:12:44,076 cromwell-system-akka.dispatchers.service-dispatcher-10 INFO - Metadata summary refreshing every 1 second.
cromwell_1 | 2021-09-20 12:12:44,085 cromwell-system-akka.dispatchers.engine-dispatcher-26 INFO - JobStoreWriterActor configured to flush with batch size 1000 and process rate 1 second.
cromwell_1 | 2021-09-20 12:12:44,086 cromwell-system-akka.actor.default-dispatcher-23 INFO - KvWriteActor configured to flush with batch size 200 and process rate 5 seconds.
cromwell_1 | 2021-09-20 12:12:44,086 cromwell-system-akka.dispatchers.service-dispatcher-7 INFO - WriteMetadataActor configured to flush with batch size 200 and process rate 5 seconds.
cromwell_1 | 2021-09-20 12:12:44,094 cromwell-system-akka.dispatchers.engine-dispatcher-34 INFO - CallCacheWriteActor configured to flush with batch size 100 and process rate 3 seconds.
cromwell_1 | 2021-09-20 12:12:44,094 WARN - 'docker.hash-lookup.gcr-api-queries-per-100-seconds' is being deprecated, use 'docker.hash-lookup.gcr.throttle' instead (see reference.conf)
cromwell_1 | 2021-09-20 12:12:44,270 cromwell-system-akka.dispatchers.engine-dispatcher-34 INFO - JobExecutionTokenDispenser - Distribution rate: 50 per 1 seconds.
cromwell_1 | 2021-09-20 12:12:44,288 cromwell-system-akka.dispatchers.backend-dispatcher-38 INFO - PAPI request worker batch interval is 666 milliseconds
cromwell_1 | 2021-09-20 12:12:44,289 cromwell-system-akka.dispatchers.backend-dispatcher-36 INFO - PAPI request worker batch interval is 666 milliseconds
cromwell_1 | 2021-09-20 12:12:44,289 cromwell-system-akka.dispatchers.backend-dispatcher-39 INFO - PAPI request worker batch interval is 666 milliseconds
cromwell_1 | 2021-09-20 12:12:44,291 cromwell-system-akka.dispatchers.backend-dispatcher-37 INFO - Running with 3 PAPI request workers
cromwell_1 | 2021-09-20 12:12:44,706 cromwell-system-akka.dispatchers.engine-dispatcher-5 INFO - Cromwell 47-b36d920 service started on 0.0.0.0:8000...
cromwell_1 | 2021-09-20 12:12:49,284 cromwell-system-akka.dispatchers.engine-dispatcher-96 INFO - Not triggering log of token queue status. Effective log interval = None
theia_1 | root ERROR Faild to initialize global state path: Error: EACCES: permission denied, mkdir '/home/theia/.theia/plugin-storage'
theia_1 | root INFO Using Git [2.22.0] from the PATH. (/usr/bin/git)
theia_1 | root INFO Detected keyboard layout from browser API: US (PC)
theia_1 | root WARN Collided keybinding is ignored; {"command":"monaco.editor.action.toggleTabFocusMode","keybinding":"ctrl+m"} collided with {"command":"core.toggleMaximized","keybinding":"ctrl+m"}
theia_1 | root WARN Could not register keybinding:
theia_1 | {"command":"monaco.editor.action.toggleTabFocusMode","keybinding":"ctrl+m"}
theia_1 | Error: "ctrl+m" is in collision with something else [scope:0]
theia_1 | root WARN Collided keybinding is ignored; {"command":"passthrough","keybinding":"ctrl+k","context":"terminalActive"} collided with {"command":"terminal:clear","keybinding":"ctrlcmd+k","context":"terminalActive"}
theia_1 | root WARN Could not register keybinding:
theia_1 | {"command":"passthrough","keybinding":"ctrl+k","context":"terminalActive"}
theia_1 | Error: "ctrl+k" is in collision with something else [scope:0]
theia_1 | root INFO [nsfw-watcher: 46] Started watching: /home/theia/.theia
theia_1 | root INFO [nsfw-watcher: 46] Started watching: /home/theia/workspace
theia_1 | root INFO [nsfw-watcher: 46] Started watching: /home/theia/workspace
theia_1 | root WARN e.onStart is slow, took: 267.89999999990687 ms
theia_1 | terminal ERROR Couldn't attach - can't find terminal with id: 0
theia_1 | terminal ERROR Error attaching to terminal id 0, the terminal is most likely gone. Starting up a new terminal instead.
theia_1 | root ERROR Couldn't resize terminal -1, because it doesn't exist.
theia_1 | root INFO [a14c370b-d027-4588-b64b-f8b64fe0368e] Sync of 3 plugins took: 127.8000000002794 ms
theia_1 | root INFO [a14c370b-d027-4588-b64b-f8b64fe0368e][vscode.docker]: Loaded contributions.
theia_1 | root INFO [a14c370b-d027-4588-b64b-f8b64fe0368e][broadinstitute.wdl-devtools]: Loaded contributions.
theia_1 | root INFO [a14c370b-d027-4588-b64b-f8b64fe0368e][broadinstitute.wdl]: Loaded contributions.
theia_1 | root INFO [a14c370b-d027-4588-b64b-f8b64fe0368e] Load contributions of 3 plugins took: 7.400000000372529 ms
theia_1 | root ERROR Couldn't resize terminal -1, because it doesn't exist.
theia_1 | root ERROR Request getHostLogPath failed with error: EACCES: permission denied, mkdir '/home/theia/.theia/logs' Error: EACCES: permission denied, mkdir '/home/theia/.theia/logs'
theia_1 | root ERROR Request getHostStoragePath failed with error: EACCES: permission denied, mkdir '/home/theia/.theia/workspace-storage' Error: EACCES: permission denied, mkdir '/home/theia/.theia/workspace-storage'
theia_1 | root ERROR Failed to load plugins: Error: Request 'getHostLogPath' failed
theia_1 | at Proxy. (http://localhost:3000/bundle.js:14:738212)
theia_1 | at e. (http://localhost:3000/bundle.js:14:601008)
theia_1 | at http://localhost:3000/bundle.js:14:594274
theia_1 | at Object.next (http://localhost:3000/bundle.js:14:594379)
theia_1 | at http://localhost:3000/bundle.js:14:593291
theia_1 | at new Promise ()
theia_1 | at s (http://localhost:3000/bundle.js:14:593065)
theia_1 | at e.startPlugins (http://localhost:3000/bundle.js:14:600786)
theia_1 | at e. (http://localhost:3000/bundle.js:14:598359)
theia_1 | at http://localhost:3000/bundle.js:14:594274
theia_1 | root INFO [a14c370b-d027-4588-b64b-f8b64fe0368e] Sync of 0 plugins took: 40.200000000186265 ms
theia_1 | root INFO [a14c370b-d027-4588-b64b-f8b64fe0368e] Load contributions of 0 plugins took: 0 ms
theia_1 | root ERROR Request getHostLogPath failed with error: EACCES: permission denied, mkdir '/home/theia/.theia/logs' Error: EACCES: permission denied, mkdir '/home/theia/.theia/logs'
theia_1 | root ERROR Request getHostStoragePath failed with error: EACCES: permission denied, mkdir '/home/theia/.theia/workspace-storage' Error: EACCES: permission denied, mkdir '/home/theia/.theia/workspace-storage'
theia_1 | root ERROR Failed to load plugins: Error: Request 'getHostLogPath' failed
theia_1 | at Proxy. (http://localhost:3000/bundle.js:14:738212)
theia_1 | at e. (http://localhost:3000/bundle.js:14:601008)
theia_1 | at http://localhost:3000/bundle.js:14:594274
theia_1 | at Object.next (http://localhost:3000/bundle.js:14:594379)
theia_1 | at http://localhost:3000/bundle.js:14:593291
theia_1 | at new Promise ()
theia_1 | at s (http://localhost:3000/bundle.js:14:593065)
theia_1 | at e.startPlugins (http://localhost:3000/bundle.js:14:600786)
theia_1 | at e. (http://localhost:3000/bundle.js:14:598359)
theia_1 | at http://localhost:3000/bundle.js:14:594274
theia_1 | root INFO [hosted-plugin: 80] PLUGIN_HOST(80) starting instance

https imports don't work in VSCode

A WDL can import another WDL over https, usually from raw.github.com. However, these imports aren't recognized properly by WDL DevTools, so any workflow with such an import throws an error such as Failed to import https://raw.githubusercontent.com/aofarrel/goleft-wdl/main/goleft_functions.wdl: [Errno 2] No such file or directory: '/aofarrel/goleft-wdl/main/goleft_functions.wdl'

Screenshot 2023-06-14 at 4 32 10 PM

This error also means running the WDL can't be done from the extension, even though it is a valid WDL as per Cromwell and miniwdl.
Screenshot 2023-06-14 at 4 37 28 PM

bug -- vscode -- keybinding for 'editor.action.codeAction' breaks "Find Previous" keybinding

Bug: Open the "find widget" (cmd+f), type whatever you want to search (that has multiple matches in the open file), hit enter a couple times. It will cycle forward through matches. Now hit shift+enter. Expected behavior: The match should cycle backward to the previous match ("Find Previous"). Actual behavior πŸ›: VS Code instead displays a mini-text pop-up saying "No code actions for 'wdl.run' available".

image

Cause: This behavior is caused by the very broad shift+enter keybinding to kick off a wdl.run code action. See here:

"key": "shift+enter",

Because "Find Previous" also uses shift+enter, these two conflict (there are also a lot of other possible conflicts, see the Keyboard Shortcuts page in VS Code and search for "shift enter"). I think because wdl-ide is an Extension, it gets precedence over the Default keybindings, so it always beats out "Find Previous". I could be wrong about the cause of precedence though: the Keyboard Shortcuts page allows you to "Sort by Precedence (Highest First)", and the above code action actually appears listed below Find Previous, but according to this issue [Extensions beat out Defaults] and this StackOverflow [You actually read precedence from bottom up in that table], I think the sort order has been flipped?

Proposed Solutions:

  • Set a when clause using editorLangId so the keybinding only applies when it's a WDL file.
  • Make it a more complicated, less commonly used keybinding (eg, shift+alt+enter) so less likely to overlap other Defaults
  • Set other when clauses that will help avoid matching Defaults (eg, ! findWidgetVisible)

Implement auto-completion

Currently, the MiniWDL package we're using to parse a WDL tree, validates it first. If we have "partial" input like during typing for auto-complete, it will be considered an "invalid" WDL and so it will not produce the tree to understand which context to apply the completion to.

One way to overcome this could be to not call MiniWDL upon a textDocument/completion request, but rather try to see if there's already a cached version of the tree (parsed by MiniWDL before the user started typing). If there's one, we could re-use it and understand which completion items to return back to the user, based on the cursor position in the document.

Additionally, whenever there's intent to auto-complete, we should "block" or "delay" automatic re-validation of the document (which happens every time the user "stops" typing for 500ms or more), so that we don't just display errors when the user expects something useful to return.

Another (more significant) limitation is that MiniWDL does not return "tree nodes" for every piece of WDL we'd like to auto-complete. So some syntax tokens will be entirely missed with this strategy. We could ask MiniWDL library owners to add those to the tree, but that could be quite a lot of work. I think we could start simple and see how much (if anything) needs to be amended.

Associating input.json with WDL Workflow Execution in VSCode

Platform: Archlinux (6.4.3-arch1-1) - x86_64 - GNU/Linux
WDL-IDE Client: Vscode (broadinstitute.wdl-devtools-0.0.77)
Vscode : 1.75.1 - 441438abd1ac652551dbe4d408dfcec8a499b8bf - x64

Dear developers,

First and foremost, I want to express my gratitude for providing this incredible tool!

I am currently exploring the possibility of executing a WDL workflow directly from VSCode, while utilizing an accompanying input.json file alongside the WDL script. Following the successful setup of a Cromwell server on my localhost (port 8000), I have been able to employ the "wdl.run" action (Shift-Alt-Enter) to submit the task I am currently editing within the VSCode editor window.

However, I am encountering difficulty in locating a method to associate an input.json file with the currently edited task. Is there a prescribed approach to achieve this functionality?

Best regards,

Parsing error with struct

Hi,

Ran into this issue which is causing some confusion during development. Consider the following contrived wdl, with two structs.

version 1.0

struct Exportable {
    String bucket
    String key
    Array[File] files
}

struct Exportable2 {
    String bucket
    String key
    File file
}

workflow wf {
    input {
        String bucket
        String key
        Array[File] files
    }

    Exportable e = {"bucket": bucket, "key": key, "files": files}
    Exportable2 e2 = {"bucket": bucket, "key": key, "file": files[0]}

    call do {
        input:
            items = [e]
    }
}

task do {
    input {
        Array[Exportable] items
    }

    command <<< >>>
}

I get a linting error when the struct has an Array[File] property, but not when it's just File, as below.

image

Thanks for taking a look!

WDL DevTools on Visual Studio Code not usable on Windows 10

WDL DevTools (0.0.77) on Visual Studio Code fails on Windows 10 due to fcntl not being available on Windows.

  • WDL DevTools Version: 0.0.77
  • Visual Studio Code: 1.63.0
  • Edition Windows 10 Pro
  • Version 21H2
  • Installed on β€Ž06.β€Ž10.β€Ž2020
  • OS build 19044.1387
  • Experience Windows Feature Experience Pack 120.2212.3920.0
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\priit.paluoja\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\wdl_lsp\__main__.py", line 21, in <module>
    from .server import server
  File "C:\Users\priit.paluoja\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\wdl_lsp\server.py", line 54, in <module>
    import WDL
  File "C:\Users\priit.paluoja\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\WDL\__init__.py", line 15, in <module>
    from . import _util, _parser, Error, Type, Value, Env, Expr, Tree, Walker
  File "C:\Users\priit.paluoja\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\WDL\_util.py", line 11, in <module>
    import fcntl
ModuleNotFoundError: No module named 'fcntl'
[Info  - 10:22:01] Connection to server got closed. Server will restart.

WDL Devtools for VSCode rendering non-breaking whitespace causing errors

Hi,

thank you for the plugin. It is very useful. However, since I have started using OneDrive for business (which has whitespaces on the name), files cannot be found because the whitespaces are replaced with %20 (or 20%). I am using it on MacOS, but had to unable it, unfortunately. It would be great if that can be fixed.

Best wishes,
Mariana

Need to be able to set project base for imports

Using this within Visual Source Code

Within my VSC root directory I have 4 projects: Pipeline, Utils, Upload, and Download

I am required to have the import path of the files in pipeline be Pipeline/src/wdl/...
If I import a file from Utils its path is Utils/src/wdl/...

So far as this tool is concerned, none of my imports are valid, so utilities like "Show Definition" do not work.

I need a parameter I can set in the .env files that lets me tell the WDL tools where the project base (or bases) is for imports

Docker 19.03 issue

Hi!

Thank you for this work. It really helps writing good WDL workflows.

I think you docker-compose needs an update, adding an environment variable to disable TLS validation as described here.

I'm using with VScode and works fine. Wishing for auto-complete for ease access to task outputs.

root ERROR Faild to initialize global state path: Error: EACCES: permission denied

I run " docker-compose up", but get the following error message:
root ERROR Faild to initialize global state path: Error: EACCES: permission denied, mkdir '/home/theia/.theia/plugin-storage'
theia_1 | root INFO [4128146c-76b0-47af-a84d-a8a6ace635f5][vscode.docker]: Disconnected.
theia_1 | terminal ERROR Couldn't attach - can't find terminal with id: 0
theia_1 | terminal ERROR Error attaching to terminal id 0, the terminal is most likely gone. Starting up a new terminal instead.

heia_1 | root ERROR Request getHostLogPath failed with error: EACCES: permission denied, mkdir '/home/theia/.theia/logs' Error: EACCES: permission denied, mkdir '/home/theia/.theia/logs'
theia_1 | root ERROR Request getHostStoragePath failed with error: EACCES: permission denied, mkdir '/home/theia/.theia/workspace-storage' Error: EACCES: permission denied, mkdir '/home/theia/.theia/workspace-storage'
theia_1 | root ERROR Failed to load plugins: Error: Request 'getHostLogPath' failed

how can I handle this error? Thanks very much.

GA4GH WES Backend support

Can wdl-ide support the GA4GH WES Backend as a Cromwell Backend for remotely execute WDL script from VS Code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.