| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| # Config carrier, not a package. `plugins/magpie-<family>/skills/` is a tree of | |
| # agent-facing SKILL.md files; a handful of them ship helper `scripts/` and | |
| # `guards/` written in Python. Before this file existed nothing linted, | |
| # type-checked, or ran them: the workspace checks iterate over | |
| # `[tool.uv.workspace] members` and every member lived under `tools/`, so the | |
| # skill tree was invisible to ruff, mypy, and pytest alike. | |
| # | |
| # It used to sit at `skills/pyproject.toml`, back when that was where the skill | |
| # directories really were. They now live inside the family plugin that ships | |
| # them and `skills/<name>` is a symlink mirroring each one back, so a member | |
| # rooted at `skills/` would have found nothing but symlinks — pytest would have | |
| # collected zero tests and still reported success. | |
| # | |
| # Declaring the tree as one workspace member is the lightest fix that reuses | |
| # the existing machinery — `tools/dev/run-workspace-check.sh` auto-discovers | |
| # which checks apply from the sections below, and `.github/workflows/tests.yml` | |
| # emits a `pytest (plugins)` job for any member with a | |
| # `[tool.pytest.ini_options]` section. Per-skill packaging was the alternative | |
| # and is far heavier: skills are symlinked into adopter repos one directory at | |
| # a time, so build metadata inside each of them would leak into every adopter. | |
| # This file is not symlinked — the relays point at a skill directory, never at | |
| # a plugin root. | |
| [project] | |
| name = "magpie-skills" | |
| version = "0.1.0" | |
| description = "Helper scripts and guards shipped alongside the agent-facing skill definitions in the family plugins." | |
| requires-python = ">=3.11" | |
| license = { text = "Apache-2.0" } | |
| # stdlib-only — the helper scripts deliberately carry no runtime dependencies | |
| # so an adopter can run them without installing anything. | |
| dependencies = [] | |
| # Not an installable package: these are scripts invoked by path from a skill, | |
| # not a library anything imports. | |
| [tool.uv] | |
| package = false | |
| [tool.ruff] | |
| line-length = 110 | |
| target-version = "py311" | |
| # A generated copy (tools/dev/check-family-plugins.py `copies`) whose source, | |
| # tools/jira, is linted and formatted under its own settings there. | |
| # The security tools are copies too, each linted under its own settings at its source. | |
| extend-exclude = ["magpie-vetted-ops/tools/jira", "magpie-security-tools/tools"] | |
| [tool.ruff.lint] | |
| select = [ | |
| "E", # pycodestyle errors | |
| "W", # pycodestyle warnings | |
| "F", # pyflakes | |
| "I", # isort | |
| "B", # flake8-bugbear | |
| "UP", # pyupgrade | |
| "SIM", # flake8-simplify | |
| "C4", # flake8-comprehensions | |
| "RUF", # ruff-specific | |
| ] | |
| ignore = [ | |
| "E501", # line-too-long — the 110-char limit above is already generous | |
| ] | |
| [tool.mypy] | |
| python_version = "3.11" | |
| files = ["."] | |
| # Same reason as pytest's `norecursedirs`: the substrate plugins' `tools/` | |
| # symlinks resolve into other workspace members that check themselves. | |
| exclude = "^magpie-(agent-guard|vetted-ops|security-tools)/tools/" | |
| ignore_missing_imports = true | |
| warn_unused_ignores = true | |
| warn_redundant_casts = true | |
| check_untyped_defs = true | |
| no_implicit_optional = true | |
| # Helper scripts and their tests are plain functions invoked by path, not a | |
| # typed library surface, so the annotation requirements the `tools/` members | |
| # apply would be noise here. `check_untyped_defs` above still type-checks the | |
| # bodies, which is where the value is. | |
| disallow_untyped_defs = false | |
| disallow_incomplete_defs = false | |
| [tool.pytest.ini_options] | |
| minversion = "8.0" | |
| addopts = "-ra -q" | |
| # Collected from the whole tree: tests live next to the skill they cover | |
| # (`magpie-<family>/skills/<name>/tests/`) rather than in one central | |
| # directory. The substrate plugins reach their tool through a symlink out to | |
| # `tools/<name>`, which is its own workspace member with its own pytest job — | |
| # don't collect it twice. | |
| testpaths = ["."] | |
| norecursedirs = [ | |
| "magpie-adversarial-review/tools", | |
| "magpie-agent-guard/tools", | |
| "magpie-vetted-ops/tools", | |
| "magpie-security-tools/tools", | |
| ] | |
| [dependency-groups] | |
| # The shared toolchain (mypy, pytest, ruff) comes from `magpie-dev` | |
| # (tools/dev), declared once for the whole workspace. The checks run each tool | |
| # via `uv run --directory <member> --project . python -m <tool>` — see | |
| # tools/dev/run-workspace-check.sh. | |
| dev = ["magpie-dev"] |