broadinstitute / HydrantFC

Repository for the FireCloud version of Hydrant (currently in alpha testing)
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

default JSON generated by validate is, oops, invalid #21

Closed noblem closed 6 years ago

noblem commented 6 years ago

This sequence of commands

%   hydrant init new
%   cd new
%   hydrant validate

2018-02-13 12:35:58::INFO  Writing tests/inputs.json

%  python -c 'import json; json.load(open("tests/inputs.json"))'

yields

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 291, in load
    **kw)
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python/2.7.12_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 380, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting , delimiter: line 4 column 3 (char 71)

In this case of the simplest, most vanilla workflow, the 2 syntactic errors are: Line 2: "new.package": "Boolean" does not end with a comma Line 7: "new.new_task_1.num_preemptions": "(optional) Int?", ends with comma, but shouldn't

noblem commented 6 years ago

See #20

dheiman commented 6 years ago

Fixed in #25