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

DEV: adds coverage configuration file and excluide exceptions from report #570

Merged
merged 6 commits into from
Mar 24, 2024

Conversation

Gui-FernandesBR
Copy link
Member

Pull request type

  • ReadMe, Docs and GitHub updates

Checklist

  • Tests for the changes have been added (not needed)
  • Docs have been reviewed and added / updated (not needed)
  • Lint (black rocketpy/ tests/) has passed locally
  • All tests (pytest tests -m slow --runslow) have passed locally
  • CHANGELOG.md has been updated (not relevant)

New behavior

Added some regex rules to a new coverage configuration file to skip the raise exceptions from the tests coverage report.
These lines are not imported to be tested, and therefore not having them covered by tests is totally fine.

We should see a small increase in the coverage statistics.

Breaking change

  • No (absolutely not)

Additional information

@Gui-FernandesBR Gui-FernandesBR added the Tests Regarding Tests label Mar 7, 2024
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone Mar 7, 2024
@Gui-FernandesBR Gui-FernandesBR self-assigned this Mar 7, 2024
@Gui-FernandesBR Gui-FernandesBR requested a review from a team as a code owner March 7, 2024 21:18
@Gui-FernandesBR
Copy link
Member Author

An example:
image

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.

Two main comments before approving this PR:

  • I would like to hear your opinion on this matter: I do think that we could remove warnings from the coverage, but in my opinion exceptions shouls be asserted. This is specially relevant in the future when Custom Exceptions are implemented;
  • It is high time we implemented a pyproject.toml file. This would simplify this PR by removing the need of a new "hidden" file .coveragerc.

@Gui-FernandesBR Gui-FernandesBR force-pushed the dev/adds-coverage-configuration-file branch from 3a3a311 to 191650f Compare March 12, 2024 00:37
@Gui-FernandesBR Gui-FernandesBR force-pushed the dev/adds-coverage-configuration-file branch from 0c4b26b to c5fc055 Compare March 21, 2024 19:07
@Gui-FernandesBR
Copy link
Member Author

86f6570

Ok, I removed the line that deleted raise exceptions from the coverage reports. See 86f6570

I totally agree that we should create a pyproject.toml file, I created a issue here: #578

@Gui-FernandesBR Gui-FernandesBR merged commit e27e522 into develop Mar 24, 2024
2 checks passed
@Gui-FernandesBR Gui-FernandesBR deleted the dev/adds-coverage-configuration-file branch March 24, 2024 12:50
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.

2 participants