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] Restoring bounds on graphs #724

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

EveCharbie
Copy link
Collaborator

@EveCharbie EveCharbie commented Jul 19, 2023

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? Issue show_bounds doesn't work anymore. #716
  • 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

@Ipuch
Copy link
Collaborator

Ipuch commented Jul 19, 2023

Great ! Are there any means to test more stuff around, so we don't break it anymore?

At least that

nlp.plot[f"{key}_states"].bounds = ...

is well filled by the end of prepare ocp

@EveCharbie
Copy link
Collaborator Author

@Ipuch yes, but I will not spend time on adding this test since nothing on the graph part of bioptim is tested anyway.
I think @aceglia has found a better way of testing, we just need someone to put time on it :/

@Ipuch
Copy link
Collaborator

Ipuch commented Jul 19, 2023

I'll do it then this is a 10 line test.
Goal is not to test the whole plot but just this lines that are essential to preserve the feature.

@EveCharbie
Copy link
Collaborator Author

I think if you only test this specific thing, we will have a false security feeling. We should instead always run an example with graphs when we merge a PR.

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (377de7b) 81.44% compared to head (495ae40) 81.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #724      +/-   ##
==========================================
+ Coverage   81.44%   81.46%   +0.01%     
==========================================
  Files         129      129              
  Lines       15466    15466              
==========================================
+ Hits        12597    12599       +2     
+ Misses       2869     2867       -2     
Impacted Files Coverage Δ
bioptim/examples/getting_started/pendulum.py 77.41% <ø> (ø)
bioptim/optimization/optimal_control_program.py 87.20% <100.00%> (+0.27%) ⬆️

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

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 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @EveCharbie)


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

    # --- Solve the ocp --- #
    sol = ocp.solve(Solver.IPOPT(show_online_optim=platform.system() == "Linux"))
    # sol.graphs(show_bounds=True)

Isn't this by default?

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:

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

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:

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

@pariterre pariterre merged commit 797aa98 into pyomeca:master Jul 19, 2023
6 checks passed
@EveCharbie EveCharbie deleted the restore_bounds_on_graphs branch August 2, 2023 08:58
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.

3 participants