diff --git a/.gitignore b/.gitignore index f0e2696..efdfa72 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ frontend/test-results/ # Frontend build output (built from source by end users) frontend/dist/ frontend/package-lock.json +frontend/.eslintcache # reference libraries references/ diff --git a/AGENTS.md b/AGENTS.md index cc4cf18..a54ab15 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,6 +15,7 @@ PYTHONPATH=. uv run pytest tests/ -v # test python cd frontend/ # move to frontend directory npm run lint:fix # fix lint violations npm run format # format the code +npm run test:run # run frontend tests npm run build # run a frontend build ``` diff --git a/frontend/package.json b/frontend/package.json index f8e607a..1645e6f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,8 +9,8 @@ "preview": "vite preview", "test": "vitest", "test:run": "vitest run", - "lint": "eslint src/", - "lint:fix": "eslint src/ --fix", + "lint": "eslint src/ --cache", + "lint:fix": "eslint src/ --fix --cache", "format": "prettier --write src/", "format:check": "prettier --check src/" }, diff --git a/pyproject.toml b/pyproject.toml index f25fcf1..fdfc939 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,12 +18,14 @@ dependencies = [ test = [ "pytest>=8.0.0", "pytest-asyncio>=0.24.0", + "pytest-xdist>=3.0", "httpx>=0.27.0", ] [tool.pytest.ini_options] asyncio_mode = "auto" testpaths = ["tests"] +addopts = "-n auto --dist worksteal" [tool.ruff] target-version = "py310" @@ -68,6 +70,7 @@ dev = [ "httpx>=0.28.1", "pytest>=9.0.2", "pytest-asyncio>=1.3.0", + "pytest-xdist>=3.0", "ruff>=0.8.0", "pyright>=1.1.390", ] diff --git a/uv.lock b/uv.lock index e233a8a..4d0a20c 100644 --- a/uv.lock +++ b/uv.lock @@ -244,6 +244,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740 }, ] +[[package]] +name = "execnet" +version = "2.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bf/89/780e11f9588d9e7128a3f87788354c7946a9cbb1401ad38a48c4db9a4f07/execnet-2.1.2.tar.gz", hash = "sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd", size = 166622 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ab/84/02fc1827e8cdded4aa65baef11296a9bbe595c474f0d6d758af082d849fd/execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec", size = 40708 }, +] + [[package]] name = "fastapi" version = "0.128.0" @@ -779,6 +788,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e5/35/f8b19922b6a25bc0880171a2f1a003eaeb93657475193ab516fd87cac9da/pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5", size = 15075 }, ] +[[package]] +name = "pytest-xdist" +version = "3.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "execnet" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/78/b4/439b179d1ff526791eb921115fca8e44e596a13efeda518b9d845a619450/pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1", size = 88069 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ca/31/d4e37e9e550c2b92a9cbc2e4d0b7420a27224968580b5a447f420847c975/pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88", size = 46396 }, +] + [[package]] name = "python-dotenv" version = "1.2.1" @@ -871,6 +893,7 @@ test = [ { name = "httpx" }, { name = "pytest" }, { name = "pytest-asyncio" }, + { name = "pytest-xdist" }, ] [package.dev-dependencies] @@ -879,6 +902,7 @@ dev = [ { name = "pyright" }, { name = "pytest" }, { name = "pytest-asyncio" }, + { name = "pytest-xdist" }, { name = "ruff" }, ] @@ -893,6 +917,7 @@ requires-dist = [ { name = "pynacl", specifier = ">=1.5.0" }, { name = "pytest", marker = "extra == 'test'", specifier = ">=8.0.0" }, { name = "pytest-asyncio", marker = "extra == 'test'", specifier = ">=0.24.0" }, + { name = "pytest-xdist", marker = "extra == 'test'", specifier = ">=3.0" }, { name = "uvicorn", extras = ["standard"], specifier = ">=0.32.0" }, ] provides-extras = ["test"] @@ -903,6 +928,7 @@ dev = [ { name = "pyright", specifier = ">=1.1.390" }, { name = "pytest", specifier = ">=9.0.2" }, { name = "pytest-asyncio", specifier = ">=1.3.0" }, + { name = "pytest-xdist", specifier = ">=3.0" }, { name = "ruff", specifier = ">=0.8.0" }, ]