NOAA-GFDL / fre-workflows

Code to generate, describe, validate, and configure scientific workflows within the FRE software framework
2 stars 3 forks source link

pp_chunk_b can't be parsed as an ISO8601 datetime if it's in single quotes #22

Closed uwagura closed 1 week ago

uwagura commented 2 weeks ago

For some reason, the validator will not parse pp_chunk_b as an ISO8601 date time unless it's passed in as double quotes instead of single quotes. It doesn't seem to have any issues with pp_chunk_a or history_segment being passed in as single quotes. The only difference that I can see between these two is that we call strip('\"') for pp_chunk_b and strip('\'\"') for pp_chunk_a: https://github.com/NOAA-GFDL/fre-workflows/blob/c18dedd918a09fef11a24ffcab692ab8d86a3e7b/meta/lib/python/macros/chunkcheck.py#L81

I've tried several different combinations of inputs to strip, none of which have made pp_chunk_b parsable with single quotes. If we plan on single quoting everything, we may want to look into this

ceblanton commented 2 weeks ago

Thanks! I recall struggling with Rose quoting and not really solving it. Why can't we use single and double quotes interchangeably?

Would stripping both types of quoting get past this?

uwagura commented 2 weeks ago

@ceblanton , I tried changing the strip function to strip('\'\"'), and this did not fix the problem, even though this is the format used for pp_chunk_a and history_segment.