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: do not allow drawing rockets with no aerodynamic surface #774

Merged
merged 4 commits into from
Mar 4, 2025

Conversation

Gui-FernandesBR
Copy link
Member

@Gui-FernandesBR Gui-FernandesBR commented Mar 3, 2025

Pull request type

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

Checklist

  • Docs have been reviewed and added / updated
  • Lint (black rocketpy/ tests/) has passed locally
  • CHANGELOG.md has been updated (if relevant)

Current behavior

See #766,
When calling rocket.all_info() on a "surfaceless rocket", it throw an error.

New behavior

Now you will see no more errors when trying to print out information from a rocket without aero surfaces.

Breaking change

  • No

Additional information

I tested with the getting started notebook. Everything is looking fine.

Essentially: if you do not define any aerodynamic surface, why in the world would you want to draw the rocket? Sorry but we can't.

@Gui-FernandesBR Gui-FernandesBR requested a review from a team as a code owner March 3, 2025 01:48
@Gui-FernandesBR Gui-FernandesBR added Bug Something isn't working Aerodynamics Any problem to be worked on top of RocketPy's Aerodynamic Outputs Dedicated to visualizations enhancements like prints and plots labels Mar 3, 2025
@Gui-FernandesBR Gui-FernandesBR self-assigned this Mar 3, 2025
Copy link

codecov bot commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.08%. Comparing base (83aa20e) to head (cb13c1f).
Report is 21 commits behind head on develop.

Files with missing lines Patch % Lines
rocketpy/plots/rocket_plots.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #774      +/-   ##
===========================================
+ Coverage    76.42%   80.08%   +3.66%     
===========================================
  Files           95      101       +6     
  Lines        11090    11637     +547     
===========================================
+ Hits          8475     9319     +844     
+ Misses        2615     2318     -297     

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

@Gui-FernandesBR Gui-FernandesBR force-pushed the bug/draw-rocket-no-surface branch from 79d1a02 to b0ed1bc Compare March 4, 2025 13:40
@Gui-FernandesBR Gui-FernandesBR merged commit 07b9d57 into develop Mar 4, 2025
10 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the bug/draw-rocket-no-surface branch March 4, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aerodynamics Any problem to be worked on top of RocketPy's Aerodynamic Bug Something isn't working Outputs Dedicated to visualizations enhancements like prints and plots
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

UnboundLocalError: local variable 'radius' referenced before assignment
2 participants