Add bicycle triangle factors to Transmodel API#3585
Merged
leonardehrenfried merged 12 commits intoSep 9, 2021
Merged
Conversation
Contributor
|
I am not sure if others agree with me, but I think I would prefer the |
Member
Author
|
Should this only happen in the Transmodel API or everywhere? |
Contributor
|
I think it would be good to do it everywhere, as I don't see that it is transmodel specific in any way. |
Member
Author
|
I just saw that a method like that already exists but currently is totally unused: |
Contributor
|
Looks good! But could division by zero be a problem here? |
Member
Author
|
I will write some tests to make sure. |
hannesj
suggested changes
Aug 24, 2021
56779aa to
020e8fe
Compare
Member
Author
|
@t2gran I've replaced the individual setters of the triangle factor with the call to the method where you have to set all three of them. |
t2gran
reviewed
Sep 7, 2021
t2gran
reviewed
Sep 7, 2021
0d45f0f to
6df1ab2
Compare
t2gran
approved these changes
Sep 9, 2021
hannesj
approved these changes
Sep 9, 2021
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.
Summary
This exposes the bicycle triangle factors in the Transmodel API.
I also took care to return a meaningful error when the factors don't add up to 1. It looks like this:
Unit tests
Is there a way to write a unit test for this? I'd love to.
Code style
Yes.
Documentation
Yes.
Changelog
Was a bullet point added to the changelog file with description and link to the linked issue?