Skip to content

Commit

Permalink
Merge pull request jupyter-server#339 from bollwyvl/jupyter-servergh-337
Browse files Browse the repository at this point in the history
-no-entrypoint

Remove pytest11 entrypoint and plugin, require tornado 6.1, remove asyncio patch, CI work
  • Loading branch information
Zsailer authored Nov 17, 2020
2 parents 78aaac3 + c2038d8 commit 8d22a05
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 396 deletions.
35 changes: 30 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ on:
branches: '*'
jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [ '3.6', '3.7', '3.8' ]
os: [ubuntu, macos, windows]
python-version: [ '3.6', '3.7', '3.8', '3.9', 'pypy3' ]
exclude:
- os: windows
python-version: pypy3
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -20,15 +23,37 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- name: Upgrade packaging dependencies
run: |
pip install --upgrade pip setuptools wheel
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache pip
uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install the Python dependencies
run: |
pip install -e .[test]
pip install -e .[test] codecov
- name: List installed packages
run: |
pip freeze
pip check
- name: Run the tests
run: |
pytest
pytest -vv --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered
- name: Install the Python dependencies for the examples
run: |
cd examples/simple && pip install -e .
- name: Run the tests for the examples
run: |
pytest examples/simple/tests/test_handlers.py
- name: Coverage
run: |
codecov
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include CHANGELOG.md
include setupbase.py

# include everything in package_data
include jupyter_server/**/*
recursive-include jupyter_server *

# Documentation
graft docs
Expand All @@ -26,3 +26,5 @@ global-exclude *.pyc
global-exclude *.pyo
global-exclude .git
global-exclude .ipynb_checkpoints
global-exclude .pytest_cache
global-exclude .coverage
2 changes: 1 addition & 1 deletion examples/simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ git clone https://github.com/jupyter/jupyter_server && \
cd examples/simple && \
conda create -y -n jupyter-server-example python=3.7 && \
conda activate jupyter-server-example && \
pip install -e .
pip install -e .[test]
```

**OPTIONAL** If you want to build the Typescript code, you need [npm](https://www.npmjs.com) on your local environement. Compiled javascript is provided as artifact in this repository, so this Typescript build step is optional. The Typescript source and configuration have been taken from https://github.com/markellekelly/jupyter-server-example.
Expand Down
10 changes: 5 additions & 5 deletions examples/simple/tests/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


@pytest.fixture
def server_config(template_dir):
def jp_server_config(jp_template_dir):
return {
"ServerApp": {
"jpserver_extensions": {
Expand All @@ -12,8 +12,8 @@ def server_config(template_dir):
}


async def test_handler_default(fetch):
r = await fetch(
async def test_handler_default(jp_fetch):
r = await jp_fetch(
'simple_ext1/default',
method='GET'
)
Expand All @@ -22,8 +22,8 @@ async def test_handler_default(fetch):
assert r.body.decode().index('Hello Simple 1 - I am the default...') > -1


async def test_handler_template(fetch):
r = await fetch(
async def test_handler_template(jp_fetch):
r = await jp_fetch(
'simple_ext1/template1/test',
method='GET'
)
Expand Down
285 changes: 0 additions & 285 deletions jupyter_server/pytest_plugin.py

This file was deleted.

Loading

0 comments on commit 8d22a05

Please sign in to comment.