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

ENH: draw motors #436

Merged
merged 22 commits into from
Nov 18, 2023
Merged

ENH: draw motors #436

merged 22 commits into from
Nov 18, 2023

Conversation

Gui-FernandesBR
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

Current behavior

Enter text here...

New behavior

Enter text here...

Breaking change

  • Yes
  • No

Additional information

No hynrids so far

@Gui-FernandesBR Gui-FernandesBR added the Enhancement New feature or request, including adjustments in current codes label Oct 11, 2023
Copy link
Collaborator

@phmbressan phmbressan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent plots, these are some small comments I have while skimming through the code. I will do a deeper review/test the functionalities later.

rocketpy/plots/__init__.py Outdated Show resolved Hide resolved
rocketpy/plots/liquid_motor_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/liquid_motor_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/rocket_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/solid_motor_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/solid_motor_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/tank_plots.py Outdated Show resolved Hide resolved
@Gui-FernandesBR Gui-FernandesBR changed the title Enh/draw motors ENH: draw motors Oct 13, 2023
@Gui-FernandesBR
Copy link
Member Author

Current status: Waiting for @phmbressan deeper review, as commented before. And also one more review would be nice.

@phmbressan
Copy link
Collaborator

Are you planning to implement HybridMotor drawings in this PR or it will come in a future PR?

@Gui-FernandesBR
Copy link
Member Author

Are you planning to implement HybridMotor drawings in this PR or it will come in a future PR?

Good question. I'm currently not working on this. Implementing draws for hybrid motors would depend a lot on te current implementation of liquid and solid, therefore I'd say it is better to finish up those first.

To be honest the code is far from ideal. Both rocket draw and motors draw would benefit a lot from code refactors.

Let's see how these go in our roadmap. Code suggestions are still welcome in the meantime.

@MateusStano
Copy link
Member

@Gui-FernandesBR @phmbressan need a re-review here!

Hybrid drawings have been added, and all bugs (I could find) have been fixed

I highly recommend messing with the positions and coordinate systems when testing this

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

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

Comparison is base (56fcb4a) 69.51% compared to head (a64c0ef) 70.87%.
Report is 105 commits behind head on develop.

Files Patch % Lines
rocketpy/mathutils/function.py 74.37% 41 Missing ⚠️
rocketpy/simulation/flight.py 42.50% 23 Missing ⚠️
rocketpy/plots/rocket_plots.py 62.50% 15 Missing ⚠️
rocketpy/plots/tank_plots.py 56.00% 11 Missing ⚠️
rocketpy/motors/hybrid_motor.py 90.90% 1 Missing ⚠️
rocketpy/motors/liquid_motor.py 50.00% 1 Missing ⚠️
rocketpy/motors/motor.py 83.33% 1 Missing ⚠️
rocketpy/motors/solid_motor.py 75.00% 1 Missing ⚠️
rocketpy/motors/tank.py 50.00% 1 Missing ⚠️
rocketpy/plots/aero_surface_plots.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #436      +/-   ##
===========================================
+ Coverage    69.51%   70.87%   +1.35%     
===========================================
  Files           55       55              
  Lines         8999     9223     +224     
===========================================
+ Hits          6256     6537     +281     
+ Misses        2743     2686      -57     
Flag Coverage Δ
unittests 70.87% <82.25%> (+1.35%) ⬆️

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
Collaborator

@phmbressan phmbressan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work here from @Gui-FernandesBR and @MateusStano. The drawings are incredible, really useful to have a confirmation of distances and positioning of motor components.

rocketpy/plots/motor_plots.py Outdated Show resolved Hide resolved
rocketpy/plots/rocket_plots.py Show resolved Hide resolved
MateusStano and others added 3 commits November 17, 2023 21:27
Co-authored-by: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
- Remove useless return None
- Remove inline comments
- Add a few missing docstrings
@Gui-FernandesBR
Copy link
Member Author

I can't approve because I'm the one who created the PR. But everything is fine now. I added a few docstrings that were lacking.

This PR improves the overall rocketpy experience, this is a quite innovative feature that is being added.

Ready to merge if passing on tests

@Gui-FernandesBR Gui-FernandesBR merged commit e8c0bfe into develop Nov 18, 2023
@Gui-FernandesBR Gui-FernandesBR deleted the enh/draw-motors branch November 18, 2023 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request, including adjustments in current codes
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

4 participants