Regular DRP processing of LAM and Subaru data (PIPE2D-423)

[PIPE2D-639] Restructure YAML inputs to conform to the YAML specification Created: 01/Oct/20  Updated: 13/Jan/22  Resolved: 06/Oct/20

Status: Done
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Sub-task Priority: Normal
Reporter: sogo.mineo Assignee: sogo.mineo
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: 2DDRP-2019 E, 2DDRP-2021 A, 2DDRP-2021 A 2
Reviewers: price

 Description   

The current YAML structure is:

calibBlocks:
  blockA:
    ...
  blockB:
    ...

where blockA and blockB are free-format names for blocks. We expect that blockA is done before blockB. The weekly test relies on this behavior.

In fact, Python's dict type preserves the order of items, and pyyaml preserves the order of items in the YAML file (with an option)

However, YAML specification says a mapping is unordered.
https://yaml.org/spec/1.2/spec.html#id2765608

To serialize a mapping ... This order ... should not be used ... for the preservation of application data). In every case where node order is significant, a sequence must be used.

The above structure should have been:

calibBlocks:
  -
    name: blockA
    ...
  -
    name: blockB
    ...


 Comments   
Comment by sogo.mineo [ 02/Oct/20 ]

I made this change. Please see YAML files in examples/ for how the structure changed.

Comment by price [ 06/Oct/20 ]

I made a few trivial comments on the GitHub PR.

Comment by sogo.mineo [ 06/Oct/20 ]

Thanks for review. I made changes according to the comments and merged this branch to master.

For the comment "{key: value [LF] for key, value in iterable [LF] if key != 'name'} is not easily readable" I removed the linefeed before "if", to clarify that this is a comprehension--though I have no idea whether this modification is effective.

Generated at Sat Feb 10 15:55:42 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.