Fixed #1069 Added numba cache dir for pytest#1070
Fixed #1069 Added numba cache dir for pytest#1070seanlaw merged 20 commits intostumpy-dev:mainfrom seanlaw:fix_numba_cache_directory
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1070 +/- ##
==========================================
- Coverage 97.33% 97.31% -0.02%
==========================================
Files 93 93
Lines 15219 15239 +20
==========================================
+ Hits 14813 14830 +17
- Misses 406 409 +3 ☔ View full report in Codecov by Sentry. |
According to the numba docs:
So, by default, the cache files are written next the source files under a I haven't tested this but I added the first We can possibly check |
…ba_cache_directory
NimaSarajpoor
left a comment
There was a problem hiding this comment.
@seanlaw
I added some comments for your consideration..
I noticed you added a warning to reflect this. I was thinking about using numba config instead of the [stumpy] config var (and then assign its value to NUMBA_CASHE_DIR) I proposed for writing cache files to the user-defined location. Then, I noticed your message that it is better to not include it in the STUMPY's scope. |
|
@NimaSarajpoor I made most of the changes but kept some. Let me know what you think |
NimaSarajpoor
left a comment
There was a problem hiding this comment.
@seanlaw
I just left one new comment.
|
@NimaSarajpoor I've made some changes based on your comments |
|
I've also added a simple/stupid "check" to see if |
NimaSarajpoor
left a comment
There was a problem hiding this comment.
@seanlaw
Just left some minor comments. Other than those, I think it is all good!
My thought was to just add a note to docstring. It is nice to see that you tried to create some level of protection for users by tracking the calls to those functions. |
|
@NimaSarajpoor Thank you for your comments and review. I think we ended up in a good place with this PR! |
|
@seanlaw I took a look at the changes again. It seems good to me. Thanks for explaining the behaviour of cache.save() in the section "notes" of its docstring. |
|
@seanlaw |
See #1069
Pull Request Checklist
Below is a simple checklist but please do not hesitate to ask for assistance!
black(i.e.,python -m pip install blackorconda install -c conda-forge black)flake8(i.e.,python -m pip install flake8orconda install -c conda-forge flake8)pytest-cov(i.e.,python -m pip install pytest-covorconda install -c conda-forge pytest-cov)black --exclude=".*\.ipynb" --extend-exclude=".venv" --diff ./in the root stumpy directoryflake8 --extend-exclude=.venv ./in the root stumpy directory./setup.sh dev && ./test.shin the root stumpy directory