Skip to content

Commit

Permalink
Remove auth from hatch env matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Mar 22, 2023
1 parent d0546b1 commit 2e5abcf
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ jobs:
- name: Upgrade pip
run: python3 -m pip install --upgrade pip

- name: Create jupyterlab-auth dev environment
- name: Create jupyterlab dev environment
run: |
pip install hatch
hatch env create dev.jupyterlab-auth
hatch env create dev.jupyterlab
- name: Check types
run: |
hatch run dev.jupyterlab-auth:typecheck
hatch run dev.jupyterlab:typecheck
- name: Run tests
run: |
hatch run dev.jupyterlab-auth:test
hatch run dev.jupyterlab:test
4 changes: 2 additions & 2 deletions plugins/kernels/fps_kernels/kernel_driver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ async def stop(self) -> None:

async def listen_iopub(self):
while True:
msg = await receive_message(self.iopub_channel, change_str_to_date=True) # type: ignore
msg = await receive_message(self.iopub_channel, change_str_to_date=True)
msg_id = msg["parent_header"].get("msg_id")
if msg_id in self.execute_requests.keys():
self.execute_requests[msg_id]["iopub_msg"].set_result(msg)

async def listen_shell(self):
while True:
msg = await receive_message(self.shell_channel, change_str_to_date=True) # type: ignore
msg = await receive_message(self.shell_channel, change_str_to_date=True)
msg_id = msg["parent_header"].get("msg_id")
if msg_id in self.execute_requests.keys():
self.execute_requests[msg_id]["shell_msg"].set_result(msg)
Expand Down
2 changes: 1 addition & 1 deletion plugins/kernels/fps_kernels/kernel_driver/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Any, Dict, List, Optional, Tuple, cast
from uuid import uuid4

from dateutil.parser import parse as dateutil_parse # type: ignore
from dateutil.parser import parse as dateutil_parse
from zmq.asyncio import Socket
from zmq.utils import jsonapi

Expand Down
6 changes: 3 additions & 3 deletions plugins/kernels/fps_kernels/kernel_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
from datetime import datetime
from typing import Dict, Iterable, List, Optional, cast

from fastapi import WebSocket, WebSocketDisconnect # type: ignore
from fastapi import WebSocket, WebSocketDisconnect
from starlette.websockets import WebSocketState

from ..kernel_driver.connect import cfg_t, connect_channel
from ..kernel_driver.connect import launch_kernel as _launch_kernel
from ..kernel_driver.connect import read_connection_file
from ..kernel_driver.connect import (
write_connection_file as _write_connection_file, # type: ignore
write_connection_file as _write_connection_file,
)
from ..kernel_driver.message import create_message, receive_message, send_message
from .message import ( # type: ignore
from .message import (
deserialize_msg_from_ws_v1,
from_binary,
get_msg_from_parts,
Expand Down
1 change: 1 addition & 0 deletions plugins/kernels/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependencies = [
"pyzmq",
"websockets",
"python-dateutil",
"types-python-dateutil",
"watchfiles >=0.16.1,<1",
]
dynamic = [ "version",]
Expand Down
8 changes: 4 additions & 4 deletions plugins/yjs/fps_yjs/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
WebSocketDisconnect,
status,
)
from jupyter_ydoc import ydocs as YDOCS
from jupyter_ydoc import ydocs as YDOCS # type: ignore
from jupyverse_api.app import App
from jupyverse_api.auth import Auth, User
from jupyverse_api.contents import Contents
from jupyverse_api.yjs import Yjs
from ypy_websocket.websocket_server import WebsocketServer, YRoom # type: ignore
from ypy_websocket.ystore import BaseYStore, SQLiteYStore, YDocNotFound # type: ignore
from ypy_websocket.yutils import YMessageType, YSyncMessageType # type: ignore
from ypy_websocket.websocket_server import WebsocketServer, YRoom
from ypy_websocket.ystore import BaseYStore, SQLiteYStore, YDocNotFound
from ypy_websocket.yutils import YMessageType, YSyncMessageType

from .models import CreateDocumentSession

Expand Down
10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,22 @@ pre-install-commands = [
"pip install -e ./plugins/terminals",
"pip install -e ./plugins/yjs",
"pip install -e ./plugins/resource_usage",
"pip install -e ./plugins/auth",
"pip install -e ./plugins/auth_fief",
"pip install -e ./plugins/noauth",
"pip install -e ./plugins/login",
]
dependencies = ["fastapi>=0.87.0"]
features = ["test"]

[tool.hatch.envs.dev.overrides]
matrix.auth.post-install-commands = [
{ value = "pip install -e ./plugins/noauth", if = ["noauth"] },
{ value = "pip install -e ./plugins/auth -e ./plugins/login", if = ["auth"] },
{ value = "pip install -e ./plugins/auth_fief", if = ["auth_fief"] },
]
matrix.frontend.post-install-commands = [
{ value = "pip install -e ./plugins/jupyterlab", if = ["jupyterlab"]},
{ value = "pip install -e ./plugins/retrolab", if = ["retrolab"]},
]

[[tool.hatch.envs.dev.matrix]]
frontend = ["jupyterlab", "retrolab"]
auth = ["noauth", "auth", "auth_fief"]

[tool.hatch.envs.dev.scripts]
test = "pytest ./tests -v"
Expand Down

0 comments on commit 2e5abcf

Please sign in to comment.