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

[RTR]PR changes for ligaments #614

Merged
merged 13 commits into from
Mar 6, 2023
Merged

Conversation

AntoineLeroy
Copy link
Contributor

@AntoineLeroy AntoineLeroy commented Feb 10, 2023

few changes to prepare arrival of ligaments in bioptim

All Submissions:

  • Have you followed the guidelines in our Contributing document [docs/contribution.md]?
  • Have you checked to ensure there aren't other open [Pull Requests] for the same update/change?
  • Have you opened/linked the issue related to your pull request?
  • Have you used the tag [WIP] for on-going changes, and removed it when the pull request was ready?
  • When ready to merge, have you sent a comment pinging @pariterre in it?

New Feature Submissions:

  1. Does your submission pass the tests (if not please explain why this is intended)?
  2. Did you write a proper documentation (docstrings and ReadMe)
  3. Have you linted your code locally prior to submission (using the command: black . -l120 --exclude "external/*")?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new examples for your core changes, as applicable?
  • Have you written new tests for your core changes, as applicable?

This change is Reviewable

@AntoineLeroy AntoineLeroy changed the title changes for ligaments [WIP] changes for ligaments Feb 24, 2023
@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Patch coverage: 83.01% and project coverage change: -0.03 ⚠️

Comparison is base (354ee4e) 81.69% compared to head (702b59f) 81.67%.

❗ Current head 702b59f differs from pull request most recent head 619af4d. Consider uploading reports for the commit 619af4d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #614      +/-   ##
==========================================
- Coverage   81.69%   81.67%   -0.03%     
==========================================
  Files         107      107              
  Lines       11849    11850       +1     
==========================================
- Hits         9680     9678       -2     
- Misses       2169     2172       +3     
Impacted Files Coverage Δ
bioptim/limits/constraints.py 82.78% <66.66%> (-0.18%) ⬇️
...amples/torque_driven_ocp/ocp_mass_with_ligament.py 75.75% <75.75%> (ø)
bioptim/dynamics/configure_problem.py 90.97% <100.00%> (-0.18%) ⬇️
bioptim/dynamics/dynamics_functions.py 94.46% <100.00%> (+0.08%) ⬆️
bioptim/interfaces/biomodel.py 100.00% <100.00%> (ø)
bioptim/interfaces/biorbd_model.py 94.79% <100.00%> (+0.03%) ⬆️
bioptim/optimization/optimal_control_program.py 87.13% <100.00%> (ø)
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AntoineLeroy AntoineLeroy changed the title [WIP] changes for ligaments [RTR] changes for ligaments Feb 24, 2023
Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r1, 3 of 3 files at r2, 1 of 3 files at r3, 9 of 9 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @AntoineLeroy)


tests/test_ligaments.py line 357 at r4 (raw file):

            # initial and final position
            np.testing.assert_almost_equal(q[:, 0], np.array([0.0]))
            np.testing.assert_almost_equal(q[:, -1], np.array([-3.1415927]))

Why these values changed?

Code quote:

3.1415927])

bioptim/examples/torque_driven_ocp/ocp_mass_with_ligament.py line 72 at r4 (raw file):

        )
        u_init.add([tau_init] * bio_model.nb_tau)
    else:

please use elif for all of the case and raise a NotImplementedYet if it gets to else

@pariterre pariterre changed the title [RTR] changes for ligaments changes for ligaments Feb 24, 2023
@AntoineLeroy AntoineLeroy changed the title changes for ligaments [RTR]PR changes for ligaments Feb 27, 2023
Copy link
Contributor Author

@AntoineLeroy AntoineLeroy left a comment

Choose a reason for hiding this comment

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

Reviewable status: 10 of 11 files reviewed, 2 unresolved discussions (waiting on @pariterre)


tests/test_ligaments.py line 357 at r4 (raw file):

Previously, pariterre (Pariterre) wrote…

Why these values changed?

because these are the right values for the test to pass


bioptim/examples/torque_driven_ocp/ocp_mass_with_ligament.py line 72 at r4 (raw file):

Previously, pariterre (Pariterre) wrote…

please use elif for all of the case and raise a NotImplementedYet if it gets to else

Done.

Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AntoineLeroy)


tests/test_ligaments.py line 357 at r4 (raw file):

Previously, AntoineLeroy wrote…

because these are the right values for the test to pass

I understand that these are the current values for the tests to pass, but why did it changed? Making the tests passing is not the goal, the goal is that it returns the right answer. I am asking, what did you change that made these values change and are we sure it is intended

Copy link
Contributor Author

@AntoineLeroy AntoineLeroy left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @pariterre)


tests/test_ligaments.py line 357 at r4 (raw file):

Previously, pariterre (Pariterre) wrote…

I understand that these are the current values for the tests to pass, but why did it changed? Making the tests passing is not the goal, the goal is that it returns the right answer. I am asking, what did you change that made these values change and are we sure it is intended

This is a test I created specifically for this PR and the change is from RigidBodyDynamics.ODE to RigidBodyDynamics.DAE_FORWARD_DYNAMICS and RigidBodyDynamics.DAE_FINVERSE_DYNAMICS. I just wanted to test the last two.

pariterre
pariterre previously approved these changes Mar 2, 2023
Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AntoineLeroy)

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.

None yet

2 participants