Skip to content

Commit a946c87

Browse files
authored
DOC Link magicgui type annotation to providers/processors (#431)
# References and relevant issues See napari/napari#4543 for Talley original PR and his notes on this. # Description Links `magicgui` type annotation and providers/processor behaviour.
1 parent a1e7404 commit a946c87

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/developers/architecture/app_model.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,16 @@ They would be registered in the `app` `Store` during
477477
initialization of the napari `app`, in `NapariApplication`'s
478478
{meth}`~napari._app_model._app.NapariApplication.__init__`.
479479

480+
Providers and processors allow us to mirror behaviour enabled by
481+
[`magicgui` type registration](magicgui_type_registration) for widgets. Providers
482+
allow generalization of `magicgui` parameter annotation behaviour to all
483+
actions, while processors do this for return annotation behaviour.
484+
485+
The intended users of providers/processors are end-users, plugins as well as `napari`
486+
internally, however it is currently only used internally.
487+
For a detailed discussion on this framework see
488+
[issue 4532](https://github.com/napari/napari/issues/4532).
489+
480490
(app-model-testing)=
481491

482492
## `app-model` testing

docs/developers/architecture/magicgui_type_reg.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,9 @@ to be used in the `magicgui` widget.
7878
When widget is not a `magicgui` widget, the {class}`~napari.viewer.Viewer` is provided
7979
via a wrapper `napari` adds around widget contributions.
8080
```
81+
82+
# Generalization of `magicgui` type annotation
83+
84+
`napari` generalizes `magicgui` type annotation behaviour beyond widgets, to all
85+
actions via `app-model` providers and processors. See [](app_model_dep_inj_result)
86+
for details.

0 commit comments

Comments
 (0)