-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
nixpy style values and printing #313
Merged
Merged
Conversation
This file contains 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
jgrewe
approved these changes
Nov 23, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?)
# for free
to join this conversation on GitHub.
Already have an account?
# 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 bothSection
andProperty
are now similar to the nixpy style.Section.__repr__
also features the immediate childProperty
count next to the childSection
count.pprint
methods have been added to bothSection
andProperty
.Adding of 'Property.values' and deprecation of 'Property.value'
To make working with odML and nixpy more similar, the
Property.value
attribute has been marked deprecated and theProperty.values
attribute has been added. This is a significant change, sinceProperty
attributes 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.values
is now mapped via theProperty
format tovalue
on saving and back on loading similar to the handling ofProperty.dependency_value
orProperty.oid
.All the tests and documentation have been checked and updated, since this is quite a significant change and touches the
Property
format and all parsers.