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 (in python) the mechanism names (for convenience). #1882

Merged

Conversation

thorstenhater
Copy link
Contributor

Return mechanism names in sorted order.

Fixes #1879

@brenthuisman
Copy link
Contributor

The bug report states that order is not preserved when a catalog is assigned. This PR sorts them, which is not the same as preserving order. Maybe the bug reporter no longer requires this?

Copy link
Contributor

@brenthuisman brenthuisman left a comment

Choose a reason for hiding this comment

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

lgtm

@brenthuisman brenthuisman merged commit 993833d into arbor-sim:master Apr 26, 2022
@Helveg
Copy link
Collaborator

Helveg commented Apr 26, 2022

The original bug did not require the order to be preserved pre-bugfix/post-bugfix, but rather just throughout the lifetime of where one assumed to be using the same catalogue object (i.e. after assigning the object somewhere, even if C++ creates a copy, it should not change behavior). So this fix is sufficient, as assigning it to the catalogue property preserves (the sorted) order.

@thorstenhater thorstenhater deleted the convenience/sort-py-mechs branch August 1, 2022 07:40
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.

cable_global_properties.catalogue assignment changes iteration order, is surprising
3 participants