#32 make metadata be ordered "prettier" when dumped
Closed by ralph. Opened by nphilipp.
nphilipp/modulemd master--pretty  into  master

Download 32.patch

If the pyaml package is installed, use that and OrderedDict objects so
that the generated modulemd document has a defined order with e.g.
'document' and 'version' nodes at the top.

Require 'modulemd[pretty]' to pull in the pyaml package automatically.

rebased

Hmm, if I understand it correctly, this will keep things ordered by how we populate the structures in loads, not how it was laid out in the original file. Is that really useful?

@nphilipp, any response to @psabata's question?

(Also, we have merge conflicts now.)

@threebean, sorry for the late response. I filtered pagure mails into their own folders and didn't notice it before @psabata reminded me on IRC.

Hmm, if I understand it correctly, this will keep things ordered by how we populate the structures in loads, not how it was laid out in the original file. Is that really useful?

It was a "quick and dirty" shot at it which resembles the order of elements in spec.yaml. A more clean version should preserve the order of elements as found in a file, and append new elements to the end (of their parent). Probably needs some convenience method(s) to create a new modulemd document in the "expected" order?

@nphilipp this still needs a rebase against master before it could be merged.

That aside, I'm just feel neutral about this one. Would it solve a problem you're facing? ... or just an annoyance?

OK, closing this for now to get it out of the review queue.

Please re-open/re-submit if there is need.

Pull-Request has been closed by ralph

Metadata