|
| 1 | +# Viash 0.2.2 (2020-09-22): Generation of placeholder code now possible without VIASH START and VIASH END |
| 2 | + |
| 3 | +Allow generating placeholder without VIASH START/VIASH END blocks. |
| 4 | + |
| 5 | +A script does not need to contain a `VIASH START`/`VIASH END` block in order to function. |
| 6 | + |
| 7 | +Previously, each script had to contain a codeblock as follows: |
| 8 | + |
| 9 | + ```r |
| 10 | + ## VIASH START |
| 11 | + par <- list( |
| 12 | + input = "foo", |
| 13 | + output = "bar |
| 14 | + ) |
| 15 | + ## VIASH END |
| 16 | + ``` |
| 17 | +
|
| 18 | +## MINOR CHANGES |
| 19 | +
|
| 20 | +* Allow generating placeholder without VIASH START/VIASH END blocks. |
| 21 | +
|
| 22 | +## BUG FIXES |
| 23 | +
|
| 24 | +* `viash ns build`: Some platforms would sometimes not be detected. |
| 25 | +* `viash run`: Avoid error when no arguments need to be chowned. |
| 26 | +
|
| 27 | +# Viash 0.2.1 (2020-09-11): Docker chown by default |
| 28 | +
|
| 29 | +## Docker chown by default |
| 30 | +
|
| 31 | +Running a script using a Docker platform will now chown output files by default, as well as any temporary files. You can turn off this feature by specifying `chown: false` in the yaml of a Docker platform. |
| 32 | +
|
| 33 | +## [NXF] Data references |
| 34 | +
|
| 35 | +Data references in Map form can now have values being lists. In other words, we can have multiple options which have one or more values. |
| 36 | +
|
| 37 | +## viash ns build -P docker --parallel --setup |
| 38 | +
|
| 39 | +`viash ns build` has been greatly improved! You can automatically build the docker container by adding `--setup` to the command, as well as make the whole thing run in parallel using the `--parallel` or `-l` flag. |
| 40 | +
|
| 41 | +To build a docker container, you can run either of the following: |
| 42 | +
|
| 43 | + ```bash |
| 44 | + viash run -f path/to/config.yaml -P docker -- ---setup |
| 45 | + viash build -f path/to/functionality.yaml -P docker -o target/docker/path/to --setup |
| 46 | + ``` |
| 47 | +
|
| 48 | +Note that the first will only build the docker container, whereas the second will build the executable and then build the docker container. |
| 49 | +
|
| 50 | +To build a lot of them all at once, run: |
| 51 | +
|
| 52 | + ```bash |
| 53 | + viash ns build -P docker --parallel --setup |
| 54 | + ``` |
| 55 | +
|
| 56 | +## Custom order of platform requirements |
| 57 | +
|
| 58 | +You can now choose the order in which platform requirements are installed! |
| 59 | +
|
| 60 | +Before: |
| 61 | +
|
| 62 | + ```yaml |
| 63 | + type: docker |
| 64 | + image: rocker/tidyverse |
| 65 | + target_image: "viash_test/r" |
| 66 | + r: |
| 67 | + cran: |
| 68 | + - optparse |
| 69 | + github: |
| 70 | + - dynverse/dynutils@devel |
| 71 | + bioc: |
| 72 | + - limma |
| 73 | + apt: |
| 74 | + packages: |
| 75 | + - libhdf5-serial-dev |
| 76 | + docker: |
| 77 | + build_arg: |
| 78 | + - GITHUB_PAT="$GITHUB_PAT" |
| 79 | + run: |
| 80 | + - git clone --depth 1 https://github.com/data-intuitive/viash_docs.git && rm -r viash_docs/.git |
| 81 | + ↑ in which order will these three components be run? Who knows! |
| 82 | + ``` |
| 83 | +
|
| 84 | +Now: |
| 85 | +
|
| 86 | + ```yaml |
| 87 | + type: docker |
| 88 | + image: rocker/tidyverse |
| 89 | + target_image: "viash_test/r" |
| 90 | + setup: |
| 91 | + - type: docker |
| 92 | + build_arg: |
| 93 | + - GITHUB_PAT="$GITHUB_PAT" |
| 94 | + - type: apt |
| 95 | + packages: |
| 96 | + - libhdf5-serial-dev |
| 97 | + - type: r |
| 98 | + cran: |
| 99 | + - optparse |
| 100 | + - dynutils |
| 101 | + github: |
| 102 | + - rcannood/princurve@devel |
| 103 | + bioc: |
| 104 | + - limma |
| 105 | + - type: docker |
| 106 | + run: |
| 107 | + - git clone --depth 1 https://github.com/data-intuitive/viash_docs.git && rm -r viash_docs/.git |
| 108 | + ``` |
| 109 | +
|
| 110 | +This will ensure that the setup instructions are installed in the given order. |
| 111 | +
|
| 112 | +## NEW FEATURES |
| 113 | +
|
| 114 | +* `NXF`: Data references in Map form can now have values being lists. In other words, we can have multiple options which have one or more values. |
| 115 | +* `viash ns build`: Added --parallel and --setup flag. |
| 116 | +* `viash build`: Added --setup flag. |
| 117 | +* Allow changing the order of setup commands using the `setup:` variable. |
| 118 | +* (HIDDEN) Do not escape `${VIASH_...}` elements in default values and descriptions! |
| 119 | +
|
| 120 | +## MINOR CHANGES |
| 121 | +
|
| 122 | +* Remove `---chown` flag, move to `platform.docker.chown`; is set to true by default. |
| 123 | +* Perform chown during both run and test using a Docker platform. |
| 124 | +
|
| 125 | +## BUG FIXES |
| 126 | +
|
| 127 | +* Issue trying to parse positional arguments even when none is provided. |
| 128 | +
|
| 129 | +# Viash 0.2.0 (2020-09-01): Autoresolve docker paths |
| 130 | +
|
| 131 | +## Changes to functionality metadata |
| 132 | +
|
| 133 | +- Added version attribute |
| 134 | +
|
| 135 | +### Autoresolve docker paths |
| 136 | +
|
| 137 | +Arguments of type: file are processed to automatically create a mount in docker. More specifically, when you pass an argument value: `--input /path/to/file`, this will be processed such that the following parameters are passed to docker: |
| 138 | +
|
| 139 | + ```bash |
| 140 | + docker run -v /path/to:/viash_automount/path/to ... --input /viash_automount/path/to/file |
| 141 | + ``` |
| 142 | +
|
| 143 | +If, for some reason, you need to manually specify a mount, you can do this with `---mount /path/to/mount:/mymount`. |
| 144 | +
|
| 145 | +### Argument multiplicity |
| 146 | +
|
| 147 | +For all parameter types (except for `boolean_true` and `boolean_false`), you can specify `multiple: true` in order to turn this argument into an array-based argument. What this does is allow you to pass multiple values for this argument, e.g. `--input file1 --input file2 --input file3:file4:file5`. |
| 148 | +
|
| 149 | +The default separator is `:` but this can be overridden by changing the separator by setting it to `multiple_sep: ";"` (for example). |
| 150 | +
|
| 151 | +### New format |
| 152 | +
|
| 153 | +Viash now supports placing the functionality.yaml, platform*.yaml(s) and script into a single file. For example, this could be a merged script.R: |
| 154 | +
|
| 155 | + ```r |
| 156 | + #' functionality: |
| 157 | + #' name: r-estimate |
| 158 | + #' arguments: ... |
| 159 | + #' platforms: |
| 160 | + #' - type: native |
| 161 | + #' - type: docker |
| 162 | + #' image: rocker/tidyverse |
| 163 | + library(tidyverse) |
| 164 | + cat("Hello world!\n") |
| 165 | + ``` |
| 166 | +
|
| 167 | +Instead of running: |
| 168 | +
|
| 169 | + ```bash |
| 170 | + viash run -f functionality.yaml -p platform_docker.yaml -- arg1 |
| 171 | + ``` |
| 172 | +
|
| 173 | +With this format, you can now run: |
| 174 | +
|
| 175 | + ```bash |
| 176 | + viash run script.R # run script.R with the first platform |
| 177 | + viash run -P docker script.R # run script.R with the platform called 'docker' with the large P argument |
| 178 | + # use small p to override the platform with a custom yaml: |
| 179 | + viash run -p common_resources/platform_docker.yaml script.R |
| 180 | + # note that any arguments for the run command (e.g. -p or -P) should come before the script.R, as script.R is considered a trailing argument. |
| 181 | + ``` |
| 182 | +
|
| 183 | +## NEW FEATURES |
| 184 | +
|
| 185 | +* Allow (optional) version attributes in `functionality.yaml` and `platform.yaml`. |
| 186 | +* Allow testing a component with the `viash test` functionality. Tests are executed in a temporary directory on the specified platform. The temporary directory contains all the resource and test files. |
| 187 | +* `viash --version`: Add flag for printing the version of viash. |
| 188 | +* Allow fetching resources from URL (http:// and https://) |
| 189 | +* Allow retrieving functionality and platform YAMLs from URL. |
| 190 | +* For docker containers, autoresolve path names of files. Use `---v path:path` or `---volume path:path` to manually mount a specific folder. |
| 191 | +* Implement parameter multiplicity. |
| 192 | + Set `multiple: true` to denote an argument to have higher multiplicity. |
| 193 | + Run `./cmd --foo one --foo two --foo three:four` in order for multiple values to be added to the same parameter list. |
| 194 | +* Added a new format for defining functionality in which the user passes the script in which the functionality and platforms are listed as yaml headers. |
| 195 | +* A `---chown` flag has been added to Docker executables to automatically change the ownership of output files to the current user. |
| 196 | +* `viash ns build`: A command for building a whole namespace. |
| 197 | +* `NXF`: Join operations are now fully supported by means of `multiple`. |
| 198 | +* `NXF`: Modules that perform joins can take either arrays (multiple input files or the same type to be joined) or hashes (multiple input files passed using different options on the CLI). Please refer to the docs for more info. |
| 199 | +
|
| 200 | +## MAJOR CHANGES |
| 201 | +
|
| 202 | +* Remove passthrough parameters. |
| 203 | +* Since CLI generation is now performed in the outer script, `viash pimp` has been deprecated. |
| 204 | +* Write out meta.yaml containing viash run information as well as the original `functionality.yaml` and `platform.yaml` content. |
| 205 | +* Renamed `viash export` to `viash build`. |
| 206 | +
|
| 207 | +## MINOR CHANGES |
| 208 | +
|
| 209 | +* `viash run` and `viash test`: Allow changing the temporary directory by defining `VIASH_TEMP` as a environment variable. Temporary directories are cleaned up after successful executions. |
| 210 | +* `viash run` and `viash test`: Exit(1) when execution or test fails. |
| 211 | +* `viash build`: Add -m flag for outputting metadata after build. |
| 212 | +* `viash run`: Required parameters can have a default value now. Produce error when a required parameter is not passed, even when a default is provided. |
| 213 | +* `NXF`: _Modules_ are now stored under `target/nextflow` by default |
| 214 | +
|
| 215 | +## BUG FIXES |
| 216 | +
|
| 217 | +* `NXF`: Correctly escape path variable when running NXF command. |
| 218 | +* `NXF`: Surround parameters with quotes when running NXF command. |
| 219 | +
|
| 220 | +## INTERNAL CHANGES |
| 221 | +
|
| 222 | +* Move CLI from inner script to outer script. |
| 223 | +* Renamed Target to Platform |
| 224 | +* Renamed Environment to Requirements |
0 commit comments