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: Adds StochasticModel.visualize_attributes() method #612

Conversation

Gui-FernandesBR
Copy link
Member

@Gui-FernandesBR Gui-FernandesBR commented May 25, 2024

Pull request type

  • Code changes (bugfix, features)

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 tests -m slow --runslow) have passed locally
  • CHANGELOG.md has been updated (if relevant)

Current behavior

  • It is really hard to visualize all the attributes after creating an instance of the StochasticModel.
  • The __str__ and __repr__ are being misused as a way to visualize the arguments that are used in the Stochastic classes.

New behavior

See the pictures in the comments!

Breaking change

  • No

Additional information

Remaining tasks:

  • Adjust the documentation (both .rst and .ipynb files)
  • Add unit tests to cover the new method
  • Refactoring old str method of the StochasticModel class

@Gui-FernandesBR
Copy link
Member Author

Environment:
image

SolidMotor:
image

Nose, Parachute, and RailButtons:
image

Rocket:
image

Flight:
image

@Gui-FernandesBR Gui-FernandesBR added Enhancement New feature or request, including adjustments in current codes Outputs Dedicated to visualizations enhancements like prints and plots Monte Carlo Monte Carlo and related contents labels May 25, 2024
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone May 25, 2024
Copy link

codecov bot commented May 25, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 73.59%. Comparing base (b3f6ca7) to head (fcbaea0).

Current head fcbaea0 differs from pull request most recent head 46f4311

Please upload reports for the commit 46f4311 to get more accurate results.

Files Patch % Lines
rocketpy/stochastic/stochastic_model.py 90.00% 3 Missing ⚠️
Additional details and impacted files
@@                            Coverage Diff                            @@
##           doc/monte-carlo-documentation-updates     #612      +/-   ##
=========================================================================
+ Coverage                                  73.56%   73.59%   +0.03%     
=========================================================================
  Files                                         70       70              
  Lines                                      10311    10287      -24     
=========================================================================
- Hits                                        7585     7571      -14     
+ Misses                                      2726     2716      -10     

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

Copy link
Member

@MateusStano MateusStano left a comment

Choose a reason for hiding this comment

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

Very good!

@Gui-FernandesBR Gui-FernandesBR merged commit c197dd4 into doc/monte-carlo-documentation-updates May 30, 2024
7 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the enh/show-variables-monte-carlo branch May 30, 2024 00:22
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 Monte Carlo Monte Carlo and related contents Outputs Dedicated to visualizations enhancements like prints and plots
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants