Skip to content

Commit

Permalink
Fix CI (jupyterlab#221)
Browse files Browse the repository at this point in the history
* Remove packageManager entry

* Fix for Python 3.12

* Remove use of pytest-asyncio

* Fix mypy

* Re-enable Python 3.11

* Don't test win/py3.12

* Fix URLs in package.json

* Update yarn.lock

* Revert previous commit

* Remove pip --pre
  • Loading branch information
davidbrochart authored and martinRenou committed Dec 19, 2023
1 parent cae6970 commit aa69775
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 26 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.11"]
include:
- os: ubuntu-latest
python-version: "pypy-3.8"

python-version: ["3.8", "3.11", "3.12"]
# PyPy is not supported because we use the file_id_manager. See:
# https://github.com/jupyter-server/jupyter_server_fileid/issues/44
#include:
# - os: ubuntu-latest
# python-version: "pypy-3.8"
exclude:
- os: windows-latest
python-version: "3.12"

steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -138,7 +145,12 @@ jobs:
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install the Python dependencies
run: |
<<<<<<< HEAD
pip install --pre -e ".[test]"
=======
pip install -e ".[test]"

>>>>>>> 7ae9c62 (Fix CI (#221))
- name: List installed packages
run: |
pip freeze
Expand Down
4 changes: 3 additions & 1 deletion jupyter_collaboration/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ async def prepare(self):
await self._websocket_server.start_room(self.room)
self._websocket_server.add_room(self._room_id, self.room)

return await super().prepare()
res = super().prepare()
if res is not None:
return await res

def initialize(
self,
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"jupyterlab",
"jupyterlab-extension"
],
"homepage": "https://github.com/jupyterlab/jupyter_collaboration",
"homepage": "https://github.com/jupyterlab/jupyter-collaboration",
"bugs": {
"url": "https://github.com/jupyterlab/jupyter_collaboration/issues"
"url": "https://github.com/jupyterlab/jupyter-collaboration/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyterlab/jupyter_collaboration.git"
"url": "https://github.com/jupyterlab/jupyter-collaboration.git"
},
"license": "BSD-3-Clause",
"author": {
Expand Down Expand Up @@ -67,6 +67,5 @@
"stylelint-prettier": "^3.0.0",
"typedoc": "~0.23.28",
"typescript": "~5.0.4"
},
"packageManager": "[email protected]"
}
}
6 changes: 3 additions & 3 deletions packages/collaboration-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"jupyterlab",
"jupyterlab-extension"
],
"homepage": "https://github.com/jupyterlab/jupyter_collaboration",
"homepage": "https://github.com/jupyterlab/jupyter-collaboration",
"bugs": {
"url": "https://github.com/jupyterlab/jupyter_collaboration/issues"
"url": "https://github.com/jupyterlab/jupyter-collaboration/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyterlab/jupyter_collaboration.git"
"url": "https://github.com/jupyterlab/jupyter-collaboration.git"
},
"license": "BSD-3-Clause",
"author": "Project Jupyter",
Expand Down
6 changes: 3 additions & 3 deletions packages/collaboration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "@jupyter/collaboration",
"version": "1.2.0",
"description": "JupyterLab - Real-Time Collaboration Widgets",
"homepage": "https://github.com/jupyterlab/jupyter_collaboration",
"homepage": "https://github.com/jupyterlab/jupyter-collaboration",
"bugs": {
"url": "https://github.com/jupyterlab/jupyter_collaboration/issues"
"url": "https://github.com/jupyterlab/jupyter-collaboration/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyterlab/jupyter_collaboration.git"
"url": "https://github.com/jupyterlab/jupyter-collaboration.git"
},
"license": "BSD-3-Clause",
"author": "Project Jupyter",
Expand Down
6 changes: 3 additions & 3 deletions packages/docprovider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "@jupyter/docprovider",
"version": "1.2.0",
"description": "JupyterLab - Document Provider",
"homepage": "https://github.com/jupyterlab/jupyter_collaboration",
"homepage": "https://github.com/jupyterlab/jupyter-collaboration",
"bugs": {
"url": "https://github.com/jupyterlab/jupyter_collaboration/issues"
"url": "https://github.com/jupyterlab/jupyter-collaboration/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyterlab/jupyter_collaboration.git"
"url": "https://github.com/jupyterlab/jupyter-collaboration.git"
},
"license": "BSD-3-Clause",
"author": "Project Jupyter",
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test = [
"jupyter_server[test]>=2.0.0",
"pytest>=7.0",
"pytest-cov",
"pytest-asyncio"
"websockets"
]
docs = [
"jupyterlab>=4.0.0",
Expand Down Expand Up @@ -139,6 +139,8 @@ filterwarnings = [
"module:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning",
# In PyPy/Cython: see https://github.com/yaml/pyyaml/issues/688
"ignore:can't resolve package from __spec__ or __package__, falling back on __name__ and __path__:ImportWarning",
# see https://github.com/dateutil/dateutil/issues/1314
"ignore:.*datetime.utcfromtimestamp\\(\\) is deprecated.*:DeprecationWarning:",
]

[tool.mypy]
Expand Down
6 changes: 0 additions & 6 deletions tests/test_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
from datetime import datetime
from typing import Any

import pytest
from jupyter_server import _tz as tz

from jupyter_collaboration.loaders import FileLoader, FileLoaderMapping


Expand Down Expand Up @@ -45,7 +42,6 @@ def save_content(self, model: dict[str, Any], path: str) -> dict:
return self.model


@pytest.mark.asyncio
async def test_FileLoader_with_watcher():
id = "file-4567"
path = "myfile.txt"
Expand Down Expand Up @@ -78,7 +74,6 @@ async def trigger(*args):
await loader.clean()


@pytest.mark.asyncio
async def test_FileLoader_without_watcher():
id = "file-4567"
path = "myfile.txt"
Expand Down Expand Up @@ -110,7 +105,6 @@ async def trigger(*args):
await loader.clean()


@pytest.mark.asyncio
async def test_FileLoaderMapping_with_watcher():
id = "file-4567"
path = "myfile.txt"
Expand Down

0 comments on commit aa69775

Please sign in to comment.