-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
Move benchmarks under napari directory but not distributed #913
Conversation
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.
This looks good to me, though curious if @jni likes this approach.
Can you also fix the flake8 error (app
not used).
Also do the commands here https://github.com/napari/napari/blob/master/docs/BENCHMARKS.md#profiling still work? Do we need to adjust some paths as described in https://asv.readthedocs.io/en/stable/using.html#setting-up-a-new-benchmarking-project. I just see this line there
The benchmarks live in Python files in the benchmarks directory.
and I worry they won't be found now
I agree with @sofroniewn that this needs to be tested in conjunction with asv. Having said this, I think for now we should go with #911, sorry for the conflicting signals, @ttung! Benchmarks are still relatively rare in the SciPy world so I don't know whether "best practices" still exist, but scipy and numpy have a |
I'm fine with the #911 approach - again apologies for the mixed signals.
I'll start a thread on zullip for 0.2.11 - we've got a lot tagged with that right now. I'm ok waiting on some of that, but i'd at least like to fix our setup.py / tests / python 3.8 stuff and some other close bugs first |
@tlambert03 we're still getting intermittent macos 3.8 failures - sometimes it will pass if I click re-run |
those kind of fails (where all the tests actually pass and then you get a segfault at the very end) are the hardest to debug for me. I assume there is some sort of race condition with cleaning up threads that sometimes wins and sometimes loses. In this case it looks like there might be a lingering |
Ok thanks @tlambert03 - maybe @shanaxel42 can look at that, she did some of that for our console too. The relevant place to start looking might be https://github.com/napari/napari/blob/master/napari/_qt/qt_update_ui.py, https://github.com/napari/napari/blob/master/napari/viewer.py#L85-L88, and napari/napari/tests/test_viewer.py Lines 133 to 160 in fae599c
|
|
Given that this now works with I will point out that @jni said
but I'm not sure if that still holds true for him in light of @ttung can you also fix the Flake8 error |
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.
I am approving, but as noted above will wait for @jni to weigh in on the new changes before merge given his previous concerns
@ttung thanks! Actually this is a nice, elegant solution. Something I thought about in a conversation with @sofroniewn is that I don't think right now that there is a way to run the benchmarks on pip-installed napari — correct me if I'm wrong! There isn't much harm in distributing |
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.
I should also say, I'll approve just to make clear that I'm ok with this getting merged, I just wanted to raise the two potential issues (bloat + running benchmarks on an installed version). Thank you @ttung!
I updated this such that the benchmarks live in |
Aren't these now inside |
If it's not a python package, setuptools won't include it.
|
Does the I'm still not quite sure about the advantage of having it inside |
drop napari/benchmarks/__init__.py so benchmarks are not distributed.
Yes, just fixed it.
At least some of the linters aren't run outside of |
Ok I am fine with this. If this is ok with @jni I will then merge. We can always revisit. This is the last PR before |
Agreed, since this is not shipped, we can revisit in the future. Thank you @ttung! |
Description
This removes the spurious
benchmarks
package. It is now under thenapari
directory to ensure that the code is put throughblack
andflake8
, but without an__init__.py
so it is not packaged into installs.Type of change
References
Fixes #910
How has this been tested?
python napari/benchmarks/benchmark_qt_viewer.py
asv run --python=python
Final checklist: