Skip to content

Commit 36c3f34

Browse files
committed
initial commit
0 parents  commit 36c3f34

20 files changed

+887
-0
lines changed

.github/workflows/test_and_deploy.yml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: tests
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
- main
11+
tags:
12+
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
13+
pull_request:
14+
branches:
15+
- main
16+
- main
17+
workflow_dispatch:
18+
19+
jobs:
20+
test:
21+
name: ${{ matrix.platform }} py${{ matrix.python-version }}
22+
runs-on: ${{ matrix.platform }}
23+
strategy:
24+
matrix:
25+
platform: [ubuntu-latest, windows-latest, macos-latest]
26+
python-version: [3.7, 3.8, 3.9]
27+
28+
steps:
29+
- uses: actions/checkout@v2
30+
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v2
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
# these libraries, along with pytest-xvfb (added in the `deps` in tox.ini),
37+
# enable testing on Qt on linux
38+
- name: Install Linux libraries
39+
if: runner.os == 'Linux'
40+
run: |
41+
sudo apt-get install -y libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 \
42+
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
43+
libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0
44+
45+
# strategy borrowed from vispy for installing opengl libs on windows
46+
- name: Install Windows OpenGL
47+
if: runner.os == 'Windows'
48+
run: |
49+
git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git
50+
powershell gl-ci-helpers/appveyor/install_opengl.ps1
51+
52+
# note: if you need dependencies from conda, considering using
53+
# setup-miniconda: https://github.com/conda-incubator/setup-miniconda
54+
# and
55+
# tox-conda: https://github.com/tox-dev/tox-conda
56+
- name: Install dependencies
57+
run: |
58+
python -m pip install --upgrade pip
59+
pip install setuptools tox tox-gh-actions
60+
61+
# this runs the platform-specific tests declared in tox.ini
62+
- name: Test with tox
63+
run: tox
64+
env:
65+
PLATFORM: ${{ matrix.platform }}
66+
67+
- name: Coverage
68+
uses: codecov/codecov-action@v1
69+
70+
deploy:
71+
# this will run when you have tagged a commit, starting with "v*"
72+
# and requires that you have put your twine API key in your
73+
# github secrets (see readme for details)
74+
needs: [test]
75+
runs-on: ubuntu-latest
76+
if: contains(github.ref, 'tags')
77+
steps:
78+
- uses: actions/checkout@v2
79+
- name: Set up Python
80+
uses: actions/setup-python@v2
81+
with:
82+
python-version: "3.x"
83+
- name: Install dependencies
84+
run: |
85+
python -m pip install --upgrade pip
86+
pip install -U setuptools setuptools_scm wheel twine
87+
- name: Build and publish
88+
env:
89+
TWINE_USERNAME: __token__
90+
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
91+
run: |
92+
git tag
93+
python setup.py sdist bdist_wheel
94+
twine upload dist/*

.gitignore

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
.napari_cache
48+
49+
# Translations
50+
*.mo
51+
*.pot
52+
53+
# Django stuff:
54+
*.log
55+
local_settings.py
56+
57+
# Flask instance folder
58+
instance/
59+
60+
# Sphinx documentation
61+
docs/_build/
62+
63+
# MkDocs documentation
64+
/site/
65+
66+
# PyBuilder
67+
target/
68+
69+
# Pycharm and VSCode
70+
.idea/
71+
venv/
72+
.vscode/
73+
74+
# IPython Notebook
75+
.ipynb_checkpoints
76+
77+
# pyenv
78+
.python-version
79+
80+
# OS
81+
.DS_Store
82+
83+
# written by setuptools_scm
84+
**/_version.py
85+

.napari/DESCRIPTION.md

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
2+
3+
<!-- This file is designed to provide you with a starting template for documenting
4+
the functionality of your plugin. Its content will be rendered on your plugin's
5+
napari hub page.
6+
7+
The sections below are given as a guide for the flow of information only, and
8+
are in no way prescriptive. You should feel free to merge, remove, add and
9+
rename sections at will to make this document work best for your plugin.
10+
11+
# Description
12+
13+
This should be a detailed description of the context of your plugin and its
14+
intended purpose.
15+
16+
If you have videos or screenshots of your plugin in action, you should include them
17+
here as well, to make them front and center for new users.
18+
19+
You should use absolute links to these assets, so that we can easily display them
20+
on the hub. The easiest way to include a video is to use a GIF, for example hosted
21+
on imgur. You can then reference this GIF as an image.
22+
23+
![Example GIF hosted on Imgur](https://i.imgur.com/A5phCX4.gif)
24+
25+
Note that GIFs larger than 5MB won't be rendered by GitHub - we will however,
26+
render them on the napari hub.
27+
28+
The other alternative, if you prefer to keep a video, is to use GitHub's video
29+
embedding feature.
30+
31+
1. Push your `DESCRIPTION.md` to GitHub on your repository (this can also be done
32+
as part of a Pull Request)
33+
2. Edit `.napari/DESCRIPTION.md` **on GitHub**.
34+
3. Drag and drop your video into its desired location. It will be uploaded and
35+
hosted on GitHub for you, but will not be placed in your repository.
36+
4. We will take the resolved link to the video and render it on the hub.
37+
38+
Here is an example of an mp4 video embedded this way.
39+
40+
https://user-images.githubusercontent.com/17995243/120088305-6c093380-c132-11eb-822d-620e81eb5f0e.mp4
41+
42+
# Intended Audience & Supported Data
43+
44+
This section should describe the target audience for this plugin (any knowledge,
45+
skills and experience required), as well as a description of the types of data
46+
supported by this plugin.
47+
48+
Try to make the data description as explicit as possible, so that users know the
49+
format your plugin expects. This applies both to reader plugins reading file formats
50+
and to function/dock widget plugins accepting layers and/or layer data.
51+
For example, if you know your plugin only works with 3D integer data in "tyx" order,
52+
make sure to mention this.
53+
54+
If you know of researchers, groups or labs using your plugin, or if it has been cited
55+
anywhere, feel free to also include this information here.
56+
57+
# Quickstart
58+
59+
This section should go through step-by-step examples of how your plugin should be used.
60+
Where your plugin provides multiple dock widgets or functions, you should split these
61+
out into separate subsections for easy browsing. Include screenshots and videos
62+
wherever possible to elucidate your descriptions.
63+
64+
Ideally, this section should start with minimal examples for those who just want a
65+
quick overview of the plugin's functionality, but you should definitely link out to
66+
more complex and in-depth tutorials highlighting any intricacies of your plugin, and
67+
more detailed documentation if you have it.
68+
69+
# Additional Install Steps (uncommon)
70+
We will be providing installation instructions on the hub, which will be sufficient
71+
for the majority of plugins. They will include instructions to pip install, and
72+
to install via napari itself.
73+
74+
Most plugins can be installed out-of-the-box by just specifying the package requirements
75+
over in `setup.cfg`. However, if your plugin has any more complex dependencies, or
76+
requires any additional preparation before (or after) installation, you should add
77+
this information here.
78+
79+
# Getting Help
80+
81+
This section should point users to your preferred support tools, whether this be raising
82+
an issue on GitHub, asking a question on image.sc, or using some other method of contact.
83+
If you distinguish between usage support and bug/feature support, you should state that
84+
here.
85+
86+
# How to Cite
87+
88+
Many plugins may be used in the course of published (or publishable) research, as well as
89+
during conference talks and other public facing events. If you'd like to be cited in
90+
a particular format, or have a DOI you'd like used, you should provide that information here. -->
91+
92+
The developer has not yet provided a napari-hub specific description.

0 commit comments

Comments
 (0)