From 39a10c8532270307fe636fe221c42061a4eb364f Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:36:51 -0700 Subject: [PATCH] Fix the CI --- .github/workflows/.hatch-run.yml | 2 +- pyproject.toml | 7 ++-- src/py/reactpy/pyproject.toml | 57 ++++++++------------------------ 3 files changed, 18 insertions(+), 48 deletions(-) diff --git a/.github/workflows/.hatch-run.yml b/.github/workflows/.hatch-run.yml index 1b21e4202..d18e3a190 100644 --- a/.github/workflows/.hatch-run.yml +++ b/.github/workflows/.hatch-run.yml @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: "14.x" + node-version: "23.x" registry-url: ${{ inputs.node-registry-url }} - name: Pin NPM Version run: npm install -g npm@8.19.3 diff --git a/pyproject.toml b/pyproject.toml index 775ab01a2..1745a3dfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,12 +12,11 @@ detached = true dependencies = [ "invoke", # lint - "black==24.1.1", # Pin lint tools we don't control to avoid breaking changes - "ruff==0.0.278", # Pin lint tools we don't control to avoid breaking changes + "black==24.1.1", # Pin lint tools we don't control to avoid breaking changes + "ruff==0.0.278", # Pin lint tools we don't control to avoid breaking changes "toml", - "flake8==7.0.0", # Pin lint tools we don't control to avoid breaking changes + "flake8==7.0.0", # Pin lint tools we don't control to avoid breaking changes "flake8-pyproject", - "reactpy-flake8 >=0.7", # types "mypy", "types-toml", diff --git a/src/py/reactpy/pyproject.toml b/src/py/reactpy/pyproject.toml index 309248507..7f4139fe2 100644 --- a/src/py/reactpy/pyproject.toml +++ b/src/py/reactpy/pyproject.toml @@ -12,9 +12,7 @@ readme = "README.md" requires-python = ">=3.9" license = "MIT" keywords = ["react", "javascript", "reactpy", "component"] -authors = [ - { name = "Ryan Morshead", email = "ryan.morshead@gmail.com" }, -] +authors = [{ name = "Ryan Morshead", email = "ryan.morshead@gmail.com" }] classifiers = [ "Development Status :: 4 - Beta", "Programming Language :: Python", @@ -39,10 +37,7 @@ dependencies = [ [project.optional-dependencies] all = ["reactpy[starlette,sanic,fastapi,flask,tornado,testing]"] -starlette = [ - "starlette >=0.13.6", - "uvicorn[standard] >=0.19.0", -] +starlette = ["starlette >=0.13.6", "uvicorn[standard] >=0.19.0"] sanic = [ "sanic >=21", "sanic-cors", @@ -50,22 +45,10 @@ sanic = [ "setuptools", "uvicorn[standard] >=0.19.0", ] -fastapi = [ - "fastapi >=0.63.0", - "uvicorn[standard] >=0.19.0", -] -flask = [ - "flask", - "markupsafe>=1.1.1,<2.1", - "flask-cors", - "flask-sock", -] -tornado = [ - "tornado", -] -testing = [ - "playwright", -] +fastapi = ["fastapi >=0.63.0", "uvicorn[standard] >=0.19.0"] +flask = ["flask", "markupsafe>=1.1.1,<2.1", "flask-cors", "flask-sock"] +tornado = ["tornado"] +testing = ["playwright"] [project.urls] Source = "https://github.com/reactive-python/reactpy" @@ -101,22 +84,19 @@ cov-report = [ # "- coverage combine", "coverage report", ] -cov = [ - "test-cov {args}", - "cov-report", -] +cov = ["test-cov {args}", "cov-report"] [tool.hatch.envs.default.env-vars] -REACTPY_DEBUG_MODE="1" +REACTPY_DEBUG_MODE = "1" [tool.hatch.envs.lint] features = ["all"] dependencies = [ - "mypy>=1.0.0", + "mypy==1.8", "types-click", "types-tornado", - "types-pkg-resources", "types-flask", + "pkg_resources; sys_platform != 'win32'", "types-requests", ] @@ -127,13 +107,8 @@ all = ["types"] [[tool.hatch.build.hooks.build-scripts.scripts]] work_dir = "../../js" out_dir = "reactpy/_static" -commands = [ - "npm ci", - "npm run build" -] -artifacts = [ - "app/dist/" -] +commands = ["npm ci", "npm run build"] +artifacts = ["app/dist/"] # --- Pytest --------------------------------------------------------------------------- @@ -159,9 +134,7 @@ warn_unused_ignores = true source_pkgs = ["reactpy"] branch = false parallel = false -omit = [ - "reactpy/__init__.py", -] +omit = ["reactpy/__init__.py"] [tool.coverage.report] fail_under = 100 @@ -174,6 +147,4 @@ exclude_lines = [ "if __name__ == .__main__.:", "if TYPE_CHECKING:", ] -omit = [ - "reactpy/__main__.py", -] +omit = ["reactpy/__main__.py"]