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

[RTM when modify] spring load - explore more objective function - tests will come later #840

Merged
merged 13 commits into from
Feb 2, 2024

Conversation

mickaelbegon
Copy link
Contributor

@mickaelbegon mickaelbegon commented Feb 1, 2024

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

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 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @mickaelbegon)


bioptim/examples/getting_started/pendulum.py line 84 at r1 (raw file):

        key="tau",
        quadratic=False,
        weight=1)

revert this


bioptim/examples/getting_started/pendulum.py line 93 at r1 (raw file):

    x_bounds["q"] = bio_model.bounds_from_ranges("q")
    # x_bounds["q"][:, [0, -1]] = 0  # Start and end at 0...
    x_bounds["q"][:, 0] = 0  # Start and end at 0...

revert this


bioptim/examples/torque_driven_ocp/spring_load.py line 29 at r1 (raw file):

# TODO: scenario 1 does not work

You can remove this TODO


bioptim/examples/torque_driven_ocp/spring_load.py line 31 at r1 (raw file):

# TODO: scenario 1 does not work

    # scenarios are based on a Mayer term (at Tf)

Do not indent


bioptim/examples/torque_driven_ocp/spring_load.py line 214 at r1 (raw file):

            raise ValueError("Tau are not as expected.")
        if not test_qdot >= 0:
            raise ValueError("qdot(T) is not as expected")

This is not necessary

@pariterre pariterre changed the title [RTR] spring load - explore more objective function - tests will come later [RTM when modify] spring load - explore more objective function - tests will come later Feb 1, 2024
Copy link
Contributor Author

@mickaelbegon mickaelbegon 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: 0 of 3 files reviewed, 5 unresolved discussions (waiting on @pariterre)


bioptim/examples/torque_driven_ocp/spring_load.py line 29 at r1 (raw file):

Previously, pariterre (Pariterre) wrote…

You can remove this TODO

Done


bioptim/examples/torque_driven_ocp/spring_load.py line 31 at r1 (raw file):

Previously, pariterre (Pariterre) wrote…

Do not indent

done


bioptim/examples/torque_driven_ocp/spring_load.py line 214 at r1 (raw file):

Previously, pariterre (Pariterre) wrote…

This is not necessary

Remove - may be used for tests


bioptim/examples/getting_started/pendulum.py line 84 at r1 (raw file):

Previously, pariterre (Pariterre) wrote…

revert this

Done


bioptim/examples/getting_started/pendulum.py line 93 at r1 (raw file):

Previously, pariterre (Pariterre) wrote…

revert this

Done

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (53e60c8) 78.72% compared to head (d2e6dad) 78.90%.
Report is 7 commits behind head on master.

Files Patch % Lines
bioptim/examples/torque_driven_ocp/spring_load.py 37.14% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #840      +/-   ##
==========================================
+ Coverage   78.72%   78.90%   +0.17%     
==========================================
  Files         140      139       -1     
  Lines       15742    15721      -21     
==========================================
+ Hits        12393    12404      +11     
+ Misses       3349     3317      -32     
Flag Coverage Δ
unittests 78.90% <47.61%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

:lgtm:

Reviewed 2 of 3 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @mickaelbegon)

@pariterre pariterre merged commit 5ff775c into pyomeca:master Feb 2, 2024
21 of 24 checks passed
@mickaelbegon mickaelbegon deleted the spring_load branch February 14, 2024 07:17
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.

2 participants