kbase / kb_sdk

Build and test new apps for the KBase platform
http://kbase.github.io/kb_sdk_docs
MIT License
27 stars 32 forks source link

Add output name suffix list to spec.json #364

Open MrCreosote opened 3 years ago

MrCreosote commented 3 years ago

The narrative front end detects that an app's output will clobber existing data in the narrative by comparing the output object name to data already in the narrative. However, some apps take the output object name and append to it, breaking the warning mechanism. An example is import_genbank_as_genome_from_staging, which appends something like _genome and _assembly to its output objects.

Add a field to text_options in spec.json that is only legal when is_output_name is true that allows specifying the suffixes the app uses for the objects it creates (including the empty string if it uses the name directly as well as suffixes). The front end can then check all the permutations of the output name for collisions.

Example spec for an output name: https://github.com/kbaseapps/kb_uploadmethods/blob/master/ui/narrative/methods/import_fastq_noninterleaved_as_reads_from_staging/spec.json#L96