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 get_controller_observed_variables in the air brakes examples #551

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

Gui-FernandesBR
Copy link
Member

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

Current behavior

Since this commit (4ee4c7d#diff-a2ba60171d218c6b07372fae8759f8b235b7aa40006c08afef14b96c13d37902), the method Flight.get_controller_observed_variables is no longer a cached property and therefore cannot be iterated. This generates the following error when building the documentation:

Cell raised uncaught exception:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[5], line 5
      1 import matplotlib.pyplot as plt
      3 time_list, deployment_level_list, drag_coefficient_list = [], [], []
----> 5 for time, deployment_level, drag_coefficient in test_flight.get_controller_observed_variables:
      6     time_list.append(time)
      7     deployment_level_list.append(deployment_level)

TypeError: 'method' object is not iterable

New behavior

  • Solved the problem!
  • Added a test to invoke the problematic method.
  • Build and checked the documentation.

Breaking change

  • No

Additional information

@Gui-FernandesBR Gui-FernandesBR added Bug Something isn't working Docs Docs and examples related labels Feb 9, 2024
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone Feb 9, 2024
@Gui-FernandesBR Gui-FernandesBR self-assigned this Feb 9, 2024
@Gui-FernandesBR Gui-FernandesBR requested a review from a team as a code owner February 9, 2024 21:43
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (db95053) 72.46% compared to head (6fba7fb) 72.48%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #551      +/-   ##
===========================================
+ Coverage    72.46%   72.48%   +0.02%     
===========================================
  Files           59       59              
  Lines         9568     9568              
===========================================
+ Hits          6933     6935       +2     
+ Misses        2635     2633       -2     

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

@Gui-FernandesBR Gui-FernandesBR merged commit b221d88 into develop Feb 9, 2024
12 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the bug/-control-observed-variables branch February 9, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Docs Docs and examples related
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants