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

Increase test coverage to 80% #97

Open
kdberends opened this issue Sep 24, 2024 · 0 comments
Open

Increase test coverage to 80% #97

kdberends opened this issue Sep 24, 2024 · 0 comments
Assignees
Labels
good first issue Good for newcomers refactor Involves improving the code without change in functionality
Milestone

Comments

@kdberends
Copy link
Member

kdberends commented Sep 24, 2024

The current test coverage is 72.1%. Deltares quality goal is at least 80%. This issue is to push the code coverage to at least 80%.

At good place to start would be RegionPolygonFile.py, lib/polysimplify.py and Functions.py, which currently have the lowest test percentage. These modules are also candidates for refactoring:

  • Functions.py are a relict from early function-oriented development. Most of these functions are called by only one specific class. See issue refactor Functions.py #98 on how to refactor (and test the refactoring!)
  • RegionPolygonFile.py contains some code to do classification if the user does not provide pre-computed classification. There is a longstanding wish (Remove dependency on DeltaShell-modified netCDF files #25) to implement a different classification algorithm. Fixing that would mean a lot of code can be removed from this class.

Finally, in utils.py some edge cases are not tested.

@kdberends kdberends added documentation Improvements or additions to documentation good first issue Good for newcomers refactor Involves improving the code without change in functionality and removed documentation Improvements or additions to documentation labels Sep 24, 2024
@kdberends kdberends added this to the FM2PROF 2.4 milestone Sep 24, 2024
@Tjalling-dejong Tjalling-dejong self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor Involves improving the code without change in functionality
Projects
None yet
Development

No branches or pull requests

2 participants