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" }