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

Add NAP-3: Spaces #4684

Merged
merged 4 commits into from
Jun 22, 2022
Merged

Add NAP-3: Spaces #4684

merged 4 commits into from
Jun 22, 2022

Conversation

brisvag
Copy link
Contributor

@brisvag brisvag commented Jun 13, 2022

Description

Following the discussion in #4419, here's a condensed version of the spaces proposal, in NAP form.

I hope I addressed most comments in the original discussion; if not, please let me know and I will update the NAP by extending the Alternatives section (or whatever else is appropriate).

Note that, while I made a point against the "multiple viewers" approach based on nomenclature, I don't feel strongly about the "spaces" name, so you're welcome to propose anything more intuitive/better sounding than that :)

NAP away! 😴

Copy link
Contributor

@alisterburt alisterburt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @brisvag - approving so that this can be merged at earliest convenience for discussion!

I'm 100% in agreement that we need this feature but not so sure on the proposed implementation. To me, the top level app interface feels cleaner and better supports both 'spaces' (multiple viewers in one window) and 'multiple viewers' (multiple viewers in multiple windows). It also signifies a cleaner API break which might be a benefit for such a large feature. I would propose that we go that way but let's see what others say :-)

See #4419 for more discussion around the top-level app API

@Czaki
Copy link
Collaborator

Czaki commented Jun 13, 2022

For me, current NAP text sounds more like "states", not "spaces"

@brisvag
Copy link
Contributor Author

brisvag commented Jun 13, 2022

To me, the top level app interface feels cleaner and better supports both 'spaces' (multiple viewers in one window) and 'multiple viewers' (multiple viewers in multiple windows).

Can you elaborate on this a bit, so I can add a proposed API in the alternative section? Something like I did above for the proposed api would be nice, so we know exactly where everything would live. At present, I can imagine something like:

app.viewers
app.viewer   # active viewer
app.spaces
# spaces are viewer-independent

Or something along those lines, which to me feels a lot clunkier, while effectively doing the same thing as this proposal. I don't generally see the benefit of this extra app step, other than, as you mentioned, signaling a clear break. But why do we need that, if the change can be backward compatible?

Or do we want to anticipate the api break to now, expecting that in the future we'll want spaces to be viewer-independent, and be able to show the same space in different viewers? To me it seems that this should be a multicanvas thing, rather than multi-viewer. What use case wants the same data in separate windows but would be unhappy with the same data in easily-switchable spaces in the same window, or else in two separate side-by-side canvas?

@brisvag
Copy link
Contributor Author

brisvag commented Jun 13, 2022

For me, current NAP text sounds more like "states", not "spaces"

That's a reasonable name as well. While I suppose states is technically more correct, I personally find it a bit too generic, compared to spaces, which conveys the idea better to me. I would like to hear what others think as well!

@kevinyamauchi
Copy link
Contributor

Super cool NAP, @brisvag !

I haven't had a chance to dive in yet, but I saw the discussion about the name and I wanted to quickly mention that I would prefer something other than "spaces". While I agree "spaces" is pretty nice, I have been seeing spaces popping up in various places (e.g., OME-NGFF and some discussions here in napari) to describe set of axes for a coordinate system. For example, in napari, the layer data coordinate system would be a space and the global coordinate system would be a different space. Personally, I like "space" better for describing coordinate systems and if possible, would prefer to reserve it for that.

I agree with @Czaki that "states" feels more "technically correct", but it may be too jargoney. I'll give it some thought and see if I think of anything else.

@alisterburt
Copy link
Contributor

Can you elaborate on this a bit, so I can add a proposed API in the alternative section? Something like I did above for the proposed api would be nice, so we know exactly where everything would live. At present, I can imagine something like:

What I imagined is more along the lines of

app.viewers
app.viewer   # active viewer
app.window # active window

could also add app.windows for multiple windows 🙂

This clearly separates out the application (the thing running the event loop) from the windows which may contain one or more viewers (your spaces). I don't think the viewer==window association is that strong, I think the familiarity is more with the Viewer API.

The hierarchy just feels a bit simpler to me with a top level thing to which everything else belongs I think, don't have to think about it so much

Copy link
Member

@andy-sweet andy-sweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand the NAP process, this looks good to me as a draft.

I made some typo/grammar-bot comments/suggestions, which would be to fix before merging. I also had some questions, which are optional for now, but probably need to be answered at some point.

docs/naps/3-spaces.md Outdated Show resolved Hide resolved

While the nomenclature is not one of the important points of this NAP, I find the use of the word `Viewer` confusing in this alternative implementation. Intuitively, for me (and, I expect, for most users) the `Viewer` is the window, regardless of the abstraction of `ViewerModel` and `Viewer` that we have on the backend. Additionally, the above changes would cause a big API change in the most basic interaction with `napari` (`app.viewer` rather than `viewer`), unless we "hide" it away (`viewer.app.viewers`), which would hurt usability and discoverability.

Additionally, there are no benefits to keeping multiple `ViewerModel` objects alive, since their purpose is simply to act as an evented model to update GUI.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Additionally, there are no benefits to keeping multiple `ViewerModel` objects alive, since their purpose is simply to act as an evented model to update GUI.
Additionally, there are no benefits to keeping multiple `ViewerModel` objects alive, since their purpose is simply to act as an evented model to update the GUI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They also store some state related to the presentation of the canvas that is independent of the layers (i.e. grid, scale_bar, text_overlay, overlays). Would a space have its own instances of those? My guess is that a space might store some (e.g. the text overlay may only be relevant for that space), but not others (e.g. if you want a scale bar in one canvas, you probably want it in others).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good question, I didn't think about those... My gust reaction is yes, they should store that state; in fact, it might be as simple as doing (pseudocode):

viewer.spaces[0] = viewer.dict()
...
viewer.update(viewer.spaces[0])

I'm also starting to be convinced by the "states" name argument, since it's clearly more than just a "physical" space that we need to track.

And yes, I realize that at this point we are simply reproducing the full ViewerModel, which kinda weakens my argument against using "multiple viewers"... I still think it's better to not keep many ViewerModel objects (the you have to deal with connecting/disconnecting events, the slowness of EventedModel instantiation, ...); also, I still find the naming scheme of that one just too confusing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have to deal with connecting/disconnecting events, the slowness of EventedModel instantiation

Does having multiple Viewer objects mean this? How is it different from a space (~=ViewerModel) which also needs to update the GUI?

Copy link
Contributor Author

@brisvag brisvag Jun 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They also store some state related to the presentation of the canvas that is independent of the layers (i.e. grid, scale_bar, text_overlay, overlays).

I added this to the API proposal, with some space left for discussion. I will update again in a follow up PR once people have given their opinion.

docs/naps/3-spaces.md Outdated Show resolved Hide resolved
docs/naps/3-spaces.md Outdated Show resolved Hide resolved
docs/naps/3-spaces.md Outdated Show resolved Hide resolved
docs/naps/3-spaces.md Outdated Show resolved Hide resolved
Comment on lines 51 to 52
- `camera`: a snapshot of the `Camera` model
- `dims`: a snapshot of the `Dims` model
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean by snapshot here. Wouldn't each space have its own dedicated instance of Camera and Dims? And then if we wanted to refer to Viewer.dims that would refer to dims of the current space?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't read... these are the instances of the current space.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To calrify: I'm saying that Space should hold the state of these objects, not the object themselves (i.e: Dims.dict()).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified in the text.

- `dims`: a snapshot of the `Dims` model
- ...

In general, the most intuitive approach would be to mirror the basic `Layer` api (i.e: with `name`, `metadata`, possibly `source`...).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In general, the most intuitive approach would be to mirror the basic `Layer` api (i.e: with `name`, `metadata`, possibly `source`...).
In general, the most intuitive approach would be to mirror the basic `Layer` API (i.e: with `name`, `metadata`, possibly `source`...).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure exactly what you mean by this sentence. I understand that a space has a name and some layers associated with it through the layerlist, but I don't understand what its metadata and source are and how they're connected to the layer's.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metadata is always useful; if someone wants to mark each space with (for example) different experimental conditions, that should be possible.

source could be populated the same way as layers, in case (as mentioned in the Plugins section) a reader were to return spaces rather than just layers (if that part of the proposal gets accepted).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified in the text.

docs/naps/3-spaces.md Outdated Show resolved Hide resolved
This NAP discusses the reasons why a native napari approach would be better than the currently available workarounds. It then proposes the introduction of `spaces` as a way to manage different coordinate spaces in the same viewer.


# Motivation and Scope
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: some of your headings (like this one) are in Title Case whereas others like ## Multiple viewers are in Sentence case.

Would be good to be consistent throughout this doc. I have a vague memory that napari doc headings were supposed to be in Sentence case, which is also my preference, but I can't find that rule right now. The NAP template uses Title Case, so if that's true, we should probably update the template.

Apologies for this long nit. And apologies for the English language.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hehe, no proble, thanks for pointing out!

docs/naps/3-spaces.md Outdated Show resolved Hide resolved

# Motivation and Scope

This NAP aims to address a few problems that arise (especially with big datasets), when working with many layers that do not necessarily belong to the same *absolute* coordinate space. For example, there is no reason to relate between the *absolute* coordinates of `image 1` and `image 2` from the same microscopy data collection, but it might be useful to quickly switch between the two to -- for example -- compare the effectiveness of a processing step on different images, or to visually inspect qualitative differences.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to add what you think is out of scope for this NAP/project - at least I often find that useful to be keep the size of the work manageable.

In particular, I think it would be good to clarify if a layer can be in more than one space. If not, then you don't have to worry so much about the kind of issues discussed in #4682.

@alisterburt
Copy link
Contributor

cc @LCObus potentially interesting UX questions around the proposed APIs here

@alisterburt
Copy link
Contributor

had a productive discussion with @brisvag this morning - some notes!

In the below I'm going to call 'spaces' ViewerState
If ViewerStates live on the viewer and the viewer is the top level object this provides a nice simple API for users who are used to interacting with the viewer

viewer.active_state = viewer_states[-1]  # other APIs possible for state application

This use case is more clunky if spaces live at a higher level

app = napari.get_app()  # could also provide an accessor for viewer states directly
app.viewer_states[-1].apply(viewer)  # other APIs possible for state application

If ViewerStates live on the viewer then they will live in multiple places if we have multiple windows - I don't think I like this. Multiple viewers in one window also feels hard to support if we store states on the viewers... I need to clarify my thoughts and write things down I think

Copy link
Contributor

@tlambert03 tlambert03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand the NAP process, this looks good to me as a draft.

same here! definitely worth some discussion. Thanks for formalizing this @brisvag.

I'm still not convinced that we need a new concept/name for this, as opposed to better management of multiple viewers, but I do welcome the opportunity to think about it nicely laid out like this.

@Czaki
Copy link
Collaborator

Czaki commented Jun 14, 2022

One big worry (that may be addressed in following PR). What should happen if we have layer in multiple spaces and modify it. Did we should make a copy of it to keep all other states untouched. Or it is OK that all spaces will be impacted?

@brisvag
Copy link
Contributor Author

brisvag commented Jun 14, 2022

I'm still not convinced that we need a new concept/name for this, as opposed to better management of multiple viewers, but I do welcome the opportunity to think about it nicely laid out like this.

I think we really need to clarify exactly what we mean by multiple viewers here. I think that working with multiple ViewerModels is problematic (having to connect/disconnect all the events, the slowness of instantiation of many when starting napari, the fact that some fields would probably actually clash (like theme, or cursor).

This is assuming that we want a separation (and not a 1to1 relationship) of Window and ViewerModel (which it seems we do).

If you agree with the above, then we need some way of encoding the state of these ViewerModels, but in a way that's not exactly a ViewerModel itself. Call it Space or Steve, but we definitely need something else :P

If I'm missing the point, It would be nice to see an API (pseudocode) example of how you imagine interacting with multiple viewers in a way that does not require adding a new abstraction, so we can add that to the Alternatives and make it easier to compare!

@brisvag
Copy link
Contributor Author

brisvag commented Jun 14, 2022

One big worry (that may be addressed in following PR). What should happen if we have layer in multiple spaces and modify it. Did we should make a copy of it to keep all other states untouched. Or it is OK that all spaces will be impacted?

I think yes, all spaces should be affected. This NAP is not about separating info about rendering from data, so layers will still be a single source of truth for both. If you want different data, you should get a different layer. This can of course change in the future if/when we get the data and rendering separated.

One reason why I think you're worried about this, is because you're thinking of Spaces in terms of States (maybe an argument against the name), which suggests that the whole viewer state is preserved, as if it was a snapshot in time, data included. But this is not the intended purpose; we want to preserve a few rendering-related things (dims, camera, which layers are loaded, maybe little more), but no info about the layer state themselves, nor about the window.

@tlambert03
Copy link
Contributor

yep yep, I agree more is needed.

having to connect/disconnect all the events

by the way, I think this is actually a pretty critical problem in the current design of napari. Though it seems laborious to have to connect/disconnect all of the events of a given model from a given view... I think that that, in fact, should be a mandatory method in any of our objects that make connections at all. We in general just go nuts connecting things, without keeping track of the connections that have been made. But we have to make it get better about making it clear how to connect/disconnect all the events. (This is part of why #3184 got so hard.) So, if any part of this is motivated by the current difficulty in connecting/disconnecting all the events, then I'd say that's also something that should be tackled first

@brisvag
Copy link
Contributor Author

brisvag commented Jun 22, 2022

So, if any part of this is motivated by the current difficulty in connecting/disconnecting all the events, then I'd say that's also something that should be tackled first.

While it's an annoyance, wouldn't say this issue is a motivation for this NAP; I was referring to how expensive it is to hook up all the events, rather than the technical challenge itself. I've seen first-hand in #4597 that this can hit performance quite a lot. On the other hand, such slowdown might be less relevant in this case because we're not connecting the hundreds of events that get connected during validation in #4597.

@tlambert03
Copy link
Contributor

We have three core dev approvals to add this in draft state. I'm going to merge this later today. This doesn't mean the NAP is accepted (see the NAP workflow if you want a reminder on the workflow), it just means enough people think it warrants more public discussion. @brisvag can gather the primary discussion points and update the NAP later

@tlambert03 tlambert03 merged commit 67e6771 into napari:main Jun 22, 2022
@Carreau Carreau added this to the 0.4.17 milestone Jun 23, 2022
tlambert03 added a commit to tlambert03/napari that referenced this pull request Jul 8, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants