Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort and order #290

Merged
merged 12 commits into from
Jun 29, 2018
Merged

Sort and order #290

merged 12 commits into from
Jun 29, 2018

Conversation

mpsonntag
Copy link
Contributor

This PR mainly introduces a SmartList.sort method and adds specific comparison magic methods to the SmartList.

  • Adds SmartList.sort(). By default Document and Section child lists will retain the order in which child elements were added, but now a sort by name can be manually triggered.
  • Adds SmartList comparison magic methods to partially address Comparison of odml objects #265. The introduction of the RDF backend led to an issue when comparing odML entities. The used RDF library rdflib does not respect child order upon loading of a file, odML entities with children can not be compared without sorting the child elements. The added magic methods sort child elements by name before comparison without changing the actual order of the child elements. This only addresses the issue for Section and Property child lists, but does not solve the problem for the order of Property.values.
  • Adds tests for all levels of entity comparison.
  • Adds a changelog to the project.
  • Updates the sphinx documentation config file to the latest odml version.

Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jgrewe jgrewe merged commit eb97b7f into G-Node:master Jun 29, 2018
@mpsonntag mpsonntag deleted the order branch July 2, 2018 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants