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

MNT: solve warnings #470

Merged
merged 5 commits into from
Nov 19, 2023
Merged

MNT: solve warnings #470

merged 5 commits into from
Nov 19, 2023

Conversation

Gui-FernandesBR
Copy link
Member

@Gui-FernandesBR Gui-FernandesBR commented Nov 19, 2023

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

Current behavior

You run the tests, they all pass, but there are still some warnings behind.

New behavior

Using the pytest -v -W error flag I was able to identify some warnings in the execution and give them the proper treatment.
Please read the commits descriptions for more details.

Breaking change

  • Yes
  • No

Additional information

In the future we may want to update the SEBML curve to avoid getting in the new warning

- Fix colormap get method avoiding deprecation from matplotlib
-  Fix interpolation/extrapolation
warnings in Function class
- avoid using Function.plot2D old method
- delete the too general exception from the funcify.
LiquidMotor class
- There's a problem when someone passes a mass flow curve with different
a discretization than the thrust curve.
(which is the case for the SEBLM motor)
- I'm raising a new error to allow the user to solve the issue before
continuing.
@Gui-FernandesBR Gui-FernandesBR added Tests Regarding Tests Outputs Dedicated to visualizations enhancements like prints and plots labels Nov 19, 2023
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone Nov 19, 2023
Copy link

codecov bot commented Nov 19, 2023

Codecov Report

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

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

Files Patch % Lines
rocketpy/mathutils/function.py 76.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #470      +/-   ##
===========================================
- Coverage    70.86%   70.80%   -0.07%     
===========================================
  Files           55       55              
  Lines         9227     9234       +7     
===========================================
- Hits          6539     6538       -1     
- Misses        2688     2696       +8     
Flag Coverage Δ
unittests 70.80% <83.78%> (-0.07%) ⬇️

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.

- Fix variable naming "xinitial", I also checked this is nto used in
other classes
- update interpolation and extrapolation methods usage
- remove useless raises or warnings.
@Gui-FernandesBR Gui-FernandesBR mentioned this pull request Nov 19, 2023
rocketpy/motors/liquid_motor.py Show resolved Hide resolved
rocketpy/motors/liquid_motor.py Outdated Show resolved Hide resolved
rocketpy/motors/liquid_motor.py Outdated Show resolved Hide resolved
rocketpy/mathutils/function.py Show resolved Hide resolved
- Fix exhaust velocity calculation for non-zero mass
flow rates
- remove useless if statement
- change if to elif statement.
- all the tested passing without warnings.
@Gui-FernandesBR Gui-FernandesBR merged commit f29449a into develop Nov 19, 2023
10 of 11 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the mnt/solve-warnings branch November 19, 2023 20:51
@Gui-FernandesBR Gui-FernandesBR restored the mnt/solve-warnings branch November 20, 2023 02:26
@Gui-FernandesBR Gui-FernandesBR deleted the mnt/solve-warnings branch November 20, 2023 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Outputs Dedicated to visualizations enhancements like prints and plots Tests Regarding Tests
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants