Skip to content

Commit 5c10e7e

Browse files
committed
working widget
make sure to rm -rf node_modules and then pip install -e . to get working install
1 parent b0d6054 commit 5c10e7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+16472
-1018
lines changed

.gitignore

+159
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,162 @@ node_modules/
55
.ipynb_checkpoints
66
*.tsbuildinfo
77
*.swp
8+
9+
# Byte-compiled / optimized / DLL files
10+
__pycache__/
11+
*.py[cod]
12+
*$py.class
13+
14+
# C extensions
15+
*.so
16+
17+
# Distribution / packaging
18+
.Python
19+
env/
20+
build/
21+
develop-eggs/
22+
dist/
23+
downloads/
24+
eggs/
25+
.eggs/
26+
lib/
27+
lib64/
28+
parts/
29+
sdist/
30+
var/
31+
*.egg-info/
32+
.installed.cfg
33+
*.egg
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.coverage
49+
.coverage.*
50+
.cache
51+
nosetests.xml
52+
coverage.xml
53+
*,cover
54+
.hypothesis/
55+
56+
# Translations
57+
*.mo
58+
*.pot
59+
60+
# Django stuff:
61+
*.log
62+
local_settings.py
63+
64+
# Flask instance folder
65+
instance/
66+
67+
# Scrapy stuff:
68+
.scrapy
69+
70+
# Sphinx documentation
71+
docs/_build/
72+
docs/source/_static/embed-bundle.js
73+
docs/source/_static/embed-bundle.js.map
74+
75+
# PyBuilder
76+
target/
77+
78+
# IPython Notebook
79+
.ipynb_checkpoints
80+
81+
# pyenv
82+
.python-version
83+
84+
# celery beat schedule file
85+
celerybeat-schedule
86+
87+
# dotenv
88+
.env
89+
90+
# virtualenv
91+
venv/
92+
ENV/
93+
94+
# Spyder project settings
95+
.spyderproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# =========================
101+
# Operating System Files
102+
# =========================
103+
104+
# OSX
105+
# =========================
106+
107+
.DS_Store
108+
.AppleDouble
109+
.LSOverride
110+
111+
# Thumbnails
112+
._*
113+
114+
# Files that might appear in the root of a volume
115+
.DocumentRevisions-V100
116+
.fseventsd
117+
.Spotlight-V100
118+
.TemporaryItems
119+
.Trashes
120+
.VolumeIcon.icns
121+
122+
# Directories potentially created on remote AFP share
123+
.AppleDB
124+
.AppleDesktop
125+
Network Trash Folder
126+
Temporary Items
127+
.apdisk
128+
129+
# Windows
130+
# =========================
131+
132+
# Windows image file caches
133+
Thumbs.db
134+
ehthumbs.db
135+
136+
# Folder config file
137+
Desktop.ini
138+
139+
# Recycle Bin used on file shares
140+
$RECYCLE.BIN/
141+
142+
# Windows Installer files
143+
*.cab
144+
*.msi
145+
*.msm
146+
*.msp
147+
148+
# Windows shortcuts
149+
*.lnk
150+
151+
152+
# NPM
153+
# ----
154+
155+
**/node_modules/
156+
ipysegment/nbextension/static/index.*
157+
ipysegment/labextension/*.tgz
158+
159+
# Coverage data
160+
# -------------
161+
**/coverage/
162+
163+
# Packed lab extensions
164+
ipysegment/labextension
165+
166+
MANIFEST

.vscode/settings.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"python.linting.pylintEnabled": false,
3+
"python.linting.pylamaEnabled": true,
4+
"python.linting.enabled": true,
5+
"python.pythonPath": "/home/ian/anaconda3/envs/colonies/bin/python"
6+
}

LICENSE.txt

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2020 Ian Hunt-Isaak
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
1. Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
10+
2. Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
3. Neither the name of the copyright holder nor the names of its
15+
contributors may be used to endorse or promote products derived from
16+
this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
include LICENSE.txt
2+
include README.md
3+
4+
include setupbase.py
5+
include pytest.ini
6+
include .coverage.rc
7+
8+
include tsconfig.json
9+
include package.json
10+
include webpack.config.js
11+
include ipysegment/labextension/*.tgz
12+
13+
# Documentation
14+
graft docs
15+
exclude docs/\#*
16+
prune docs/build
17+
prune docs/gh-pages
18+
prune docs/dist
19+
20+
# Examples
21+
graft examples
22+
23+
# Tests
24+
graft tests
25+
prune tests/build
26+
27+
# Javascript files
28+
graft ipysegment/nbextension
29+
graft src
30+
graft css
31+
prune **/node_modules
32+
prune coverage
33+
prune lib
34+
35+
# Patterns to exclude from any directory
36+
global-exclude *~
37+
global-exclude *.pyc
38+
global-exclude *.pyo
39+
global-exclude .git
40+
global-exclude .ipynb_checkpoints

README.md

+32-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,35 @@
33
## Controls
44
- left click to lasso
55
- right/middle click to pan
6-
- scroll to zoom
6+
- scroll to zoom
7+
8+
9+
10+
# ipysegment
11+
12+
[![Build Status](https://travis-ci.org//ipysegment.svg?branch=master)](https://travis-ci.org//ipysegment)
13+
[![codecov](https://codecov.io/gh//ipysegment/branch/master/graph/badge.svg)](https://codecov.io/gh//ipysegment)
14+
15+
16+
manual image segmentation in jupyter
17+
18+
## Installation
19+
20+
You can install using `pip`:
21+
22+
```bash
23+
pip install ipysegment
24+
```
25+
26+
Or if you use jupyterlab:
27+
28+
```bash
29+
pip install ipysegment
30+
jupyter labextension install @jupyter-widgets/jupyterlab-manager
31+
```
32+
33+
If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
34+
the nbextension:
35+
```bash
36+
jupyter nbextension enable --py [--sys-prefix|--user|--system] ipysegment
37+
```

Untitled.ipynb

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"import ipysegment as seg"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": 5,
15+
"metadata": {},
16+
"outputs": [
17+
{
18+
"data": {
19+
"text/plain": [
20+
"ipysegment.example.ExampleWidget"
21+
]
22+
},
23+
"execution_count": 5,
24+
"metadata": {},
25+
"output_type": "execute_result"
26+
}
27+
],
28+
"source": [
29+
"\n",
30+
"seg.ExampleWidget"
31+
]
32+
},
33+
{
34+
"cell_type": "code",
35+
"execution_count": 6,
36+
"metadata": {},
37+
"outputs": [],
38+
"source": [
39+
"import ipysegment as seg"
40+
]
41+
},
42+
{
43+
"cell_type": "code",
44+
"execution_count": 7,
45+
"metadata": {},
46+
"outputs": [
47+
{
48+
"data": {
49+
"text/plain": [
50+
"ipysegment.example.ExampleWidget"
51+
]
52+
},
53+
"execution_count": 7,
54+
"metadata": {},
55+
"output_type": "execute_result"
56+
}
57+
],
58+
"source": [
59+
"seg.ExampleWidget"
60+
]
61+
},
62+
{
63+
"cell_type": "code",
64+
"execution_count": null,
65+
"metadata": {},
66+
"outputs": [],
67+
"source": []
68+
}
69+
],
70+
"metadata": {
71+
"kernelspec": {
72+
"display_name": "Python 3",
73+
"language": "python",
74+
"name": "python3"
75+
},
76+
"language_info": {
77+
"codemirror_mode": {
78+
"name": "ipython",
79+
"version": 3
80+
},
81+
"file_extension": ".py",
82+
"mimetype": "text/x-python",
83+
"name": "python",
84+
"nbconvert_exporter": "python",
85+
"pygments_lexer": "ipython3",
86+
"version": "3.8.2"
87+
},
88+
"widgets": {
89+
"application/vnd.jupyter.widget-state+json": {
90+
"state": {},
91+
"version_major": 2,
92+
"version_minor": 0
93+
}
94+
}
95+
},
96+
"nbformat": 4,
97+
"nbformat_minor": 4
98+
}

0 commit comments

Comments
 (0)