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

BUG: Fix find_input() Function to Return a Single Value #471

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

MateusStano
Copy link
Member

Pull request type

  • Code changes (bugfix, features)
  • Code maintenance (refactoring, formatting, tests)
  • ReadMe, Docs and GitHub updates
  • Other (please describe):

Checklist

  • Tests for the changes have been added (if needed)
  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest --runslow) have passed locally

New behavior

Scipy's optimize.root gives an array of length 1 to the Function object inside find_input. Currently if a Function receives an Iterable, it returns a list. This was not always the case before #451.

Now find_input should always work, independent of the Function source

@MateusStano MateusStano requested review from Gui-FernandesBR and removed request for giovaniceotto November 19, 2023 17:40
@MateusStano MateusStano self-assigned this Nov 19, 2023
@MateusStano MateusStano added the Bug Something isn't working label Nov 19, 2023
Copy link

codecov bot commented Nov 19, 2023

Codecov Report

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

Comparison is base (5cdb31a) 70.86% compared to head (2e9a167) 70.86%.
Report is 26 commits behind head on develop.

Files Patch % Lines
rocketpy/mathutils/function.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #471   +/-   ##
========================================
  Coverage    70.86%   70.86%           
========================================
  Files           55       55           
  Lines         9227     9227           
========================================
  Hits          6539     6539           
  Misses        2688     2688           
Flag Coverage Δ
unittests 70.86% <60.00%> (ø)

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.

@Gui-FernandesBR
Copy link
Member

It passes on my --runslow too (linux)

@Gui-FernandesBR Gui-FernandesBR merged commit f67dfcd into develop Nov 19, 2023
13 of 14 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the bug/find-input-root branch November 19, 2023 20:51
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants