---
# System prepended metadata

title: Meeting Minute 2021-10-12
tags: [plugin, working-group]

---

Meeting Minute 2021-10-12
===

###### tags: `working-group` `plugin`

:::info
- **Date:** 2021-10-12
- **Agenda**
    - [last week](https://hackmd.io/GpC4WToNRzatEc1bJKoTzw)
    - approach for remaining hooks (widgets, sample data)
    - writers [pr](https://github.com/tlambert03/npe2/pull/3)
        - layer constraint syntax
        - short_title
        - use_single_layers_api
    - drafting [docs](https://hackmd.io/rYzkGKx-TFW3EyreEjHZ8w)
- **Participants:**
:::

<!-- Discussion goes here-->

- Nathan is showing his awesome writer selection GUI (user selects a set of layers, and in the save dialog, the "filters" dropdown shows all of the available writer plugins with their supported extensions).
    - Q: while this is a very powerful/expressive system, it seems likely that a plugin will specify a "too-strict" requirements for their writer, and a user will wonder why a given plugin that they installed is not shown (when in reality, it's because they selected an incompatible set of layers).  Not sure this has an answer if we stick to the native dialog... but something to think about.
        - Proposition of solution (GB): Submenu in File menu (for example export) with list of all plugins and user could select plugin and then see why it not works in this case. Save dialog will still show filtered ones. 

* things that get added to menus
    * sample data, dock widgets
    * What if someone manually assigns a menu item?
    * Two ways to add?
    * Currently not begin able to add to menus makes things awkward
    * Pam: maybe have an autopopulate flag
    * We're leaning towards **explicitly adding in the menu section**
    * [ ] ask about this at community meeting

### TODO
- [ ] tool: cli for takes an npe1 package and creates the manifest
    ```py
    def create_manifest(plugin_name: str) -> str:
        """function that takes plugin name and exports manifest"""
        from npe2.manifest import PluginManifest
        
        m = PluginManifest(
            name='myplugin',
            entry_point='myplugin.some_module',
            # here's the work that needs to be done
            contributions={
                'commands': [
                    {'id': 'myplugin.id', 'title': 'Command title'}
                ]
            }
        )
        return m.yaml()
    ```
    1. install some npe1 plugin
    2. start napari
    3. look at the `napari.plugins.plugin_manager` instance (to find plugins that had been discovered) (see around [here](https://github.com/napari/napari-plugin-engine/blob/b42955bf4ace6ca7be65ef94ade7cb320bc13c80/napari_plugin_engine/manager.py#L851-L852) for how the plugin manager itself prints out plugin-specific information)
    4. then build an instance of [PluginManifest](https://github.com/tlambert03/npe2/blob/a76c3d72fec5e6e0559a72fc3ab12bc20f19dfce/npe2/manifest/schema.py#L34): 
        - `from npe2.manifest import PluginManifest`
    5. 
- [ ] npe2 cookie cutter 
    - ? (is there something more like yeoman)
    - current cookie cutter is a little bulky. simple? 
        - cookie cutter specific to type

## Next steps
<!-- Action items go here -->

## Notes 
<!-- Other important details discussed during the meeting can be entered here. -->

- [ ] After the meeting add the minutes to the 'working-group/plugins' folder of [napari/meeting-notes](https://github.com/napari/meeting-notes).

## Links

* [**draft spec docs**](https://hackmd.io/rYzkGKx-TFW3EyreEjHZ8w)
* [Calendar](https://calendar.google.com/calendar/u/0?cid=Y18zNXI5M2VjNnZ0cDhzbWhtN2R2NXVvdDB2NEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t)
* [HackMD space](https://hackmd.io/team/napari-wg-plugin)
* [Recorded meeting notes](https://github.com/napari/meeting-notes/tree/master/2021/working-groups/plugins)