Skip to content

Commit 5602399

Browse files
authored
Merge pull request #850 from viash-io/feature/split_changelogs
Feature/split changelogs
2 parents e91a154 + 1a20b1d commit 5602399

14 files changed

Lines changed: 2736 additions & 2743 deletions

.github/workflows/prep_release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ jobs:
3939
id: get_version
4040
run: |
4141
viash_version=$(bin/viash --version | cut -d ' ' -f 2)
42+
viash_minor_version=$(echo $viash_version | cut -d. -f1,2)
4243
echo "Detected Viash version: $viash_version"
44+
echo "Detected Viash minor version: $viash_minor_version"
4345
echo "viash_version=$viash_version" >> "$GITHUB_OUTPUT"
4446
4547
# fetch relevant changelog section
46-
changelog_section=$(awk "/# Viash ${viash_version}.*/{flag=1;next}/^# /{flag=0}flag" CHANGELOG.md)
48+
changelog_section=$(awk "/# Viash ${viash_version}.*/{flag=1;print;next}/^# /{flag=0}flag" CHANGELOGS/CHANGELOG_${viash_minor_version}.md)
4749
4850
echo "changelog_section<<GITHUB_EOF" >> "$GITHUB_OUTPUT"
4951
echo "$changelog_section" >> "$GITHUB_OUTPUT"

CHANGELOG.md

Lines changed: 0 additions & 2740 deletions
This file was deleted.

CHANGELOGS/CHANGELOG_0.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Viash 0.0.1 (2020-05-05): Initial release
2+
3+
* Initial proof of concept.

CHANGELOGS/CHANGELOG_0.1.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Viash 0.1.0 (2020-05-14): Changes to functionality and the native/docker platforms
2+
3+
## Changes to functionality.yaml
4+
5+
* ftype has been renamed to function_type. The value for this field is also being checked.
6+
* platform has been removed.
7+
* Instead, the first resource listed is expected to have `type: r_script`, `type: bash_script`, `type: python_script`, or `type: executable`. The other resources are expected to have `type: file` by default, and are left untouched by Viash.
8+
* in the arguments, field `flagValue` has been removed. Instead, use `type: boolean_true` and `type: boolean_false` to achieve the same effect.
9+
10+
## Changes to platform_(docker/native).yaml
11+
12+
* The `r: packages:` field has been renamed to `r: cran:`.
13+
14+
## MAJOR CHANGES
15+
16+
* Refactoring of the Functionality class as discussed in VIP1 (#1). This has resulted in a lot of internal changes, but the changes with regard to the yaml definitions are relatively minor. See the section below for more info.
17+
18+
## MINOR CHANGES
19+
20+
* Updated the functionality.yamls under `atoms/` and `src/test/` to reflect these aforementioned changes.
21+
* Allow for bioconductor and other repositories in the R environment.
22+
* Add support for pip versioning syntax.
23+
24+
## BUG FIXES
25+
26+
* Do not quote passthrough flags.
27+
* Allow for spaces inside of Docker volume paths.
28+
29+
## DOCUMENTATION
30+
31+
* Updated the README.md.
32+
* Provide some small examples at `doc/examples`.

CHANGELOGS/CHANGELOG_0.10.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Viash 0.x.x (yyyy-MM-dd): TODO Add title
2+
3+
TODO add summary
4+
5+
## NEW FEATURES
6+
7+
* `Nextflow` runner: specifying a non-existent argument as a hashmap key for `fromState` and `toState` now raises an error (PR #793).
8+
9+
* `config run`: Add option to run a component using a package bundle downloaded from ViashHub (PR #816).
10+
This allows for running a component without having to build it first.
11+
Example: `viash run vsh://toolbox@v0.1.0/yq -- --input input.yaml --output output.yaml`.
12+
13+
14+
## BREAKING CHANGES
15+
16+
* `Nextflow` runner: remove deprecated `map`, `mapId`, `mapData`, `mapPassthrough` and `renameKeys` arguments (PR #792).
17+
18+
* `Nextflow` runner: remove helper functions: `setWorkflowArguments`, `getWorkflowArguments`, `strictMap`, `passthroughMap`, `passthroughFlatMap`, `passthroughFilter`, `channelFromParams`, `runComponents` (PRs #792, #811).
19+
20+
* Remove deprecated functionality `functionality` and `platforms` (PR #832).
21+
22+
## BUG FIXES
23+
24+
* `NextflowRunner`: Automatically convert integers to doubles when argument type is `double` (port of PR #824, PR #825).
25+
26+
## MINOR FIXES
27+
28+
* `Executable`: Add more info to the --help (PR #802).

CHANGELOGS/CHANGELOG_0.2.md

Lines changed: 224 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
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

Comments
 (0)