Skip to content

Commit

Permalink
Merge branch 'main' into patch-6
Browse files Browse the repository at this point in the history
  • Loading branch information
DragaDoncila authored Nov 20, 2024
2 parents 377530f + 4486fbb commit 1e588dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 29 deletions.
28 changes: 5 additions & 23 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
# See: .github/workflows/labeler.yml and https://github.com/marketplace/actions/labeler
design:
- 'napari/_qt/qt_resources/**/*'

documentation:
- 'docs/**/*'
- 'docs/*'

preferences:
- 'napari/_qt/**/*/preferences_dialog.py'
- 'napari/settings/**/*.py'

qt:
- 'napari/_qt/**/*.py'
- 'napari/_qt/**/*.py'
- 'napari/qt/**/*.py'
- 'napari/qt/**/*.py'

task:
- '.github/**/*'

tests:
- '**/*/_tests/**/*.py'
- changed-files:
- any-glob-to-any-file: 'docs/*'

vispy:
- 'napari/_vispy'
maintenance:
- changed-files:
- any-glob-to-any-file: ['.circleci/*', '.github/**/*']
7 changes: 4 additions & 3 deletions docs/developers/architecture/app_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ dependency to be injected.
Result processing allows you to process the return value of the command function at
execution time, based on command return type annotations.
For example, you may wish to automatically add layer data output from a command
to the viewer. It is performed by `processors`, functions that accept an instance of a
to the viewer. It is performed by processors, functions that accept an instance of a
given type and do something with it. Note that any value returned by a processor will
be ignored, it is the 'processor' function side effects that perform the desired
action (e.g., adding layer data to the viewer).
Expand Down Expand Up @@ -392,7 +392,8 @@ instead of command execution time.

Internally, napari registers a provider that returns the first Points layer of the
current viewer, if one present (returning `None` if not). It is
registered in the `app.injection_store` via `app.injection_store.register_provider`. Processors can be registered in the same way.
registered in the `app.injection_store` via `app.injection_store.register_provider`.
Processors can be registered in the same way.

```python
from napari._app_model import get_app_model
Expand Down Expand Up @@ -458,7 +459,7 @@ napari {attr}`~app_model.Application.injection_store`'s `namespace` attribute.
In the napari `app`'s `Store`, some basic napari objects are added to the `namespace`
attribute:

* all public types from {mod}`napari.components`, {mod}`napari.layers`
* all public types from the modules {mod}`napari.components`, {mod}`napari.layers`
and {mod}`napari.viewer`
* {class}`~napari._qt.qt_main_window.Window`
* {class}`~napari._qt.qt_viewer.QtViewer`
Expand Down
6 changes: 3 additions & 3 deletions docs/developers/architecture/magicgui_type_reg.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ via a wrapper `napari` adds around widget contributions.

# Generalization of `magicgui` type annotation

`napari` generalizes `magicgui` type annotation behaviour beyond widgets, to all
actions via `app-model` providers and processors. See [](app_model_dep_inj_result)
for details.
`napari` generalizes `magicgui` type annotation behaviour beyond `magicgui` widgets,
to all actions via `app-model` providers and processors. See
[](app_model_dep_inj_result) for details.

0 comments on commit 1e588dc

Please sign in to comment.