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

Graceful handling of Numba import errors #335

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
### Tobac Changelog

_**Version 1.5.1:**_

**Bug fixes**

- utils.general.standardize_track_dataset was added back after being inadvertently removed in version 1.5.0 [#330](https://github.com/tobac-project/tobac/pull/330)
- All Numba import errors are now caught with the exception of KeyboardInterrupts. [#335](https://github.com/tobac-project/tobac/pull/335)


_**Version 1.5.0:**_

**Enhancements for Users**
Expand Down
8 changes: 7 additions & 1 deletion tobac/utils/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,13 @@
from numba import njit

return njit(func, kwargs)
except ModuleNotFoundError:
except KeyboardInterrupt as kie:
raise

Check warning on line 446 in tobac/utils/internal.py

View check run for this annotation

Codecov / codecov/patch

tobac/utils/internal.py#L446

Added line #L446 was not covered by tests
w-k-jones marked this conversation as resolved.
Show resolved Hide resolved
except Exception as exc:
warnings.warn(
"Numba not able to be imported; periodic boundary calculations will be slower."
"Exception raised: " + repr(exc)
)
return func


Expand Down
Loading