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

Add more unit tests for models that could use them #1603

Open
emlys opened this issue Jul 25, 2024 · 0 comments
Open

Add more unit tests for models that could use them #1603

emlys opened this issue Jul 25, 2024 · 0 comments
Labels
good first issue Good for new members of the software team

Comments

@emlys
Copy link
Member

emlys commented Jul 25, 2024

Some of our older models' test suites only test the final model results, which is effective at catching bugs, but not very helpful in identifying where a bug originated. It would be great if all models had least some unit tests that check intermediate results. Not every single function needs a unit test - some are pretty trivial.

The task:
Identify functions that contain significant logic and/or occur at a critical point in the model. Write unit tests for these functions and/or assert that intermediate results are produced correctly.

Some suggestions to get started with:

  • Annual water yield: unit test for fractp_op
  • Forest carbon: unit test for _calculate_tropical_forest_edge_carbon_map

This is complete when all invest models have at least a couple of unit tests that will help us identify issues in the intermediate steps of the models.

@emlys emlys added the good first issue Good for new members of the software team label Jul 25, 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 new members of the software team
Projects
None yet
Development

No branches or pull requests

1 participant