Skip to content

Commit

Permalink
Merging and fixing (#61)
Browse files Browse the repository at this point in the history
* Clean status message after leave canvas (napari#4607)

* Raise error when rgb True but data not correct dims (napari#4630)

* add ci for asv benchmark suite (napari#4554)

* add ci for asv benchmark suite

* ignore git-lfs stuff?

* split qt from non-qt

* asv: provide custom uninstall command too

* fix yml

* matrix goes under strategy!

* ugh, it's 'uninstall', not 'remove'

* disable build_command

* underscore...

* it has to be a binary in PATH?

* use a different null command

* always yes for pip

* setup qt libs

* use xvfb

* try GabrielBB/xvfb-action

* parameterize 'run'

* add asv quick checks to PR CI

* use osx for qt benchmarks?

* adjust conf path

* fix asv check

* better comment

* add asv run quick to see how long it takes

* asv machine first

* split into another job

* oops typo

* move 'asv checks' to comprehensive

* used sed -E for linux/osx compat

* fix time_on_mouse_move

* skip some tests due to OOM on CI

* handle OOM errors in Labels3DSuite too

* increase timeout

* remove None case from TextManagerSuite

* prevent out of bounds error by allowing only one run per setup in time_remove_as_batch

* configure for label-based triggers

* draft support for scheduled runs and workflow_dispatch

* typo

* fix assigned var

* add delegated workflow that enables comments on PR

* message.txt only needed in PRs

* add some more comments

Co-authored-by: andy-sweet <andy-sweet@users.noreply.github.com>

* do not indent that if

* explicit timeout

Co-authored-by: andy-sweet <andy-sweet@users.noreply.github.com>

* Speed up notebook display tests  (napari#4641)

* test: speed up notebook test by not using viewer to check alt text

* style: pre-commit

* Remove sleep and wait with default timeout instead (napari#4638)

* Update installation instruction in documentation (napari#4639)

* update information about minimal python version

* add information about conda PySide2 install

* Update docs/tutorials/fundamentals/installation.md

Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>

* fix installation command

Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>

* test: Speed up test_viewer tests, split out pyqt5/pyside2 tests again (napari#4646)

* pull out alt-text parameters from viewer

* test: speed up notebook test by not using viewer to check alt text

* style: pre-commit

* magicgui tests work with xdist

* move magicgui test

* refactor keybindings test

* split tests

* fix mac

* fix tox params, and viewer test

* cancel previous  runs

* bump codecov

* explicit backends

* fix win 3.10

* mac to 3.9

* try pip

* fix extra name

* back to tox

* back to tox

* fix env factors

* undo some changes

* remove more whitespace

* add backend to minreq

* try pyside2 on mac

* back to pyqt5 on mac

* 3.10 for mac

* try xdist

* bump maxfail

* undo xdist change

* Add tests for qt_progress_bar.py (napari#4634)

* add tests for qt_progress_bar.py

* coverage _get_value

* More updates to the ignored translations file and translation CI infrastructure (napari#4596)

* rewrite JSON, sorting keys

* Update logic to not reorder strings.

* update json removing nonexisting strings

* fix a couple of pytest fixtures

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* build: slight updates/de-dups in setupcfg (napari#4645)

* build: slight updates/de-dups in setupcfg

* unpin lxml, remove semgrep

* Restore "show all key bindings" shortcut  (napari#4628)

* cleaning code

* provide consistency in shortcut representation

* add shortcut for shortcuts show

* fix test

* add test for action

* ci: fix tox factor names in tests (napari#4660)

* ci: fix tox factor names in tests

* ci: cancel previous runs

* Limit comprehensive test concurrency to 1. (napari#4655)

Just to make sure we don't block testing PRs with main

Mitigate napari#4653

* Do not run `asv` on push (napari#4656)

* do not run asv on test_comprehensive

* report failures as issue if non-PR

* test: speed up magicgui forward ref tests (napari#4662)

* test: speed up magicgui forward ref tests

* test: fix expected layer methods

* Allow to trigger test_translation manually (napari#4652)

* do not use keyword argument for QListWidgetItem (napari#4661)

* Enable patch coverage reporting (napari#4632)

* enable patch coverage

* set target to 0% to get only information

Co-authored-by: Talley Lambert <talley.lambert@gmail.com>

* Move test examples on end of test run them in different CI job  (napari#4647)

* move test examples on end

* allow test because of test order

* skip examples by marker

* exclude examples from test run

* fix tox after merge

* fix conf

* fix failing test

* proper test order on windows

* Apply suggestions from code review

Co-authored-by: Talley Lambert <talley.lambert@gmail.com>

Co-authored-by: Talley Lambert <talley.lambert@gmail.com>

* Fix docs for shape/points layer properties (napari#4659)

* fix names of future shape/points properties

* Also fix current_opacity to opacity

* shape opacity applies to all shapes

* Update docs/howtos/layers/points.md

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* feat: add codespace (napari#4599)

* feat: add codespace

* fix: fix check manifest

* Alternate fix for alt-text issues (napari#4617)

* Alternate fix for alt-text issues

* Re-escape alt-text

* Re-remove meshzoo

* Update explanatory comments

* add dependabot for github actions (napari#4671)

* ci(dependabot): bump peter-evans/create-pull-request from 3 to 4 (napari#4675)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump docker/build-push-action from 2.5.0 to 3 (napari#4676)

* ci(dependabot): bump docker/build-push-action from 2.5.0 to 3

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.5.0 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@ad44023...e551b19)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update .github/workflows/docker-singularity-publish.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Talley Lambert <talley.lambert@gmail.com>

* ci(dependabot): bump docker/metadata-action from 3 to 4 (napari#4679)

Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](docker/metadata-action@v3...v4)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump toshimaru/auto-author-assign from 1.3.4 to 1.5.0 (napari#4678)

Bumps [toshimaru/auto-author-assign](https://github.com/toshimaru/auto-author-assign) from 1.3.4 to 1.5.0.
- [Release notes](https://github.com/toshimaru/auto-author-assign/releases)
- [Changelog](https://github.com/toshimaru/auto-author-assign/blob/main/CHANGELOG.md)
- [Commits](toshimaru/auto-author-assign@v1.3.4...v1.5.0)

---
updated-dependencies:
- dependency-name: toshimaru/auto-author-assign
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Multi-color text with color encodings (napari#4464)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Optimization: convert point slice indices to floats (napari#4648)

* ci(dependabot): bump actions/setup-python from 3 to 4 (napari#4677)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add "Processors": (generalize magicgui return type behavior outside of magicgui) (napari#4543)

* formatting

* add setter

* add test

* extend test

* add test

* make clobber False by default

* wip

* wip, converting magicgui processors

* add add_layer

* Update napari/utils/_injection.py

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* Update napari/utils/_injection.py

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* Update napari/utils/_injection.py

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* Update napari/utils/_injection.py

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* adding tests

* start on worker

* single import

* fix typing

* fix test

* rearrange

* sort lines

* minor

* docs: update docstrings

* use zeros

* get rid of thread

* rename to providers/processors, add decorator

* update docstring

Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* fix: fix manifest reader extensions, ensure that all builtins go through npe2 (napari#4668)

* fix: fix manifest reader extensions

* test: fix tests

* add warning

* add warning

* remove mistake file

* update another test

* fix another test

* revert napari#4575

* some more, but not all, fixed

* remove comment

* change napari builtins display name

* simplify get_potential_readers

* fix one more test

* skip some tests

* fix typecheck

* fix qt tests

* fix another qt test

* remove breakpoint

* remove napari hook implementation

* fix test_get_writer

* sort writer extensions

* remove initialize stuff

* fix cli show test

* bump svg

* allow use of validate_all=True on nested evented models (napari#4551)

* allow validate_all again

* rename to _protocols

* oops

* fix protocol more general

* use normal instance check

* reset source for all fields, not just mutable ones

* recursive source reset

* fix status of nap1 (napari#4685)

* [pre-commit.ci] pre-commit autoupdate (napari#4687)

updates:
- [github.com/asottile/pyupgrade: v2.32.1 → v2.34.0](asottile/pyupgrade@v2.32.1...v2.34.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add new core devs to docs (napari#4691)

* Remove unused points _color state (napari#4666)

* Remove unused function and state

* Also remove unneeded addition

* Add function back

* Clean up PR

* Define different shortcuts for different screenshot actions in file menu (napari#4636)

* test: Cleanup usage of npe2 plugin manager in tests (napari#4669)

* fix: fix manifest reader extensions

* test: fix tests

* add warning

* add warning

* remove mistake file

* update another test

* fix another test

* revert napari#4575

* some more, but not all, fixed

* remove comment

* change napari builtins display name

* simplify get_potential_readers

* fix one more test

* skip some tests

* fix typecheck

* fix qt tests

* fix another qt test

* starting on new pm fixtures.  working sample hook

* update save layers and test reader plugins

* plugins module working

* remove tmp_reader

* more reduction

* finish viewer model

* update qt dialogs

* finish qt_extension2reader

* fix file menu

* add comments

* remove breakpoint

* fix layers

* fix components

* add builtins to examples test

* remove napari hook implementation

* fix test_get_writer

* sort writer extensions

* remove initialize stuff

* fix cli show test

* bump svg

* fix test

* use npe2 0.4.0

* more simplifications

* Update napari/conftest.py

Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>

* remove xfail

* add comment

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Remove unnecessary uses of make_napari_viewer (replace with ViewerModel) (napari#4690)

* remove from experimental chunk

* two more in qt

* bunch more

* remove more

* add back one

* bump npe2, use new features (napari#4686)

* Remove `restore_settings_on_exit` test util (napari#4673)

* fix: fix manifest reader extensions

* test: fix tests

* add warning

* add warning

* remove mistake file

* update another test

* fix another test

* revert napari#4575

* some more, but not all, fixed

* remove comment

* change napari builtins display name

* simplify get_potential_readers

* fix one more test

* skip some tests

* fix typecheck

* fix qt tests

* fix another qt test

* starting on new pm fixtures.  working sample hook

* update save layers and test reader plugins

* plugins module working

* remove tmp_reader

* more reduction

* finish viewer model

* update qt dialogs

* finish qt_extension2reader

* fix file menu

* add comments

* remove breakpoint

* fix layers

* fix components

* add builtins to examples test

* remove restore_settings_on_exit

* add comment

* remove napari hook implementation

* fix test_get_writer

* sort writer extensions

* remove initialize stuff

* fix cli show test

* bump svg

* fix test

* remove unneeded line

* fix test

* Add modal dialogs for window/application closure (napari#4637)

Co-authored-by: alisterburt <alisterburt@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Juan Nunez-Iglesias <jni@fastmail.com>

* Design issue template assignees (napari#4701)

Issue template for design-related issues now should auto-assign any created issues to Lisa and Isabela (formerly it assigned to Lia)

* Keep order of layers when select to save multiple selected layers (napari#4689)

* honor confirm close settings when quitting (napari#4700)

* honor confirm close settings on quit

* update string

* Update napari/settings/_application.py

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>

* Update napari/settings/_application.py

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>

* Add option to use npe2 shim/adaptor for npe1 plugins (napari#4564)

* add opt-in npe2 shim

* add comment

* show shims in plugin installer

* don't use mock

* fix: fix manifest reader extensions

* test: fix tests

* add warning

* add warning

* remove mistake file

* update another test

* fix another test

* revert napari#4575

* some more, but not all, fixed

* remove comment

* change napari builtins display name

* simplify get_potential_readers

* fix one more test

* skip some tests

* fix typecheck

* fix qt tests

* fix another qt test

* remove breakpoint

* remove napari hook implementation

* fix test_get_writer

* update docs

* add trans

* add requires restart

* use requires_restart

* Use python 3.9 for mac tests until numcodecs 3.10 wheels are available (napari#4707)

* Apply shown mask to points._view_size_scale (napari#4699)

* Apply shown mask to points._view_size_scale

* Added two tests for points related to the view_size and shown

* Add test case for view_size if no point is shown

* Update test to check for the actual dimension as well

* Put a comment explaining the 3 if statements

* Merge two tests into one for view_size

Co-authored-by: Markus Stabrin <markus.stabrin@gmail.com>

* remove print (napari#4718)

* Use `cache: pip` from actions setup-python (napari#4672)

* try pip cache

* more cache

* tox vv

* use cache in comprehensive too

* remove verbose

* use same coverage report like in pull requests (napari#4722)

* fix presentation and enablement of npe1 plugins (napari#4721)

* Improvements on scale bar (napari#4511)

* Background box under scale bar to improve legibility

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Now possible to change the color of scale bar and surrounding box

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updated test and clean up for box visibility

* scale bar color now managing all allowed color formats. Tests updated

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Removed unused import of Union

* Simplify logic and add docs

* Make colors non-optional

* Fix initial box color

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>

* napari.viewer.current_viewer fallback ancestor (napari#4715)

* napari.viewer.current_viewer fallback ancestor

The use case is modal dialogs from magicgui.request_values, who have no parent. If they wish to use a layer, they must get that layer from the current viewer.

* Fix test_magicgui_get_viewer

This was broken as it now returns current_viewer where it did not
before. Now, we ensure that a parent-less widget returns current_viewer,
  and a child widget returns its parent viewer

* Test current_viewer behavior

At the request of @ctrueden

* Add NAP-3: Spaces (napari#4684)

* nap 3

* finish up first draft of nap3

* address comments and fix grammar

* incorporate some comments

* Color edit without tooltip fix (napari#4717)

* Fix typo in QColorSwatchEdit

* Add a new test for QColorSwatch

* Use some features from npe2 v0.5.0 (napari#4719)

* bump version

* use npe2pm

* Update translation documentation link in pull request template (napari#4728)

* Refactor label painting by moving code from mouse bindings onto layer, adding staged history and paint event (napari#4702)

* Fix bug in deepcopy of utils.context.Expr (napari#4730)

* add tests for deepcopy of Expr

* fix repr test on 3.8

* fix test again

* Update napari/utils/context/_expressions.py

* try to fix typing

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>

* Tracks tail update fix beyond _max_length (napari#4688)

* Auto-update _max_length upon setting tail_length

* Remove tail_length clipping by _max_length upon update

* Move track display limits to constructor

* - Auto-update _max_length upon setting head_length
- Remove head_length clipping by _max_length upon update

* Add test cases for length change

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* split Image `interpolation` on two properties, `interpoltion2d` and `interpolation3d`  (napari#4725)

* add name migration mechanism

* split interpolation on 2 properties

fix tests

* make interpolation event deprecated

* add remove version to `rename_argument` decorator

* verify if only one name of argument is used

* change to deprecation warnings

* make interpolation getter deprecated

* move intepolation event to new setters

* add type annotation for better refactor support

* fix test

* fix tox file

* fix tox 2

* fix tox 3

* Fix Image parameter docs (napari#4750)

* Fix `_get_state` for empty Vectors and Points layers (napari#4748)

* Add a public API for the setGeometry method of _qt_window (napari#4729)

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Do not inform about coverage untill all CI jobs are done (napari#4751)

* do not inform about coverage untill all jobs are done

* fix codecov.yaml

* reduce number

* Allow pandas.Series as properties values (napari#4755)

* Allow pandas.Series as properties values

* Add numpy array to the tests and mixed cases

* Add series property tests to points layer

* Adjust according to reviews

* Remove debug prints

* ci(dependabot): bump docker/login-action from 1.9.0 to 2 (napari#4774)

Bumps [docker/login-action](https://github.com/docker/login-action) from 1.9.0 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@28218f9...49ed152)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump bruceadams/get-release from 1.2.2 to 1.2.3 (napari#4773)

Bumps [bruceadams/get-release](https://github.com/bruceadams/get-release) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/bruceadams/get-release/releases)
- [Commits](bruceadams/get-release@v1.2.2...v1.2.3)

---
updated-dependencies:
- dependency-name: bruceadams/get-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump actions/github-script from 5 to 6 (napari#4772)

Bumps [actions/github-script](https://github.com/actions/github-script) from 5 to 6.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](actions/github-script@v5...v6)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump actions/download-artifact from 2 to 3 (napari#4771)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci(dependabot): bump styfle/cancel-workflow-action from 0.9.1 to 0.10.0 (napari#4770)

Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/styfle/cancel-workflow-action/releases)
- [Commits](styfle/cancel-workflow-action@0.9.1...0.10.0)

---
updated-dependencies:
- dependency-name: styfle/cancel-workflow-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Make references to examples link there (napari#4767)

* docs/index: fix references to main branch

* Make references to examples folder link there

* fix clim init for dask arrays (napari#4724)

* fix clim init for dask arrays

* fix tensorstore

* avid double-calculation

* add test for clim

* move test to dask and make sync only

* use normalize_dtype

* Set focus on `QtViewer` object after creating main window (napari#4768)

* Add missed call of `running_as_bundled_app` in `__main__` (napari#4777)

* Add public API for dims transpose (napari#4727)

* Update dims.py

Add public API for dims transpose

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove _transpose usage, deprecate it and fix typos

* Fix typo

* Update napari/components/dims.py

Co-authored-by: Kevin Yamauchi <kevin.yamauchi@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update dims.py

Remove old _transpose private method

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Co-authored-by: Kevin Yamauchi <kevin.yamauchi@gmail.com>

* Use `npe2 list` to show plugin info (napari#4739)

* use npe2 list for plugin info

* bump npe2

* fix test

* fix test

* Fix source of copied layer events by use `layer.as_layer_data_tuple` (napari#4681)

* Fixing readme typo (napari#4791)

* readd ensure_unique

Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
Co-authored-by: Lucy Liu <jliu176@gmail.com>
Co-authored-by: Jaime Rodríguez-Guerra <jaimergp@users.noreply.github.com>
Co-authored-by: andy-sweet <andy-sweet@users.noreply.github.com>
Co-authored-by: Talley Lambert <talley.lambert@gmail.com>
Co-authored-by: Andy Sweet <andrew.d.sweet@gmail.com>
Co-authored-by: Draga Doncila Pop <17995243+DragaDoncila@users.noreply.github.com>
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Guillaume Witz <guiwitz@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: alisterburt <alisterburt@gmail.com>
Co-authored-by: Juan Nunez-Iglesias <jni@fastmail.com>
Co-authored-by: Lia Prins <53277128+liaprins-czi@users.noreply.github.com>
Co-authored-by: Markus Stabrin <markus.stabrin@mpi-dortmund.mpg.de>
Co-authored-by: Markus Stabrin <markus.stabrin@gmail.com>
Co-authored-by: Pierre Thibault <pierrethibault@users.noreply.github.com>
Co-authored-by: Gabriel Selzer <gjselzer@wisc.edu>
Co-authored-by: cnstt <104427648+cnstt@users.noreply.github.com>
Co-authored-by: Kushaan Gupta <gkushaan@rediffmail.com>
Co-authored-by: David Stansby <dstansby@gmail.com>
Co-authored-by: Curtis Rueden <ctrueden@wisc.edu>
Co-authored-by: Kevin Yamauchi <kevin.yamauchi@gmail.com>
Co-authored-by: Jordão Bragantini <jordao.bragantini@gmail.com>
  • Loading branch information
1 parent ded23b0 commit b68fac7
Show file tree
Hide file tree
Showing 179 changed files with 4,175 additions and 2,081 deletions.
9 changes: 9 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/python-3-miniconda/.devcontainer/base.Dockerfile

FROM mcr.microsoft.com/vscode/devcontainers/miniconda:0-3


RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 \
libxcb-render-util0 libxcb-xinerama0 libxkbcommon-x11-0
19 changes: 19 additions & 0 deletions .devcontainer/add-notice.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Display a notice when not running in GitHub Codespaces

cat << 'EOF' > /usr/local/etc/vscode-dev-containers/conda-notice.txt
When using "conda" from outside of GitHub Codespaces, note the Anaconda repository
contains restrictions on commercial use that may impact certain organizations. See
https://aka.ms/vscode-remote/conda/miniconda
EOF

notice_script="$(cat << 'EOF'
if [ -t 1 ] && [ "${IGNORE_NOTICE}" != "true" ] && [ "${TERM_PROGRAM}" = "vscode" ] && [ "${CODESPACES}" != "true" ] && [ ! -f "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then
cat "/usr/local/etc/vscode-dev-containers/conda-notice.txt"
mkdir -p "$HOME/.config/vscode-dev-containers"
((sleep 10s; touch "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed") &)
fi
EOF
)"

echo "${notice_script}" | tee -a /etc/bash.bashrc >> /etc/zsh/zshrc
47 changes: 47 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/python-3-miniconda
{
"name": "Miniconda (Python 3)",
"build": {
"context": "..",
"dockerfile": "Dockerfile",
"args": {
"NODE_VERSION": "none"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"python.linting.enabled": true,
"python.linting.mypyEnabled": true,
"python.linting.flake8Enabled": true,
"python.formatting.blackPath": "/opt/conda/bin/black",
"python.linting.flake8Path": "/opt/conda/bin/flake8",
"python.linting.mypyPath": "/opt/conda/bin/mypy",
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [5900, 5901, 6080],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip install -U pip && pip install -e .[dev] && pre-commit install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"git": "os-provided",
"github-cli": "latest",
"desktop-lite": {
"password": "napari",
"webPort": "6080",
"vncPort": "5901"
}
}
}
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/design_related.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ assignees: liaprins-czi
---

### Overview of design need
- Is there an existing GitHub issue this design work pertains to?
- If so, provide a link to it
- Is there an existing GitHub issue this design work pertains to? If so, provide a link to it
- Also link to any specific comments or threads where the problem to be solved by design is mentioned
- In a sentence or two, describe the problem to be solved for users

Expand All @@ -18,7 +17,7 @@ _This section may be updated by the designer / UX researcher working on this iss

- [ ] **User experience research:** high-level recommendation/exploration of user needs, design heuristics, and / or best practices to inform a design experience
(Use this option when you feel there’s a challenge to be solved, but you’re curious about what the experience should be — may involve research studies to understand challenges/opportunities for design)
- [ ] **information flow / conceptual:** organizing and structuring of information flow and content, including layout on screen or across multiple steps
- [ ] **Information flow / conceptual:** organizing and structuring of information flow and content, including layout on screen or across multiple steps
- [ ] **Visual:** creating mockups, icons, etc
(If choosing this level alone, it means that the content to be mocked up and its organization is already known and specified)

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] If I included new strings, I have used `trans.` to make them localizable.
For more information see our [translations guide](https://napari.org/docs/dev/guides/translations.html).
For more information see our [translations guide](https://napari.org/developers/translations.html).
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
commit-message:
prefix: "ci(dependabot):"
2 changes: 1 addition & 1 deletion .github/workflows/auto_author_assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v1.3.4
- uses: toshimaru/auto-author-assign@v1.5.0
166 changes: 166 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# This CI configuration for relative benchmarks is based on the research done
# for scikit-image's implementation available here:
# https://github.com/scikit-image/scikit-image/blob/9bdd010a8/.github/workflows/benchmarks.yml#L1
# Blog post with the rationale: https://labs.quansight.org/blog/2021/08/github-actions-benchmarks/

name: Benchmarks

on:
pull_request:
types: [labeled]
schedule:
- cron: "6 6 * * 0" # every sunday
workflow_dispatch:
inputs:
base_ref:
description: "Baseline commit or git reference"
required: true
contender_ref:
description: "Contender commit or git reference"
required: true

# This is the main configuration section that needs to be fine tuned to napari's needs
# All the *_THREADS options is just to make the benchmarks more robust by not using parallelism
env:
OPENBLAS_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
OMP_NUM_THREADS: "1"
ASV_OPTIONS: "--split --show-stderr --factor 1.5 --attribute timeout=300"
# --split -> split final reports in tables
# --show-stderr -> print tracebacks if errors occur
# --factor 1.5 -> report anomaly if tested timings are beyond 1.5x base timings
# --attribute timeout=300 -> override timeout attribute (default=60s) to allow slow tests to run
# see https://asv.readthedocs.io/en/stable/commands.html#asv-continuous for more details!

jobs:
benchmark:
if: ${{ github.event.label.name == 'run-benchmarks' && github.event_name == 'pull_request' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
name: ${{ matrix.benchmark-name }}
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- benchmark-name: Qt
asv-command: continuous
selection-regex: "^benchmark_qt_.*"
runs-on: macos-latest
# Qt tests run on macOS to avoid using Xvfb business
# xvfb makes everything run, but some tests segfault :shrug:
# Fortunately, macOS graphics stack does not need xvfb!
- benchmark-name: non-Qt
asv-command: continuous
selection-regex: "^benchmark_(?!qt_).*"
runs-on: ubuntu-latest

steps:
# We need the full repo to avoid this issue
# https://github.com/actions/checkout/issues/23
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.9"

- uses: tlambert03/setup-qt-libs@v1

- name: Setup asv
run: python -m pip install asv virtualenv

- uses: octokit/request-action@v2.x
id: latest_release
with:
route: GET /repos/{owner}/{repo}/releases/latest
owner: napari
repo: napari
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run ${{ matrix.benchmark-name }} benchmarks
id: run_benchmark
env:
# asv will checkout commits, which might contain LFS artifacts; ignore those errors since
# they are probably just documentation PNGs not needed here anyway
GIT_LFS_SKIP_SMUDGE: 1
run: |
set -euxo pipefail
# ID this runner
asv machine --yes
if [[ $GITHUB_EVENT_NAME == pull_request ]]; then
EVENT_NAME="PR #${{ github.event.pull_request.number }}"
BASE_REF=${{ github.event.pull_request.base.sha }}
CONTENDER_REF=${GITHUB_SHA}
echo "Baseline: ${BASE_REF} (${{ github.event.pull_request.base.label }})"
echo "Contender: ${CONTENDER_REF} (${{ github.event.pull_request.head.label }})"
elif [[ $GITHUB_EVENT_NAME == schedule ]]; then
EVENT_NAME="cronjob"
BASE_REF="${{ fromJSON(steps.latest_release.outputs.data).target_commitish }}"
CONTENDER_REF="${GITHUB_SHA}"
echo "Baseline: ${BASE_REF} (${{ fromJSON(steps.latest_release.outputs.data).tag_name }})"
echo "Contender: ${CONTENDER_REF} (current main)"
elif [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
EVENT_NAME="manual trigger"
BASE_REF="${{ github.event.inputs.base_ref }}"
CONTENDER_REF="${{ github.event.inputs.contender_ref }}"
echo "Baseline: ${BASE_REF} (workflow input)"
echo "Contender: ${CONTENDER_REF} (workflow input)"
fi
echo "EVENT_NAME=$EVENT_NAME" >> $GITHUB_ENV
echo "BASE_REF=$BASE_REF" >> $GITHUB_ENV
echo "CONTENDER_REF=$CONTENDER_REF" >> $GITHUB_ENV
# Run benchmarks for current commit against base
asv continuous $ASV_OPTIONS -b '${{ matrix.selection-regex }}' ${BASE_REF} ${CONTENDER_REF} \
| sed -E "/Traceback | failed$|PERFORMANCE DECREASED/ s/^/::error:: /" \
| tee asv_continuous.log
# Report and export results for subsequent steps
if grep "Traceback \|failed\|PERFORMANCE DECREASED" asv_continuous.log > /dev/null ; then
exit 1
fi
- name: Report Failures
if: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: ${{ matrix.runs-on }}
PYTHON: "3.9"
BACKEND: ${{ matrix.benchmark-name }}
RUN_ID: ${{ github.run_id }}
TITLE: "[test-bot] Benchmark tests failing"
with:
filename: .github/TEST_FAIL_TEMPLATE.md
update_existing: true

- name: Add more info to artifact
if: always()
run: |
# Copy the full `asv continuous` log
cp asv_continuous.log .asv/results/
# Add the message that might be posted as a comment on the PR
# We delegate the actual comment to `benchmarks_report.yml` due to
# potential token permissions issues
if [[ $GITHUB_EVENT_NAME == pull_request ]]; then
echo "${{ github.event.pull_request.number }}" > .asv/results/pr_number
cat <<EOF > .asv/results/message.txt
The benchmark run requested by $EVENT_NAME ($CONTENDER_REF vs $BASE_REF) has
finished with status `${{ steps.run_benchmark.outcome }}`. See the
[CI logs and artifacts](||BENCHMARK_CI_LOGS_URL||) for further details.
EOF
fi
- uses: actions/upload-artifact@v3
if: always()
with:
name: asv-benchmark-results-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
path: .asv/results
60 changes: 60 additions & 0 deletions .github/workflows/benchmarks_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# We need a dual workflow to make sure the token has the needed permissions to post comments
# See https://stackoverflow.com/a/71683208 for more details

name: Report benchmarks

on:
workflow_run:
workflows: [Benchmarks]
types:
- completed

jobs:
download:
runs-on: ubuntu-latest
steps:
- name: "Download artifact"
uses: actions/github-script@v6
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let artifactName = `asv-benchmark-results-${context.payload.workflow_run.id}-${context.payload.workflow_run.run_number}-${context.payload.workflow_run.run_attempt}`
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == artifactName
})[0];
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/asv_results.zip`, Buffer.from(download.data));
- name: Unzip and prepare data
run: |
unzip asv_results.zip
sed -i 's/||BENCHMARK_CI_LOGS_URL||/${{ github.event.workflow_run.html_url }}/g' .asv/results/message.txt
if [[ -f .asv/results/pr_number ]]; then
echo "PR_NUMBER=$(cat .asv/results/pr_number)" >> $GITHUB_ENV
fi
- name: "Comment on PR"
if: env.PR_NUMBER != ''
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let fs = require('fs');
let issue_number = Number(process.env.PR_NUMBER);
let body = fs.readFileSync('.asv/results/message.txt');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: 'Thank you for the PR!'
});
2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# This is a bundling of the pattern in this comment:
# https://github.com/actions/checkout/issues/165#issuecomment-657673315

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
# This is a bundling of the pattern in this comment:
# https://github.com/actions/checkout/issues/165#issuecomment-657673315

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-singularity-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand All @@ -53,7 +53,7 @@ jobs:
# https://github.com/docker/build-push-action/blob/master/docs/advanced/tags-labels.md
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
Expand All @@ -75,7 +75,7 @@ jobs:
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand Down
Loading

0 comments on commit b68fac7

Please sign in to comment.