Skip to content

Decide how to test numba functions #77

@eric-czech

Description

@eric-czech

Testing and getting coverage on jit-compiled functions presents a couple challenges. In https://github.com/pystatgen/sgkit/pull/76, I started by creating separate variables for jit-functions and testing them alongside the original function as part of the same test run. Two reasons for this are that:

  1. There are tests that should only be run using the jit-compiled function since they would be prohibitively slow otherwise
  2. Code coverage is only possible on the original functions

One alternative to this would be to not have separate versions of each function and do this instead:

  • Run all unit tests with coverage and NUMBA_DISABLE_JIT turned on, and read this env variable in the tests to skip some that would otherwise be prohibitively slow
  • Disable coverage, disable NUMBA_DISABLE_JIT (so jit is on), and run a subset of the tests again that actually reference JIT-compiled functions

I think this alternative is better, but I'm not sure what a good way is to limit the scope of tests run with JIT on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions