Skip to content

Conversation

@Gui-FernandesBR
Copy link
Member

@Gui-FernandesBR Gui-FernandesBR commented Dec 15, 2024

Pull request type

  • Code maintenance (refactoring, formatting, tests)

Checklist

  • Tests for the changes have been added (if needed)
  • 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

  • Coverage without slow tests: 76%

New behavior

  • Coverage without slow tests: 80%
  • Coverage with slow tests: 92%

Breaking change

  • No

Additional information

  • I'm not sure if I will have time to add more tests, so I guess the PR is ready for review
  • Please review carefully the logics behind the tests.

@Gui-FernandesBR Gui-FernandesBR added the Tests Regarding Tests label Dec 15, 2024
@Gui-FernandesBR Gui-FernandesBR self-assigned this Dec 15, 2024
@Gui-FernandesBR Gui-FernandesBR requested a review from a team as a code owner December 15, 2024 06:03
@codecov
Copy link

codecov bot commented Dec 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.06%. Comparing base (83aa20e) to head (8ee9836).
Report is 12 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #756      +/-   ##
===========================================
+ Coverage    76.42%   80.06%   +3.64%     
===========================================
  Files           95       95              
  Lines        11090    11350     +260     
===========================================
+ Hits          8475     9087     +612     
+ Misses        2615     2263     -352     

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

@Gui-FernandesBR
Copy link
Member Author

These are the top 10 files we should be worried about and try to increase coverage:

image

@Lucas-Prates
Copy link
Contributor

@Gui-FernandesBR if you do not mind, I can take a closer look at sensitivity_model and sensitivity_prints. I recall that you implemented tests back in the PR, but they were failing for some reason.

@Gui-FernandesBR
Copy link
Member Author

@Gui-FernandesBR if you do not mind, I can take a closer look at sensitivity_model and sensitivity_prints. I recall that you implemented tests back in the PR, but they were failing for some reason.

Yes please, I'd like some help on that

@Lucas-Prates
Copy link
Contributor

Lucas-Prates commented Dec 16, 2024

100% coverage for both sensitivity_model and sensitivity_prints. Also removed a piece of duplicate code inside sensitivity_model.

@Gui-FernandesBR Gui-FernandesBR force-pushed the tst/increase-test-coverage branch from da7c35d to 6863d6e Compare December 16, 2024 02:53
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone Dec 16, 2024
@Gui-FernandesBR Gui-FernandesBR linked an issue Dec 16, 2024 that may be closed by this pull request
@Gui-FernandesBR
Copy link
Member Author

Ok, I think this PR is already in a good point.
Of course that we can do even better. Ideally we should see 90% of code coverage without slow tests, and up to 10% of slowed tests.
But for today we are fine already.

@RocketPy-Team/code-owners ready for review! Pleas notice that the code coverage has increased 4 pp, but I didn't spend much time trying to find the best validation possible for each function method. I opted to be simple.

@Gui-FernandesBR
Copy link
Member Author

Once again I am sharing the top 10 worst files in terms of coverage.
Perhaps you could contribute a little to the function.py file, @phmbressan ?

image

@Gui-FernandesBR Gui-FernandesBR force-pushed the tst/increase-test-coverage branch from 88e6025 to 9bd4383 Compare December 22, 2024 22:42
MNT: linters

TST: complementing tests for sensitivity analysis and removing duplicate piece of code.

DEV: add pragma comments to exclude specific lines from coverage

MNT: fix pylint error
@Gui-FernandesBR Gui-FernandesBR force-pushed the tst/increase-test-coverage branch from 9bd4383 to bd5f1ab Compare January 18, 2025 16:08
@Gui-FernandesBR Gui-FernandesBR merged commit 72d9310 into develop Jan 19, 2025
8 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the tst/increase-test-coverage branch January 19, 2025 02:13
Gui-FernandesBR added a commit that referenced this pull request Jan 19, 2025
* TST: add flight fixture for solid propulsion equations of motion

* DEV: add pragma comments to exclude specific lines from coverage

* TST: adds more unit tests to the codebase

MNT: linters

TST: complementing tests for sensitivity analysis and removing duplicate piece of code.

DEV: add pragma comments to exclude specific lines from coverage

MNT: fix pylint error

* TST: add fixture for solid propulsion equations of motion in flight tests

* TST: fix tests not passing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tests Regarding Tests

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

TST: Increase code coverage to 90%

3 participants