diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffe832e..c887803 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,9 +23,9 @@ jobs: - name: Set up Python run: uv python install - name: Install dependencies - run: uv sync --all-groups --dev + run: uv sync --all-extras --dev - name: Static type checking - run: uv run pyright + run: uv run mypy - name: Code formatting run: uv run ruff check && uv run ruff format --check @@ -51,7 +51,7 @@ jobs: python-version: ${{ matrix.python-version }} enable-cache: true - name: Install dependencies - run: uv sync --all-groups --dev + run: uv sync --all-extras --dev - name: Run tests run: | uv run pytest -vv tests --cov=anydi_django -p no:anydi diff --git a/README.md b/README.md index 5a3a04c..1fdeacf 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@

- Build Status + Build Status - - Coverage Status + + Coverage Status Documentation Status diff --git a/pyproject.toml b/pyproject.toml index 0908739..9ae5eb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,18 +7,20 @@ requires-python = ">=3.10" dependencies = [ "anydi>=0.50.0", "django>=4.2", - "mypy[faster-cache]>=1.18.2", - "pytest-cov>=7.0.0", ] [dependency-groups] dev = [ + "ruff>=0.14.0", + "mypy[faster-cache]>=1.18.2", "django-stubs>=5.2.7", - "pyright[nodejs]>=1.1.406", "pytest>=8.4.2", + "pytest-cov>=7.0.0", "pytest-django>=4.11.1", - "ruff>=0.14.0", + "django-ninja>=1.1.0,<2", ] + +[project.optional-dependencies] ninja = [ "django-ninja>=1.1.0,<2", ] diff --git a/uv.lock b/uv.lock index f1d1ba0..1c931a6 100644 --- a/uv.lock +++ b/uv.lock @@ -32,39 +32,42 @@ source = { editable = "." } dependencies = [ { name = "anydi" }, { name = "django" }, - { name = "mypy", extra = ["faster-cache"] }, - { name = "pytest-cov" }, +] + +[package.optional-dependencies] +ninja = [ + { name = "django-ninja" }, ] [package.dev-dependencies] dev = [ + { name = "django-ninja" }, { name = "django-stubs" }, - { name = "pyright", extra = ["nodejs"] }, + { name = "mypy", extra = ["faster-cache"] }, { name = "pytest" }, + { name = "pytest-cov" }, { name = "pytest-django" }, { name = "ruff" }, ] -ninja = [ - { name = "django-ninja" }, -] [package.metadata] requires-dist = [ { name = "anydi", specifier = ">=0.50.0" }, { name = "django", specifier = ">=4.2" }, - { name = "mypy", extras = ["faster-cache"], specifier = ">=1.18.2" }, - { name = "pytest-cov", specifier = ">=7.0.0" }, + { name = "django-ninja", marker = "extra == 'ninja'", specifier = ">=1.1.0,<2" }, ] +provides-extras = ["ninja"] [package.metadata.requires-dev] dev = [ + { name = "django-ninja", specifier = ">=1.1.0,<2" }, { name = "django-stubs", specifier = ">=5.2.7" }, - { name = "pyright", extras = ["nodejs"], specifier = ">=1.1.406" }, + { name = "mypy", extras = ["faster-cache"], specifier = ">=1.18.2" }, { name = "pytest", specifier = ">=8.4.2" }, + { name = "pytest-cov", specifier = ">=7.0.0" }, { name = "pytest-django", specifier = ">=4.11.1" }, { name = "ruff", specifier = ">=0.14.0" }, ] -ninja = [{ name = "django-ninja", specifier = ">=1.1.0,<2" }] [[package]] name = "anyio" @@ -351,31 +354,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, ] -[[package]] -name = "nodeenv" -version = "1.9.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437, upload-time = "2024-06-04T18:44:11.171Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload-time = "2024-06-04T18:44:08.352Z" }, -] - -[[package]] -name = "nodejs-wheel-binaries" -version = "22.20.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/0f/54/02f58c8119e2f1984e2572cc77a7b469dbaf4f8d171ad376e305749ef48e/nodejs_wheel_binaries-22.20.0.tar.gz", hash = "sha256:a62d47c9fd9c32191dff65bbe60261504f26992a0a19fe8b4d523256a84bd351", size = 8058, upload-time = "2025-09-26T09:48:00.906Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/24/6d/333e5458422f12318e3c3e6e7f194353aa68b0d633217c7e89833427ca01/nodejs_wheel_binaries-22.20.0-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:455add5ac4f01c9c830ab6771dbfad0fdf373f9b040d3aabe8cca9b6c56654fb", size = 53246314, upload-time = "2025-09-26T09:47:32.536Z" }, - { url = "https://files.pythonhosted.org/packages/56/30/dcd6879d286a35b3c4c8f9e5e0e1bcf4f9e25fe35310fc77ecf97f915a23/nodejs_wheel_binaries-22.20.0-py2.py3-none-macosx_11_0_x86_64.whl", hash = "sha256:5d8c12f97eea7028b34a84446eb5ca81829d0c428dfb4e647e09ac617f4e21fa", size = 53644391, upload-time = "2025-09-26T09:47:36.093Z" }, - { url = "https://files.pythonhosted.org/packages/58/be/c7b2e7aa3bb281d380a1c531f84d0ccfe225832dfc3bed1ca171753b9630/nodejs_wheel_binaries-22.20.0-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a2b0989194148f66e9295d8f11bc463bde02cbe276517f4d20a310fb84780ae", size = 60282516, upload-time = "2025-09-26T09:47:39.88Z" }, - { url = "https://files.pythonhosted.org/packages/3e/c5/8befacf4190e03babbae54cb0809fb1a76e1600ec3967ab8ee9f8fc85b65/nodejs_wheel_binaries-22.20.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b5c500aa4dc046333ecb0a80f183e069e5c30ce637f1c1a37166b2c0b642dc21", size = 60347290, upload-time = "2025-09-26T09:47:43.712Z" }, - { url = "https://files.pythonhosted.org/packages/c0/bd/cfffd1e334277afa0714962c6ec432b5fe339340a6bca2e5fa8e678e7590/nodejs_wheel_binaries-22.20.0-py2.py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3279eb1b99521f0d20a850bbfc0159a658e0e85b843b3cf31b090d7da9f10dfc", size = 62178798, upload-time = "2025-09-26T09:47:47.752Z" }, - { url = "https://files.pythonhosted.org/packages/08/14/10b83a9c02faac985b3e9f5e65d63a34fc0f46b48d8a2c3e4caa3e1e7318/nodejs_wheel_binaries-22.20.0-py2.py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:d29705797b33bade62d79d8f106c2453c8a26442a9b2a5576610c0f7e7c351ed", size = 62772957, upload-time = "2025-09-26T09:47:51.266Z" }, - { url = "https://files.pythonhosted.org/packages/b4/a9/c6a480259aa0d6b270aac2c6ba73a97444b9267adde983a5b7e34f17e45a/nodejs_wheel_binaries-22.20.0-py2.py3-none-win_amd64.whl", hash = "sha256:4bd658962f24958503541963e5a6f2cc512a8cb301e48a69dc03c879f40a28ae", size = 40120431, upload-time = "2025-09-26T09:47:54.363Z" }, - { url = "https://files.pythonhosted.org/packages/42/b1/6a4eb2c6e9efa028074b0001b61008c9d202b6b46caee9e5d1b18c088216/nodejs_wheel_binaries-22.20.0-py2.py3-none-win_arm64.whl", hash = "sha256:1fccac931faa210d22b6962bcdbc99269d16221d831b9a118bbb80fe434a60b8", size = 38844133, upload-time = "2025-09-26T09:47:57.357Z" }, -] - [[package]] name = "orjson" version = "3.11.3" @@ -618,24 +596,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, ] -[[package]] -name = "pyright" -version = "1.1.406" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "nodeenv" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/f7/16/6b4fbdd1fef59a0292cbb99f790b44983e390321eccbc5921b4d161da5d1/pyright-1.1.406.tar.gz", hash = "sha256:c4872bc58c9643dac09e8a2e74d472c62036910b3bd37a32813989ef7576ea2c", size = 4113151, upload-time = "2025-10-02T01:04:45.488Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f6/a2/e309afbb459f50507103793aaef85ca4348b66814c86bc73908bdeb66d12/pyright-1.1.406-py3-none-any.whl", hash = "sha256:1d81fb43c2407bf566e97e57abb01c811973fdb21b2df8df59f870f688bdca71", size = 5980982, upload-time = "2025-10-02T01:04:43.137Z" }, -] - -[package.optional-dependencies] -nodejs = [ - { name = "nodejs-wheel-binaries" }, -] - [[package]] name = "pytest" version = "8.4.2"