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

Improve test coverage and quality (DoD) #637

Open
kathrynroscoe opened this issue Jan 15, 2025 · 1 comment
Open

Improve test coverage and quality (DoD) #637

kathrynroscoe opened this issue Jan 15, 2025 · 1 comment
Assignees

Comments

@kathrynroscoe
Copy link
Contributor

kathrynroscoe commented Jan 15, 2025

  • Meet and decide which missing tests are important and have priority from the missing 27% (currently 73%)
  • Of existing tests, decide which ones to improve the quality with either real checks from known output/input or other ways. Then update the time estimate for the task.
  • Time estimates - 5 days for improving coverage (P, G, L meet, L implements?)
  • Time estimate - Divvy up between the team, maybe 20 days total?
  • Create smaller issues from this and put the correct people as assignee

How to make the quality improvements quantitative (definition of done)?

  • All time series are tested (harder to find bugs there)

Discussion

  • Conceptually, should we be testing dependent packages like HMT FIAT.
  • Reach out to FEWS to figure out how they test their systems with third party models and adapters? (Dave de Koning)\

High priority to get started because this takes time

@kathrynroscoe kathrynroscoe changed the title Improve test coverage and quality Improve test coverage and quality (DoD) Jan 15, 2025
@LuukBlom
Copy link
Contributor

A coverage report is made for every test run and can be downloaded in the same location as the installers: https://dpcbuild.deltares.nl/repository/download/FloodAdapt_Test/5276492:id/coverage.zip

Image

Currently, these are all files that are under 80%:

File | statements | missing | excluded | coverage
flood_adapt\database_builder\create_database.py | 790 | 679 | 0 | 14%
flood_adapt\object_model\hazard\forcing\plotting.py | 174 | 149 | 0 | 14%
flood_adapt\object_model\direct_impact\impact_strategy.py | 25 | 17 | 0 | 32%
flood_adapt\dbs_classes\dbs_benefit.py | 19 | 11 | 0 | 42%
flood_adapt\api\output.py | 46 | 23 | 0 | 50%
flood_adapt\api\static.py | 38 | 16 | 0 | 58%
flood_adapt\dbs_classes\dbs_static.py | 110 | 45 | 0 | 59%
flood_adapt\dbs_classes\dbs_event.py | 44 | 17 | 0 | 61%
flood_adapt\api\benefits.py | 26 | 10 | 0 | 62%
flood_adapt\api\strategies.py | 14 | 5 | 0 | 64%
flood_adapt\object_model\hazard\forcing\forcing_factory.py | 63 | 19 | 0 | 70%
flood_adapt\api\projections.py | 24 | 7 | 0 | 71%
flood_adapt\adapter\interface\model_adapter.py | 32 | 9 | 0 | 72%
flood_adapt\object_model\hazard\forcing\rainfall.py | 53 | 14 | 0 | 74%
flood_adapt\object_model\hazard\measure\green_infrastructure.py | 27 | 7 | 0 | 74%
flood_adapt\adapter\fiat_adapter.py | 129 | 32 | 0 | 75%
flood_adapt\api\database_builder.py | 4 | 1 | 0 | 75%
flood_adapt\api\events.py | 55 | 14 | 0 | 75%
flood_adapt\dbs_classes\database.py | 301 | 71 | 0 | 76%
flood_adapt\dbs_classes\interface\element.py | 33 | 8 | 0 | 76%
flood_adapt\adapter\interface\hazard_adapter.py | 27 | 6 | 0 | 78%
flood_adapt\dbs_classes\dbs_strategy.py | 46 | 10 | 0 | 78%
flood_adapt\object_model\hazard\interface\models.py | 39 | 8 | 0 | 79%

Seems like the database builder is where we can improve most.

However, lets go through these files and see code is actually being missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants