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

initial setup #1

Merged
merged 30 commits into from
Oct 10, 2018
Merged

initial setup #1

merged 30 commits into from
Oct 10, 2018

Conversation

kne42
Copy link
Member

@kne42 kne42 commented Sep 4, 2018

No description provided.

@pep8speaks
Copy link

pep8speaks commented Sep 4, 2018

Hello @kne42! Thanks for updating the PR.

  • In the file demo.py, following are the PEP8 issues :

Line 47:80: E501 line too long (90 > 79 characters)
Line 63:80: E501 line too long (93 > 79 characters)
Line 65:80: E501 line too long (99 > 79 characters)
Line 86:80: E501 line too long (92 > 79 characters)
Line 97:80: E501 line too long (93 > 79 characters)
Line 99:80: E501 line too long (101 > 79 characters)

Line 13:80: E501 line too long (80 > 79 characters)
Line 312:5: E266 too many leading '#' for block comment
Line 391:5: E266 too many leading '#' for block comment

Line 43:46: E703 statement ends with a semicolon

Line 76:33: E261 at least two spaces before inline comment
Line 93:80: E501 line too long (102 > 79 characters)
Line 96:80: E501 line too long (101 > 79 characters)

Line 231:1: E305 expected 2 blank lines after class or function definition, found 1

Line 7:1: W191 indentation contains tabs
Line 8:1: W191 indentation contains tabs
Line 9:1: W191 indentation contains tabs
Line 10:1: W191 indentation contains tabs
Line 11:1: W191 indentation contains tabs
Line 13:1: W191 indentation contains tabs
Line 14:1: W191 indentation contains tabs
Line 15:1: W191 indentation contains tabs
Line 16:1: W191 indentation contains tabs
Line 18:1: W191 indentation contains tabs
Line 19:1: W191 indentation contains tabs
Line 20:1: W191 indentation contains tabs
Line 22:1: W191 indentation contains tabs
Line 23:1: W191 indentation contains tabs
Line 24:1: W191 indentation contains tabs
Line 25:1: W191 indentation contains tabs
Line 26:1: W191 indentation contains tabs
Line 27:1: W191 indentation contains tabs
Line 28:1: W191 indentation contains tabs
Line 29:1: W191 indentation contains tabs
Line 31:1: W191 indentation contains tabs
Line 32:1: W191 indentation contains tabs
Line 33:1: W191 indentation contains tabs
Line 33:26: E251 unexpected spaces around keyword / parameter equals
Line 33:28: E251 unexpected spaces around keyword / parameter equals
Line 33:39: E251 unexpected spaces around keyword / parameter equals
Line 33:41: E251 unexpected spaces around keyword / parameter equals
Line 33:54: E251 unexpected spaces around keyword / parameter equals
Line 33:56: E251 unexpected spaces around keyword / parameter equals
Line 34:1: W191 indentation contains tabs
Line 35:1: W191 indentation contains tabs
Line 37:1: W191 indentation contains tabs
Line 37:19: W292 no newline at end of file

Line 4:80: E501 line too long (123 > 79 characters)
Line 5:80: E501 line too long (113 > 79 characters)
Line 6:80: E501 line too long (135 > 79 characters)
Line 7:80: E501 line too long (138 > 79 characters)
Line 9:1: E402 module level import not at top of file
Line 10:1: E402 module level import not at top of file
Line 11:1: E402 module level import not at top of file
Line 14:32: E251 unexpected spaces around keyword / parameter equals
Line 14:34: E251 unexpected spaces around keyword / parameter equals
Line 22:55: E231 missing whitespace after ','
Line 27:13: E225 missing whitespace around operator

Line 90:19: E231 missing whitespace after ','

Line 46:1: W293 blank line contains whitespace

Line 37:1: E402 module level import not at top of file
Line 38:1: E402 module level import not at top of file
Line 39:1: E402 module level import not at top of file
Line 40:1: E402 module level import not at top of file

  • There are no PEP8 issues in the file versioneer.py !

  • Complete extra results for this file :

file_to_check.py:941:-13592: W605 invalid escape sequence '\s'
file_to_check.py:941:-13408: W605 invalid escape sequence '\s'
file_to_check.py:941:-13228: W605 invalid escape sequence '\s'
file_to_check.py:941:-11196: W605 invalid escape sequence '\d'
file_to_check.py:941:-8162: W605 invalid escape sequence '\d'


Comment last updated on October 02, 2018 at 20:50 Hours UTC

@kne42 kne42 changed the title import demo from main repo initial setup Sep 4, 2018
@kne42 kne42 force-pushed the initial-setup branch 2 times, most recently from 6cd57d5 to 2f97d18 Compare September 10, 2018 18:31
demo.py Outdated Show resolved Hide resolved
@kne42 kne42 merged commit 30f8275 into napari:master Oct 10, 2018
ttung pushed a commit to ttung/napari that referenced this pull request Dec 20, 2019
…visible

The visibilitychanged slot currently updates the title regardless of the visibility. We are seeing a crash when the viewer is shut down and a signal is sent to the visibilitychanged slot.  That executes some code which causes a segfault in the python process[1].  This PR changes the visibility changed slot to only update the title bar if the widget is visible.

[1]
```
  * frame #0: 0x0000000115cc96e4 QtWidgets`QWidgetPrivate::reparentFocusWidgets(QWidget*) + 356
    frame napari#1: 0x0000000115cb99cf QtWidgets`QWidget::setParent(QWidget*, QFlags<Qt::WindowType>) + 911
    frame napari#2: 0x0000000115cb82c0 QtWidgets`QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) + 688
    frame napari#3: 0x0000000115d73e5e QtWidgets`QFrame::QFrame(QFramePrivate&, QWidget*, QFlags<Qt::WindowType>) + 14
    frame napari#4: 0x0000000115dc3705 QtWidgets`QLabel::QLabel(QWidget*, QFlags<Qt::WindowType>) + 277
    frame napari#5: 0x0000000116503189 QtWidgets.abi3.so`Sbk_QLabel_Init(_object*, _object*, _object*) + 1497
    frame napari#6: 0x000000010015f84d Python`wrap_init + 12
    frame napari#7: 0x0000000100113e64 Python`_PyObject_FastCallDict + 143
    frame napari#8: 0x00000001001b17a2 Python`call_function + 439
    frame napari#9: 0x00000001001aa46b Python`_PyEval_EvalFrameDefault + 3078
    frame napari#10: 0x00000001001b1ee2 Python`_PyEval_EvalCodeWithName + 1638
    frame napari#11: 0x00000001001b281b Python`_PyFunction_FastCallDict + 447
    frame napari#12: 0x0000000100113e99 Python`_PyObject_FastCallDict + 196
    frame napari#13: 0x0000000100113fa3 Python`_PyObject_Call_Prepend + 131
    frame napari#14: 0x0000000100113d1e Python`PyObject_Call + 101
    frame napari#15: 0x000000010015f7d1 Python`slot_tp_init + 57
    frame napari#16: 0x000000010015c782 Python`type_call + 178
    frame napari#17: 0x0000000100113e64 Python`_PyObject_FastCallDict + 143
    frame napari#18: 0x00000001001141fa Python`_PyObject_FastCallKeywords + 97
    frame napari#19: 0x00000001001b17a2 Python`call_function + 439
    frame napari#20: 0x00000001001aa4fb Python`_PyEval_EvalFrameDefault + 3222
    frame napari#21: 0x00000001001b28e0 Python`_PyFunction_FastCall + 110
    frame napari#22: 0x0000000100113e99 Python`_PyObject_FastCallDict + 196
    frame napari#23: 0x0000000100113fa3 Python`_PyObject_Call_Prepend + 131
    frame napari#24: 0x0000000100113d1e Python`PyObject_Call + 101
    frame napari#25: 0x000000011126f146 libpyside2.abi3.5.14.dylib`PySide::SignalManager::callPythonMetaMethod(QMetaMethod const&, void**, _object*, bool) + 534
    frame napari#26: 0x000000011126eb77 libpyside2.abi3.5.14.dylib`PySide::SignalManager::qt_metacall(QObject*, QMetaObject::Call, int, void**) + 519
```
sofroniewn pushed a commit that referenced this pull request Jun 9, 2020
* Initial experimental performance monitoring

If NAPARI_PERFMON is defined we use our own QApplication
that times events and sends them to our new PerfTimers
class.

If NAPARI_PERFMON_TRACE_PATH is defined them PerfTimers
will write the timers to a chrome://tracing support log file.

NAPARI_PERFMON also creates a new dock widget QtPerformance
which is very much a WIP. It shows the average UpdateRequest time
which the main paint/draw event that hangs if we are doing IO
during the draw. It also has a text window where it "lots" any
"slow" events (UpdateRequest or otherwise).

* Cleanup, remove unused code, remove print

Create LONG_EVENT_MS class var
Remove print and replace with comment.

* Remove stale comment

* Better comments

* Improve comments

* Set max/min not needed

* perf_timers and tracing comments

Big comment on the lack of full nesting
support for PerfTimers

* Define a perf_counter_ns() to support Python 3.6

* Cleanup QtPerformance, add "uptime"

Add "draw time" and "slow events' labels.
Add lots of comments.
Extract method: _get_timer_info

* Better comment describing the layout

* Add perf_timer context object

* Big iteration of perfmon stuff, put in own utils/perf folder (#1)

* A lot of cleanup/improvement to perf stuff
* Move USE_PERFMON check to event_loop.py
* Split things into mutiple files
* New Debug menu and trace file recording menu options.

* Remove stray method

* use perf.USE_PERFOMON instead of env var

* Add a combo box to set threashold (#2)

* Fix decorator

* Need category, placeholder for now

* New perfmon that works with Jupyter (#3)

New convert_app_for_timing works with Jupyter

The old approach was restricted to gui_qt which is only
used when running napari from the command line.

Now we have 2 approaches. We still do gui_qt for the
console app. But in Viewer we call convert_app_for_timing
and this works for Jupyter.

* Fix comment

* Better classname

* Better comment about QApplication

* Add event to string name mapping for PyQt5

In PySide2 the str() method gives you a nice string name like
'PySide2.QtCore.QEvent.Type.KeyPress' But in PyQt5 it return
a string/integer like '6' which is annoying.

This creates a lookup table on startup. This should be 100% find and
perform fine. So we use it for both PyQt5 and PySide2 to be consisting
so we work the same in both.

* Better comment on convert_app_for_timing call

* Edits for readability. Plus add sys.argv to the QApplication()

* Merge in perf_func/perf_func_name from other branch.

Most of the time we can just use perf_func that uses the function name
by default. Most of the time that's what we want.

* Talley review: moves/fixed Parameters for __init__

* Talley review: allow docking to the right

I just picked "bottom" early on before I knew what was going to be in the
widget. Works fine on the right so yes allowing that here.

* Talley review: use env var directly and late import

Avoid importing perf at all unless we are really using it.

* Better comment

* Talley review: remove allowed_areas entirely
@trasse trasse mentioned this pull request Jul 6, 2020
@brisvag brisvag mentioned this pull request Feb 28, 2024
6 tasks
psobolewskiPhD pushed a commit that referenced this pull request Mar 29, 2024
Rollable instead of n_moveable dims
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants