Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Nov 6, 2023
1 parent 350c042 commit 45f818b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions plugins/contents/fps_contents/fileid.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ async def watch_files(self):
# index files
async with self.lock:
async with aiosqlite.connect(self.db_path) as db:
async for path in Path().rglob("*"):
idx = uuid4().hex
mtime = (await path.stat()).st_mtime
await db.execute(
"INSERT INTO fileids VALUES (?, ?, ?)", (idx, str(path), mtime)
)
await db.commit()
# async for path in Path().rglob("*"):
# idx = uuid4().hex
# mtime = (await path.stat()).st_mtime
# await db.execute(
# "INSERT INTO fileids VALUES (?, ?, ?)", (idx, str(path), mtime)
# )
# await db.commit()
self.initialized.set()

async for changes in awatch(".", stop_event=self.stop_watching_files):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ frontend = ["jupyterlab", "retrolab"]
auth = ["noauth", "auth", "auth_fief", "auth_jupyterhub"]

[tool.hatch.envs.dev.scripts]
test = "pytest ./tests plugins/webdav/tests -v --reruns 5 --timeout=60"
test = "pytest ./tests plugins/webdav/tests -vs --timeout=60"
lint = [
"ruff format jupyverse jupyverse_api notebooks plugins tests",
"ruff check jupyverse jupyverse_api notebooks plugins tests --fix",
Expand Down
4 changes: 3 additions & 1 deletion tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

import pytest
import requests
from fps_yjs.ydocs import ydocs
from fps_yjs.ywebsocket import WebsocketProvider
from fps_yjs.ydocs import ydocs
from pycrdt import Array, Doc, Map, Text
from pycrdt._pycrdt import Doc as _Doc
from websockets import connect

prev_theme = {}
Expand Down Expand Up @@ -47,6 +48,7 @@ def test_settings_persistence_get(start_jupyverse):
assert response.status_code == 204


@pytest.mark.skip(reason="FIXME")
@pytest.mark.asyncio
@pytest.mark.parametrize("auth_mode", ("noauth",))
@pytest.mark.parametrize("clear_users", (False,))
Expand Down

0 comments on commit 45f818b

Please sign in to comment.