Skip to content

Commit 02eef96

Browse files
committed
Initial commit: jupyterlab-sidecar
0 parents  commit 02eef96

Some content is hidden

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

44 files changed

+11811
-0
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
omit = sidecar/tests/*

.gitignore

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
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+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
local_settings.py
55+
56+
# Flask instance folder
57+
instance/
58+
59+
# Scrapy stuff:
60+
.scrapy
61+
62+
# Sphinx documentation
63+
docs/_build/
64+
docs/source/_static/embed-bundle.js
65+
docs/source/_static/embed-bundle.js.map
66+
67+
# PyBuilder
68+
target/
69+
70+
# IPython Notebook
71+
.ipynb_checkpoints
72+
73+
# pyenv
74+
.python-version
75+
76+
# celery beat schedule file
77+
celerybeat-schedule
78+
79+
# dotenv
80+
.env
81+
82+
# virtualenv
83+
venv/
84+
ENV/
85+
86+
# Spyder project settings
87+
.spyderproject
88+
89+
# Rope project settings
90+
.ropeproject
91+
92+
# =========================
93+
# Operating System Files
94+
# =========================
95+
96+
# OSX
97+
# =========================
98+
99+
.DS_Store
100+
.AppleDouble
101+
.LSOverride
102+
103+
# Thumbnails
104+
._*
105+
106+
# Files that might appear in the root of a volume
107+
.DocumentRevisions-V100
108+
.fseventsd
109+
.Spotlight-V100
110+
.TemporaryItems
111+
.Trashes
112+
.VolumeIcon.icns
113+
114+
# Directories potentially created on remote AFP share
115+
.AppleDB
116+
.AppleDesktop
117+
Network Trash Folder
118+
Temporary Items
119+
.apdisk
120+
121+
# Windows
122+
# =========================
123+
124+
# Windows image file caches
125+
Thumbs.db
126+
ehthumbs.db
127+
128+
# Folder config file
129+
Desktop.ini
130+
131+
# Recycle Bin used on file shares
132+
$RECYCLE.BIN/
133+
134+
# Windows Installer files
135+
*.cab
136+
*.msi
137+
*.msm
138+
*.msp
139+
140+
# Windows shortcuts
141+
*.lnk
142+
143+
144+
# NPM
145+
# ----
146+
147+
**/node_modules/
148+
sidecar/labextension/*.tgz
149+
150+
# Coverage data
151+
# -------------
152+
**/coverage/
153+
154+
# Packed lab extensions
155+
sidecar/labextension

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.DS_Store
2+
node_modules/
3+
tests/
4+
.jshintrc

.travis.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
language: python
2+
python:
3+
- 3.6
4+
- 3.5
5+
- 3.4
6+
sudo: false
7+
env:
8+
matrix:
9+
- GROUP=python
10+
matrix:
11+
include:
12+
- python: 3.5
13+
env: GROUP=js
14+
include:
15+
- python: 3.6
16+
env: GROUP=docs
17+
cache:
18+
pip: true
19+
directories:
20+
- node_modules # NPM packages
21+
- $HOME/.npm
22+
before_install:
23+
- pip install -U pip setuptools
24+
- nvm install 6
25+
- |
26+
if [[ $GROUP == python ]]; then
27+
pip install codecov
28+
elif [[ $GROUP == js ]]; then
29+
npm install -g codecov
30+
fi
31+
install:
32+
- |
33+
if [[ $GROUP == python ]]; then
34+
pip install --upgrade ".[test]" -v
35+
elif [[ $GROUP == js ]]; then
36+
pip install --upgrade -e ".[test]" -v
37+
elif [[ $GROUP == docs ]]; then
38+
pip install --upgrade ".[test, examples, docs]" -v
39+
fi
40+
before_script:
41+
# Set up a virtual screen for Firefox browser testing:
42+
- |
43+
if [[ $GROUP == js ]]; then
44+
export CHROME_BIN=chromium-browser
45+
export DISPLAY=:99.0
46+
sh -e /etc/init.d/xvfb start
47+
fi
48+
git config --global user.email [email protected]
49+
git config --global user.name "Travis CI"
50+
script:
51+
- |
52+
if [[ $GROUP == python ]]; then
53+
EXIT_STATUS=0
54+
pushd $(mktemp -d)
55+
py.test -l --cov-report xml:$TRAVIS_BUILD_DIR/coverage.xml --cov=sidecar --pyargs sidecar || EXIT_STATUS=$?
56+
popd
57+
(exit $EXIT_STATUS)
58+
elif [[ $GROUP == js ]]; then
59+
npm test
60+
elif [[ $GROUP == docs ]]; then
61+
EXIT_STATUS=0
62+
cd docs
63+
make html || EXIT_STATUS=$?
64+
make linkcheck || EXIT_STATUS=$?
65+
cd ..
66+
python -m pytest_check_links --links-ext=.md -o testpaths=. -o addopts= || EXIT_STATUS=$?
67+
(exit $EXIT_STATUS)
68+
fi
69+
after_success:
70+
- codecov

LICENSE.txt

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

MANIFEST.in

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

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
# sidecar
3+
4+
[![Build Status](https://travis-ci.org/jupyter-widgets/jupyterlab-sidecar.svg?branch=master)](https://travis-ci.org/jupyter-widgets/jupyterlab-sidecar)
5+
[![codecov](https://codecov.io/gh/jupyter-widgets/jupyterlab-sidecar/branch/master/graph/badge.svg)](https://codecov.io/gh/jupyter-widgets/jupyterlab-sidecar)
6+
7+
8+
A sidecar output widget for JupyterLab
9+
10+
## Installation
11+
12+
Or, if you use jupyterlab:
13+
14+
```bash
15+
pip install sidecar
16+
jupyter labextension install @jupyter-widgets/jupyterlab-manager
17+
```

appveyor.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Do not build feature branch with open Pull Requests
2+
skip_branch_with_pr: true
3+
4+
# environment variables
5+
environment:
6+
nodejs_version: "6.9"
7+
matrix:
8+
- PYTHON: "C:\\Miniconda36-x64"
9+
PYTHON_VERSION: "3.6.x"
10+
PYTHON_MAJOR: 3
11+
PYTHON_ARCH: "64"
12+
- PYTHON: "C:\\Miniconda3"
13+
PYTHON_VERSION: "3.4.x"
14+
PYTHON_MAJOR: 3
15+
PYTHON_ARCH: "32"
16+
17+
# build cache to preserve files/folders between builds
18+
cache:
19+
- '%AppData%/npm-cache'
20+
21+
# scripts that run after cloning repository
22+
install:
23+
# Install node:
24+
- ps: Install-Product node $env:nodejs_version
25+
# Ensure python scripts are from right version:
26+
- 'SET "PATH=%PYTHON%\Scripts;%PYTHON%;%PATH%"'
27+
# Update install tools:
28+
- 'conda install setuptools pip -y'
29+
- 'python -m pip install --upgrade pip'
30+
- 'python -m easy_install --upgrade setuptools'
31+
# Install coverage utilities:
32+
- 'pip install codecov'
33+
# Install our package:
34+
- 'pip install --upgrade ".[test]" -v'
35+
36+
build: off
37+
38+
# scripts to run before tests
39+
before_test:
40+
- git config --global user.email [email protected]
41+
- git config --global user.name "AppVeyor CI"
42+
- set "tmptestdir=%tmp%\sidecar-%RANDOM%"
43+
- mkdir "%tmptestdir%"
44+
- cd "%tmptestdir%"
45+
46+
47+
# to run your custom scripts instead of automatic tests
48+
test_script:
49+
- 'py.test -l --cov-report xml:"%APPVEYOR_BUILD_FOLDER%\coverage.xml" --cov=sidecar --pyargs sidecar'
50+
51+
on_success:
52+
- cd "%APPVEYOR_BUILD_FOLDER%"
53+
- codecov -X gcov --file "%APPVEYOR_BUILD_FOLDER%\coverage.xml"

codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
comment: off
2+
# show coverage in CI status, but never consider it a failure
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
target: 0%
8+
patch:
9+
default:
10+
target: 0%
11+
ignore:
12+
- "sidecar/tests"

0 commit comments

Comments
 (0)