Skip to content

Commit

Permalink
Merge pull request #163 from davidbrochart/py3.7
Browse files Browse the repository at this point in the history
Support python 3.7
  • Loading branch information
davidbrochart authored Mar 21, 2022
2 parents 9f284b0 + f5cde9a commit 090205c
Show file tree
Hide file tree
Showing 25 changed files with 68 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [ 3.9 ]
python-version: [ '3.7', '3.8', '3.9', '3.10' ]

steps:
- name: Checkout
Expand All @@ -45,7 +45,7 @@ jobs:
pip install ./plugins/yjs
pip install ./plugins/lab
pip install ./plugins/jupyterlab
pip install flake8 black mypy pytest pytest-asyncio requests ipykernel
- name: Check style
Expand Down
3 changes: 3 additions & 0 deletions plugins/auth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-auth

An FPS plugin for the authentication API.
5 changes: 3 additions & 2 deletions plugins/auth/fps_auth/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from uuid import uuid4
from typing import Literal, Optional
from typing import Optional
from pydantic import SecretStr

from fps.config import PluginModel, get_config # type: ignore
Expand All @@ -10,7 +10,8 @@ class AuthConfig(PluginModel):
client_id: str = ""
client_secret: SecretStr = SecretStr("")
redirect_uri: str = ""
mode: Literal["noauth", "token", "user"] = "token"
# mode: Literal["noauth", "token", "user"] = "token"
mode: str = "token"
token: str = str(uuid4())
collaborative: bool = False
global_email: str = "[email protected]"
Expand Down
2 changes: 2 additions & 0 deletions plugins/auth/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_auth
version = attr: fps_auth.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions plugins/contents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-contents

An FPS plugin for the contents API.
2 changes: 2 additions & 0 deletions plugins/contents/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_contents
version = attr: fps_contents.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions plugins/jupyterlab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-jupyterlab

An FPS plugin for the JupyterLab API.
2 changes: 2 additions & 0 deletions plugins/jupyterlab/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_jupyterlab
version = attr: fps_jupyterlab.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions plugins/kernels/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-kernels

An FPS plugin for the kernels API.
2 changes: 2 additions & 0 deletions plugins/kernels/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_kernels
version = attr: fps_kernels.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions plugins/lab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-lab

An FPS plugin for the JupyterLab/RetroLab API.
2 changes: 2 additions & 0 deletions plugins/lab/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_lab
version = attr: fps_lab.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions plugins/login/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-login

An FPS plugin for the login API.
2 changes: 2 additions & 0 deletions plugins/login/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_login
version = attr: fps_login.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions plugins/nbconvert/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-nbconvert

An FPS plugin for the nbconvert API.
2 changes: 2 additions & 0 deletions plugins/nbconvert/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_nbconvert
version = attr: fps_nbconvert.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions plugins/retrolab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-retrolab

An FPS plugin for the RetroLab API.
2 changes: 2 additions & 0 deletions plugins/retrolab/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_retrolab
version = attr: fps_retrolab.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions plugins/terminals/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-terminals

An FPS plugin for the terminals API.
2 changes: 2 additions & 0 deletions plugins/terminals/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_terminals
version = attr: fps_terminals.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions plugins/yjs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# fps-yjs

An FPS plugin for the Yjs API.
2 changes: 2 additions & 0 deletions plugins/yjs/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[metadata]
name = fps_yjs
version = attr: fps_yjs.__version__
long_description = file: README.md
long_description_content_type = text/markdown

[options]
include_package_data = True
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ console_scripts =

[flake8]
max-line-length = 100

[tool:pytest]
asyncio_mode = strict
5 changes: 5 additions & 0 deletions tests/test_kernels.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
from time import sleep

import pytest
Expand All @@ -7,6 +8,10 @@

@pytest.mark.asyncio
@pytest.mark.parametrize("auth_mode", ("noauth",))
@pytest.mark.skipif(
sys.platform.startswith("win") and sys.version_info < (3, 8),
reason="ipykernel not supported",
)
async def test_kernel_messages(client, capfd):
kernel_id = "kernel_id_0"
kernel_name = "python3"
Expand Down
5 changes: 5 additions & 0 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import json
import sys

import pytest
from fastapi.testclient import TestClient


@pytest.mark.parametrize("auth_mode", ("noauth",))
@pytest.mark.skipif(
sys.platform.startswith("linux") and sys.version_info < (3, 8),
reason="pytest-asyncio issue",
)
def test_settings(client, app):
with TestClient(app) as client:
# get previous theme
Expand Down

0 comments on commit 090205c

Please sign in to comment.