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

Code coverage is fairly low #26

Open
pmeier opened this issue Oct 3, 2021 · 1 comment
Open

Code coverage is fairly low #26

pmeier opened this issue Oct 3, 2021 · 1 comment

Comments

@pmeier
Copy link

pmeier commented Oct 3, 2021

Although the coverage is 78%, the tests cover very little apart from the regular cases. A lot of if branches especially in error cases are not covered. Additionally, the following functions and modules are not covered at all:

  • unlocknn.metrics
  • unlocknn.megnet_utils
    • .default_megnet_config()
    • .scale_targets()
@a-ws-m
Copy link
Owner

a-ws-m commented Oct 25, 2021

I've added the following changes:

  • Some tests to ensure the metrics values match expectations for some "toy" data.
  • Some tests for thawing/freezing layers, which I think had a lot of branches.
  • A test for create_megnet_input(), which wraps scale_targets() (it felt redundant to test a one-liner that only appears once, so I thought it'd be beneficial to ensure the wrapping function works as expected).

I think default_megnet_config() doesn't require a test. It comes from the authors of MEGNet and essentially works to abstract a very common combination of keyword arguments into a one-liner. Because of the nature of the function (essentially, it's a parameterizable dictionary) I can't think of a useful test to be run.

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

No branches or pull requests

2 participants