Skip to content

Commit 2a0cf12

Browse files
authored
Merge pull request #225 from consideRatio/pr/gha-migration
GitHub Actions migration
2 parents ec0ccba + 28995d4 commit 2a0cf12

File tree

5 files changed

+174
-139
lines changed

5 files changed

+174
-139
lines changed

.github/workflows/test.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This is a GitHub workflow defining a set of jobs with a set of steps.
2+
# ref: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
3+
#
4+
name: Test
5+
6+
# Trigger the workflow's on all PRs but only on pushed tags or commits to
7+
# main/master branch to avoid PRs developed in a GitHub fork's dedicated branch
8+
# to trigger.
9+
on:
10+
pull_request:
11+
push:
12+
branches:
13+
tags:
14+
workflow_dispatch:
15+
16+
defaults:
17+
run:
18+
# Declare bash be used by default in this workflow's "run" steps.
19+
#
20+
# NOTE: bash will by default run with:
21+
# --noprofile: Ignore ~/.profile etc.
22+
# --norc: Ignore ~/.bashrc etc.
23+
# -e: Exit directly on errors
24+
# -o pipefail: Don't mask errors from a command piped into another command
25+
shell: bash
26+
27+
jobs:
28+
test:
29+
runs-on: ubuntu-20.04
30+
31+
strategy:
32+
# Keep running even if one variation of the job fail
33+
fail-fast: false
34+
matrix:
35+
# We run this job multiple times with different parameterization
36+
# specified below, these parameters have no meaning on their own and
37+
# gain meaning on how job steps use them.
38+
include:
39+
- python: 3.5
40+
- python: 3.6
41+
- python: 3.7
42+
- python: 3.8
43+
- python: 3.9
44+
45+
steps:
46+
- uses: actions/checkout@v2
47+
- uses: actions/setup-python@v2
48+
with:
49+
python-version: "${{ matrix.python }}"
50+
51+
- name: Install Python dependencies
52+
run: |
53+
pip install --upgrade pip
54+
pip install .
55+
pip install pytest
56+
pip freeze
57+
58+
- name: Run tests
59+
run: |
60+
JUPYTER_TOKEN=secret jupyter-notebook --config=./tests/resources/jupyter_server_config.py &
61+
sleep 5
62+
pytest --verbose --color=yes

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

README.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Jupyter Server Proxy
2+
3+
[![ReadTheDocs badge](https://img.shields.io/readthedocs/jupyter-server-proxy?logo=read-the-docs)](https://jupyter-server-proxy.readthedocs.io/)
4+
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/jupyterhub/jupyter-server-proxy/Test?logo=github)](https://github.com/jupyterhub/jupyter-server-proxy/actions)
5+
[![PyPI badge](https://img.shields.io/pypi/v/jupyter-server-proxy.svg?logo=pypi)](https://pypi.python.org/pypi/jupyter-server-proxy)
6+
[![Conda badge](https://img.shields.io/conda/vn/conda-forge/jupyter-server-proxy?logo=conda-forge)](https://anaconda.org/conda-forge/jupyter-server-proxy)
7+
[![NPM badge](https://img.shields.io/npm/v/@jupyterlab/server-proxy.svg?logo=npm)](https://www.npmjs.com/package/@jupyterlab/server-proxy)
8+
9+
Jupyter Server Proxy lets you run arbitrary external processes (such as
10+
RStudio, Shiny Server, Syncthing, PostgreSQL, Code Server, etc)
11+
alongside your notebook server and provide authenticated web access to
12+
them using a path like `/rstudio` next to others like `/lab`. Alongside
13+
the python package that provides the main functionality, the JupyterLab
14+
extension (`@jupyterlab/server-proxy`) provides buttons in the
15+
JupyterLab launcher window to get to RStudio for example.
16+
17+
**Note:** This project used to be called **nbserverproxy**. As
18+
nbserverproxy is an older version of jupyter-server-proxy, uninstall
19+
nbserverproxy before installing jupyter-server-proxy to avoid conflicts.
20+
21+
The primary use cases are:
22+
23+
1. Use with JupyterHub / Binder to allow launching users into web
24+
interfaces that have nothing to do with Jupyter - such as RStudio,
25+
Shiny, or OpenRefine.
26+
2. Allow access from frontend javascript (in classic notebook or
27+
JupyterLab extensions) to access web APIs of other processes running
28+
locally in a safe manner. This is used by the [JupyterLab
29+
extension](https://github.com/dask/dask-labextension) for
30+
[dask](https://dask.org/).
31+
32+
[The documentation](https://jupyter-server-proxy.readthedocs.io/)
33+
contains information on installation & usage.
34+
35+
## Install
36+
37+
### Python package
38+
39+
#### pip
40+
41+
```
42+
pip install jupyter-server-proxy
43+
```
44+
45+
#### conda
46+
47+
```
48+
conda install jupyter-server-proxy -c conda-forge
49+
```
50+
51+
### JupyterLab extension
52+
53+
Note that as the JupyterLab extension only is a graphical interface to
54+
launch registered applications in the python package, the extension
55+
requires the python package to be installed.
56+
57+
```
58+
jupyter labextension install @jupyterlab/server-proxy
59+
```
60+
61+
## Contributing
62+
63+
### Python package
64+
65+
```
66+
pip install -e .
67+
68+
# explicit install needed with editable mode (-e) jupyter
69+
jupyter serverextension enable --sys-prefix jupyter_server_proxy
70+
```
71+
72+
### JupyterLab extension
73+
74+
The `jlpm` command is JupyterLab's pinned version of `yarn` that is
75+
installed with JupyterLab. You may use `yarn` or `npm` instead of `jlpm`
76+
below.
77+
78+
```
79+
cd jupyterlab-server-proxy
80+
81+
# Install dependencies
82+
jlpm
83+
84+
# Build Typescript source
85+
jlpm build
86+
87+
# Link your development version of the extension with JupyterLab
88+
jupyter labextension link .
89+
90+
# Rebuild Typescript source after making changes
91+
jlpm build
92+
93+
# Rebuild JupyterLab after making any changes
94+
jupyter lab build
95+
```
96+
97+
You can watch the source directory and run JupyterLab in watch mode to
98+
watch for changes in the extension's source and automatically rebuild
99+
the extension and application.
100+
101+
```
102+
# Watch the source directory in another terminal tab
103+
jlpm watch
104+
105+
# Run jupyterlab in watch mode in one terminal tab
106+
jupyter lab --watch
107+
```

README.rst

Lines changed: 0 additions & 125 deletions
This file was deleted.

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import setuptools
22
from glob import glob
33

4+
with open("README.md") as f:
5+
readme = f.read()
6+
47
setuptools.setup(
58
name="jupyter-server-proxy",
69
version='1.5.2',
@@ -9,6 +12,8 @@
912
author_email="[email protected]",
1013
license="BSD 3-Clause",
1114
description="Jupyter server extension to supervise and proxy web services",
15+
long_description=readme,
16+
long_description_content_type="text/markdown",
1217
packages=setuptools.find_packages(),
1318
install_requires=['notebook', 'simpervisor>=0.2', 'aiohttp'],
1419
python_requires='>=3.5',

0 commit comments

Comments
 (0)