From bbba7aec9080c69d430b8b000efc24ae238efb21 Mon Sep 17 00:00:00 2001 From: Eric Gustin <34000337+EricGustin@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:22:32 -0700 Subject: [PATCH] Update `arcade new --full` (#805) Monorepo has new linting and formatting preferences. Updated the `--full` to reflect that. --- > [!NOTE] > **Low Risk** > Low risk: changes only affect the generated `--full` project template and CLI help surface (flag is now hidden), plus a patch version bump. > > **Overview** > Updates `arcade new --full` to be *internal-only* by hiding the flag and revises the full template to match monorepo conventions (Ruff/pre-commit versions and hook IDs, `.ruff.toml` now extends the repo config, `pyproject.toml` formatting/booleans, adds `pytest` `asyncio_mode`, and removes `pre-commit install` from the template `Makefile`). > > Adds a regression test ensuring generated full-template files match these conventions, and bumps the root package version to `1.12.2`. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 2c1a285752d67dc4dd1aa8e0b6f25ca2f0a33fa2. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- libs/arcade-cli/arcade_cli/main.py | 5 +- .../.pre-commit-config.yaml | 8 ++-- .../full/{{ toolkit_name }}/.ruff.toml | 47 +------------------ .../full/{{ toolkit_name }}/Makefile | 1 - .../full/{{ toolkit_name }}/pyproject.toml | 29 ++++++------ libs/tests/cli/test_new_cli.py | 31 ++++++++++++ pyproject.toml | 2 +- 7 files changed, 55 insertions(+), 68 deletions(-) diff --git a/libs/arcade-cli/arcade_cli/main.py b/libs/arcade-cli/arcade_cli/main.py index 48da7108..9b934e82 100644 --- a/libs/arcade-cli/arcade_cli/main.py +++ b/libs/arcade-cli/arcade_cli/main.py @@ -229,9 +229,10 @@ def new( debug: bool = typer.Option(False, "--debug", "-d", help="Show debug information"), full: bool = typer.Option( False, - "--full", "-f", - help="Create a starter MCP server (pyproject.toml, server.py, .env.example)", + "--full", + help="[Internal] Create a full toolkit scaffold for Arcade development.", + hidden=True, ), ) -> None: """ diff --git a/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/.pre-commit-config.yaml b/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/.pre-commit-config.yaml index f502c3f3..d4be6334 100644 --- a/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/.pre-commit-config.yaml +++ b/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/.pre-commit-config.yaml @@ -1,7 +1,7 @@ -files: ^.*/{{toolkit_name}}/.* +files: ^.*/{{ toolkit_name }}/.* repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v4.4.0" + rev: 'v4.4.0' hooks: - id: check-case-conflict - id: check-merge-conflict @@ -11,8 +11,8 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.7 + rev: v0.15.7 hooks: - - id: ruff + - id: ruff-check args: [--fix] - id: ruff-format diff --git a/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/.ruff.toml b/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/.ruff.toml index f1aed90f..d6fc69c0 100644 --- a/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/.ruff.toml +++ b/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/.ruff.toml @@ -1,46 +1 @@ -target-version = "py310" -line-length = 100 -fix = true - -[lint] -select = [ - # flake8-2020 - "YTT", - # flake8-bandit - "S", - # flake8-bugbear - "B", - # flake8-builtins - "A", - # flake8-comprehensions - "C4", - # flake8-debugger - "T10", - # flake8-simplify - "SIM", - # isort - "I", - # mccabe - "C90", - # pycodestyle - "E", "W", - # pyflakes - "F", - # pygrep-hooks - "PGH", - # pyupgrade - "UP", - # ruff - "RUF", - # tryceratops - "TRY", -] - -[lint.per-file-ignores] -"*" = ["TRY003", "B904"] -"**/tests/*" = ["S101", "E501"] -"**/evals/*" = ["S101", "E501"] - -[format] -preview = true -skip-magic-trailing-comma = false +extend = "../../../../ruff.toml" diff --git a/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/Makefile b/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/Makefile index d3ef867c..4508146d 100644 --- a/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/Makefile +++ b/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/Makefile @@ -7,7 +7,6 @@ help: ## Show this help message install: ## Install dependencies, then overlay any ../.local-overrides uv sync --all-extras - uv run pre-commit install @if [ -f ../.local-overrides ]; then \ while IFS= read -r pkg || [ -n "$$pkg" ]; do \ case "$$pkg" in \#*|"") continue ;; esac; \ diff --git a/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/pyproject.toml b/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/pyproject.toml index aa728bf8..6a565eae 100644 --- a/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/pyproject.toml +++ b/libs/arcade-cli/arcade_cli/templates/full/{{ toolkit_name }}/pyproject.toml @@ -1,12 +1,12 @@ [build-system] -requires = [ "hatchling",] +requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "{{ package_name }}" version = "0.1.0" description = "{{ toolkit_description }}" -license = {text = "Proprietary - Arcade Software License Agreement v1.0"} +license = { text = "Proprietary - Arcade Software License Agreement v1.0" } requires-python = ">=3.10" dependencies = [ "arcade-mcp-server>={{ arcade_mcp_server_min_version }},<{{ arcade_mcp_server_max_version }}", @@ -31,26 +31,27 @@ dev = [ "mypy>=1.5.1,<1.6.0", "pre-commit>=3.4.0,<3.5.0", "tox>=4.11.1,<4.12.0", - "ruff>=0.7.4,<0.8.0", + "ruff>=0.15.7,<0.16.0", ] [tool.mypy] -files = [ "{{ package_name }}/**/*.py",] +files = ["{{ package_name }}/**/*.py"] python_version = "3.10" -disallow_untyped_defs = "True" -disallow_any_unimported = "True" -no_implicit_optional = "True" -check_untyped_defs = "True" -warn_return_any = "True" -warn_unused_ignores = "True" -show_error_codes = "True" -ignore_missing_imports = "True" +disallow_untyped_defs = true +disallow_any_unimported = true +no_implicit_optional = true +check_untyped_defs = true +warn_return_any = true +warn_unused_ignores = true +show_error_codes = true +ignore_missing_imports = true [tool.pytest.ini_options] -testpaths = [ "tests",] +testpaths = ["tests"] +asyncio_mode = "auto" [tool.coverage.report] skip_empty = true [tool.hatch.build.targets.wheel] -packages = [ "{{ package_name }}",] +packages = ["{{ package_name }}"] diff --git a/libs/tests/cli/test_new_cli.py b/libs/tests/cli/test_new_cli.py index 64b3ab77..8f9ff81b 100644 --- a/libs/tests/cli/test_new_cli.py +++ b/libs/tests/cli/test_new_cli.py @@ -31,6 +31,37 @@ def test_create_new_toolkit_prints_next_steps(tmp_path: Path) -> None: assert "my_server" in output +def test_create_new_toolkit_full_template_matches_monorepo(tmp_path: Path) -> None: + """Full template should produce files matching monorepo conventions.""" + output_dir = tmp_path / "full_conventions" + output_dir.mkdir() + + buf = StringIO() + test_console = Console(file=buf, force_terminal=False) + import arcade_cli.new as new_mod + + orig = new_mod.console + new_mod.console = test_console + try: + create_new_toolkit(str(output_dir), "my_server") + finally: + new_mod.console = orig + + toolkit_dir = output_dir / "my_server" + + # pyproject.toml formatting checks + pyproject = (toolkit_dir / "pyproject.toml").read_text() + assert 'requires = ["hatchling"]' in pyproject + assert 'license = { text = "Proprietary' in pyproject + assert 'asyncio_mode = "auto"' in pyproject + assert "disallow_untyped_defs = true" in pyproject + assert '"True"' not in pyproject + + # Makefile should not have pre-commit install + makefile = (toolkit_dir / "Makefile").read_text() + assert "pre-commit install" not in makefile + + def test_create_new_toolkit_minimal_with_spaces(tmp_path: Path) -> None: output_dir = tmp_path / "dir with spaces" output_dir.mkdir() diff --git a/pyproject.toml b/pyproject.toml index 3bb9dfdd..46fb9c01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "arcade-mcp" -version = "1.12.1" +version = "1.12.2" description = "Arcade.dev - Tool Calling platform for Agents" readme = "README.md" license = { file = "LICENSE" }