nixpy style values and printing#313
Merged
Merged
Conversation
jgrewe
approved these changes
Nov 23, 2018
Member
jgrewe
left a comment
There was a problem hiding this comment.
lgtm,
the only thing I was wondering about is the e.g "section[0/5]" notation. On first glance it looked to me as if this indicates section number 0 of 5... which does not make sense.
I do not have a better idea, though (maybe the pipe?)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims to make working with odml and the odml part of nixpy more similar and closes #308 and #309.
Updates in printing Sections and Properties
__repr__of bothSectionandPropertyare now similar to the nixpy style.Section.__repr__also features the immediate childPropertycount next to the childSectioncount.pprintmethods have been added to bothSectionandProperty.Adding of 'Property.values' and deprecation of 'Property.value'
To make working with odML and nixpy more similar, the
Property.valueattribute has been marked deprecated and theProperty.valuesattribute has been added. This is a significant change, sincePropertyattributes are serialized to and from a file when saving / loading to any of the supported file formats.Since I did not want any changes in the file format itself,
Property.valuesis now mapped via thePropertyformat tovalueon saving and back on loading similar to the handling ofProperty.dependency_valueorProperty.oid.All the tests and documentation have been checked and updated, since this is quite a significant change and touches the
Propertyformat and all parsers.