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

Improve mechanism modification API. #534

Merged
merged 1 commit into from
Apr 17, 2019
Merged

Improve mechanism modification API. #534

merged 1 commit into from
Apr 17, 2019

Conversation

tkoolen
Copy link
Collaborator

@tkoolen tkoolen commented Feb 2, 2019

Fix #318. Have all the mechanism modification functions return the modified or newly created mechanism, and nothing else. Keyword arguments, e.g. bodymap and jointmap, may be passed in to support the less frequent use case where these mappings are required.

Also remove the newfloatingjoints map from maximal_coordinates! as it can be trivially computed from the returned mechanism, and remove the fixedjoints output from remove_fixed_tree_joints! for the same reason.

This is a breaking change, so there should be a deprecation cycle before this is merged.

Fix #318. Have all the mechanism modification functions return the modified or newly created mechanism, and nothing else. Keyword arguments, e.g. `bodymap` and `jointmap`, may be passed in to support the less frequent use case where these mappings are required.

Also remove the `newfloatingjoints` map from `maximal_coordinates!` as it can be trivially computed from the returned mechanism, and remove the `fixedjoints` output from `remove_fixed_tree_joints!` for the same reason.
@tkoolen
Copy link
Collaborator Author

tkoolen commented Apr 17, 2019

Since the main change here was that the returned values have changed, it's hard to provide automated deprecation warnings using Base.@deprecate. So I'll just go ahead and merge.

@tkoolen tkoolen merged commit 3f7e4aa into master Apr 17, 2019
@tkoolen tkoolen mentioned this pull request May 14, 2019
@tkoolen tkoolen deleted the tk/modification-api branch August 8, 2019 20:12
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.

Consider changing mechanism modification method signatures and return types
1 participant