Yaml Command Line Validator Tool

The Yaml Command Line Validator Tool is used to verify that a .dockstore.yml file is valid for use in Dockstore and that all referenced files are present.

I want to use the yaml (.dockstore.yml) validation tool.

https://docs.dockstore.org/en/develop/advanced-topics/dockstore-cli/yaml-command-line-validator-tool.html#usage

dockstore yaml validate --path directory/of/.dockstore.yml

However, I don’t see the dockstore yaml command with the dockstore CLI on my Fedora Linux 36. Could you tell me how to use it? Thank you.

$ java --version
openjdk 17.0.4 2022-07-19
OpenJDK Runtime Environment (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8, mixed mode, sharing)

$ dockstore --version
Current version : 1.12.0
You have the most recent stable release.
If you wish to upgrade to the latest unstable version, please use the following command:
   dockstore --upgrade-unstable
Dockstore version 1.12.0
You are running the latest stable version...
If you wish to upgrade to the latest unstable version, please use the following command:
   dockstore --upgrade-unstable
$ ls .dockstore.yml 
.dockstore.yml

$ dockstore yaml validate --path .
Current version : 1.12.0
You have the most recent stable release.
If you wish to upgrade to the latest unstable version, please use the following command:
   dockstore --upgrade-unstable
20:01:50.647 [main] ERROR io.dockstore.client.cli.ArgumentUtility - dockstore: yaml is not a dockstore command. See 'dockstore --help'.

Edit: Perhaps the commit Feature/dock 2129/yaml file check (#161) · dockstore/dockstore-cli@033e5b7 · GitHub available from the version 1.13.0-rc.0 enables the dockstore yaml command?

I found a tool to validate only a WDL file, as it is not an alternative of the dockstore yaml validate command.

$ wget https://github.com/broadinstitute/cromwell/releases/download/84/womtool-84.jar
$ java -jar womtool-84.jar validate /path/to/something.wdl

Hi,
The develop documentation refers to 1.13 which we’re currently working on and has not officially been released. You can experiment with the jar from https://artifacts.oicr.on.ca/artifactory/webapp/#/artifacts/browse/tree/General/collab-release/io/dockstore/dockstore-client/1.13.0-rc.0/dockstore-client-1.13.0-rc.0-shaded.jar but this isn’t officially supported.

Thanks!

Though I am not sure the difference between dockstore-client-1.13.0-rc.0.jar and dockstore-client-1.13.0-rc.0-shaded.jar there. I will try to run the dockstore-client-1.13.0-rc.0.jar from the dockstore shell script.

You want the shaded one actually. That said, I’ve uploaded the files in Releasing the dockstore CLI version 1.13.0-rc.0 - #2 by dyuen so you should be able to use the --upgrade-unstable command

Yeah, when I just only put the dockstore-client-1.13.0-rc.0.jar to the ~/.dockstore/self-installs/ and modified the dockstore shell script a bit manually, I saw a kind of runtime error by

$ bash -x ./dockstore-1.13.0-rc.0
...
+ java io.dockstore.client.cli.Client
Error: Unable to initialize main class io.dockstore.client.cli.Client

Thanks! Yes, tried it now, and works very well!

$ dockstore --upgrade-unstable

$ dockstore --version
Dockstore version 1.13.0-rc.0
The latest stable version is 1.12.0
You are currently on the latest unstable version. If you wish to upgrade to the latest stable version, please use the following command:
   dockstore --upgrade-stable

$ cd /path/to/directory

$ dockstore yaml validate --path .
./.dockstore.yml is a valid yaml file
./.dockstore.yml is a valid dockstore yaml file and all required files are present

$ echo $?
0
1 Like