mintproject / wcm

WINGS Component Manager
Apache License 2.0
1 stars 2 forks source link

Not possible to upload component without data #12

Closed dgarijo closed 4 years ago

dgarijo commented 4 years ago

According to Chris, data must always be specified. This is should not be mandatory, as we may not know it.

Cmheidelberg commented 4 years ago

This should be fixed now. You no longer need a data file to be uploaded with the yaml. Here's an example of a working yaml

name: HAND
version: '1'
schemaVersion: 0.0.1
wings:
  inputs:
  - role: stream-threshold
    prefix: -p1
    isParam: true
    type: http://www.w3.org/2001/XMLSchema#integer
    dimensionality: 0
    paramDefaultValue: 100
  - role: input-dem
    prefix: -i1
    isParam: false
    type: dcdom:raster-dem
    dimensionality: 0
  outputs:
  - role: distance-down
    prefix: -o1
    isParam: false
    type: dcdom:raster-distancedown
    dimensionality: 0
  rules: []
  inheritedRules: []
  documentation: hyd Model
  requirement:
    storageGB: 0.0
    memoryGB: 0.0
    need64bit: false
    softwareIds: []
  componentType: Hydrological
  files:
  - src\*
  data:
    raster-dem:
      files: []
    raster-distancedown:
      files: []

It will also work without files: [] being under each data field ie: this is also a valid way to write the data

  data:
    raster-dem:
    raster-distancedown:
Cmheidelberg commented 4 years ago

Additionally if you don't want to specify any form of data you can remove the data: field entirely. Data type: still needs to be specified for input and outputs though.