You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://python.org)<!-- Use the versions supported by napari core -->
**NOTE: This repo is not meant to be cloned/forked directly! Please read "Getting Started" below**
7
+
**napari-plugin-template** is a convenient [copier](https://copier.readthedocs.io/en/stable/) template for authoring ([npe2](https://github.com/napari/npe2)-based) [napari](https://napari.org/) plugins.
8
+
9
+
Creating a plugin is a great way to extend napari's functionality. This repo provides a template to
10
+
simplify the development and distribution your plugin. After creating a new plugin, we encourage you to send a
11
+
post on our [Zulip forum](napari.zulipchat.com) to notify the napari community.
12
+
13
+
---
14
+
15
+
📣 **NOTE: This repo is not meant to be cloned/forked directly!** Instead, the copier application will be used to execute
16
+
the template and ask you for configuration information (or you may accept the template's sensible defaults).
Using the napari-plugin-template offers the following benefits:
24
+
25
+
- 🚀Installable [PyPI] package
26
+
- 🧪[tox] test suite, testing various python versions and platforms.
27
+
- 🗒️`README.md` file that contains useful information about your plugin
28
+
- ⚙️Continuous integration configuration for [github actions] that handles testing
29
+
and deployment of tagged releases
30
+
- 🔋git-tag-based version management with [setuptools_scm]
31
+
- 🪪Choose from several licenses, including [BSD-3], [MIT], [MPL v2.0], [Apache
32
+
v2.0], [GNU GPL v3.0], or [GNU LGPL v3.0]
6
33
7
34
## Getting Started
8
35
9
-
### Create your plugin package
36
+
These instructions will walk you through how to create a napari plugin. It uses an application called copier
37
+
to prompt you for configuration input and does the work of creating a functioning, distributable plugin from your
38
+
source code.
39
+
40
+
### Step 1: Install the template tools.
41
+
42
+
This step installs the [Copier](https://copier.readthedocs.io/en/stable/) application and the [jinja2-time](https://pypi.org/project/jinja2-time/) extension.
43
+
It also installs the napari plugin engine [npe2](https://github.com/napari/npe2), to help validate your new plugin is configured correctly.
10
44
11
-
Install [Copier](https://copier.readthedocs.io/en/stable/) and the [jinja2-time](https://pypi.org/project/jinja2-time/) extension.
12
-
Optionally install the napari plugin engine [npe2](https://github.com/napari/npe2), to help validate your new plugin is configured correctly.
45
+
Using `pip`:
13
46
14
-
Then you can generate a new napari plugin project:
47
+
```bash
48
+
python -m venv .venv
49
+
source .venv/bin/activate
50
+
python -m pip install copier jinja2-time npe2
51
+
```
52
+
53
+
### Step 2: Create a new napari plugin project.
54
+
55
+
The next command will use copier to use the napari-plugin-template to generate a new napari plugin project:
You just created a minimal napari plugin, complete with tests
59
-
and ready for automatic deployment!
196
+
</details>
197
+
198
+
:tada: You just created a minimal napari plugin, complete with tests
199
+
and ready for automatic deployment! :tada:
60
200
61
-
For more detailed information on each prompt see the [prompts reference](./PROMPTS.md).
62
201
63
202
```no-highlight
64
203
napari-growth-cone-finder/
@@ -83,6 +222,7 @@ napari-growth-cone-finder/
83
222
└── tox.ini
84
223
```
85
224
225
+
86
226
### Initialize a git repository in your package
87
227
88
228
NOTE: This is important not only for version management, but also if you want to
@@ -224,16 +364,7 @@ This template also includes a default yaml configuration for [Dependabot](https:
224
364
225
365
You will still need to enable Dependabot in your github settings, [see the instructions at this link](https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates#managing-dependabot-security-updates-for-your-repositories). Your Dependabot configuration file is located at `.github/dependabot.yml`.
226
366
227
-
## Features
228
-
229
-
- Installable [PyPI] package
230
-
-[tox] test suite, testing various python versions and platforms.
231
-
-`README.md` file that contains useful information about your plugin
232
-
- Continuous integration configuration for [github actions] that handles testing
233
-
and deployment of tagged releases
234
-
- git-tag-based version management with [setuptools_scm]
235
-
- Choose from several licenses, including [BSD-3], [MIT], [MPL v2.0], [Apache
236
-
v2.0], [GNU GPL v3.0], or [GNU LGPL v3.0]
367
+
---
237
368
238
369
## Resources
239
370
@@ -254,6 +385,21 @@ along with a detailed description.
254
385
Distributed under the terms of the [BSD-3] license, `napari-plugin-template`
255
386
is free and open source software.
256
387
388
+
## Using uv for getting started
389
+
390
+
:bulb: **Optional** :bulb:
391
+
392
+
[uv](https://docs.astral.sh/uv/) can reduce complexity since it will automatically install and manage a version of Python.
393
+
394
+
If you prefer using uv, the following commands are used for getting started:
0 commit comments