Floor, Round and Ceil docs #121

Merged
merged 1 commit into from Jun 30, 2017
Jump to file or symbol
Failed to load files and symbols.
+10 −0
Split

Floor, Round and Ceil docs

commit 055232a34987b6c9fb4c3b5848f38875ce818133 @cjllanwarne cjllanwarne committed Jun 30, 2017
View
10 SPEC.md
@@ -102,6 +102,7 @@
* [Array\[X\] select_all(Array\[X?\])](#arrayx-select_allarrayx)
* [Boolean defined(X?)](#boolean-definedx)
* [String basename(String)](#string-basenamestring)
+ * [Int floor(Float), Int ceil(Float) and Int round(Float)](#int-floorfloat-int-ceilfloat-and-int-roundfloat)
* [Data Types & Serialization](#data-types--serialization)
* [Serialization of Task Inputs](#serialization-of-task-inputs)
* [Primitive Types](#primitive-types)
@@ -2640,6 +2641,15 @@ This function will return `false` if the argument is an unset optional value. It
- This function returns the basename of a file path passed to it: `basename("/path/to/file.txt")` returns `"file.txt"`.
- Also supports an optional parameter, suffix to remove: `basename("/path/to/file.txt", ".txt")` returns `"file"`.
+## Int floor(Float), Int ceil(Float) and Int round(Float)
+
+:pig2: [Supported in Cromwell 28](https://github.com/broadinstitute/cromwell#wdl-support) :white_check_mark:
@geoffjentry

geoffjentry Jun 30, 2017

Member

This is a departure from Cromwell Supported everywhere else. I get why you're doing this, but I don't think it's necessary. Other features are only supported in version > x but don't get the same text.

@mcovarr

mcovarr Jun 30, 2017

Contributor

Users have explicitly asked for this. Up to now our docs have just said something works, but when users go to FireCloud it might not because FC may be a version behind.

@geoffjentry

geoffjentry Jun 30, 2017

Member

So how do we handle a situation where behavior changes between two versions, e.g. write_x?

@geoffjentry

geoffjentry Jun 30, 2017

Member

Also I'd suggest that the wdl spec shouldn't be the ultimate source of "what can I do in FC", but that's neither here nor there

@geoffjentry

geoffjentry Jun 30, 2017

Member

Although I suppose that since supposedly we're both going to formalize the spec (which I don't understand why it'd have cromwell stuff in it at all at that point) and better wdl docs over the next couple of months I don't care that much.

whether or not I believe that'll be reality is another matter :)

@cjllanwarne

cjllanwarne Jun 30, 2017

Contributor

Hmm, this is actually copypasta. Whether Cromwell supports belongs in a spec is another issue but since it's here at all. I think that saying which version adds value.

+
+- These functions convert a Float value into an Int by:
+ - floor: Round **down** to the next lower integer
+ - ceil: Round **up** to the next higher integer
+ - round: Round to the nearest integer based on standard rounding rules
+
# Data Types & Serialization
:pig2: [Cromwell supported](https://github.com/broadinstitute/cromwell#wdl-support) :white_check_mark: