-
Notifications
You must be signed in to change notification settings - Fork 329
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
Fixed #1069 Added numba cache dir for pytest #1070
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 black
orconda install -c conda-forge black
)flake8
(i.e.,python -m pip install flake8
orconda install -c conda-forge flake8
)pytest-cov
(i.e.,python -m pip install pytest-cov
orconda 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.sh
in the root stumpy directory