rose icon indicating copy to clipboard operation
rose copied to clipboard

metadata fail-if not working as expected in rose edit

Open wxtim opened this issue 1 year ago • 1 comments

As described by @kaday (to whom many thanks for boiling it down to the toy example below):

The following rose config

#!/bin/bash

SRC=$(mktemp -d)

cat > "${SRC}/rose-suite.conf" <<__ICI__
[template variables]
DATE_END=20211203
DATE_START=20211202

__ICI__

mkdir "${SRC}/meta"

cat > "${SRC}/meta/rose-meta.conf" <<__ICI__
[template variables=DATE_END]
compulsory=false
description=Set end date of trial, YYYYMMDD format.
sort-key=a-03
type=integer
fail-if=this > 0 and this <= template variables=DATE_START;
ns=Control
help=This is the end date of the data you wish to plot

[template variables=DATE_START]
compulsory=true
description=Set start date of trial, YYYYMMDD format.
sort-key=a-02
type=integer
ns=Control
help=This is the start date of the data you wish to plot

__ICI__

tree "${SRC}"

rose metadata-check -C "${SRC}/meta"

Results in an unexpected failure:

[V] rose.metadata_check.MetadataChecker: issues: 1
    template variables=DATE_END=fail-if=this > 0 and this <= template variables=DATE_START;
        Not found: variables=DATE_START

wxtim avatar Apr 16 '24 08:04 wxtim

Likely a duplicate of https://github.com/metomi/rose/issues/2737

oliver-sanders avatar Apr 16 '24 08:04 oliver-sanders

Closing as a duplicate of #2737

oliver-sanders avatar May 23 '24 10:05 oliver-sanders