@@ -96,23 +96,41 @@ dev = [
9696 " nbstripout>=0.8.1" ,
9797 " yaspin>=3.1.0" ,
9898 " taskipy>=1.12.0" ,
99+ " pre-commit>=3.5.0" ,
99100]
100101
101102[tool .taskipy .tasks ]
102- format = { cmd = " task format:ruff && task format:docs && task fix:ruff && task format:ruff" , help = " Format code with ruff and docs" }
103- "format:docs" = { cmd = " python scripts/utils/ruffen-docs.py README.md api.md" , help = " Format documentation" }
104- "format:ruff" = { cmd = " ruff format" , help = " Format code with ruff" }
105-
106- lint = { cmd = " task check:ruff && task typecheck && task check:importable" , help = " Run all linting checks" }
107- "check:ruff" = { cmd = " ruff check ." , help = " Check code with ruff" }
108- "fix:ruff" = { cmd = " ruff check --fix ." , help = " Fix ruff issues automatically" }
109-
110- "check:importable" = { cmd = " python -c 'import agentex'" , help = " Check that agentex can be imported" }
111-
112- typecheck = { cmd = " task typecheck:pyright && task typecheck:mypy" , help = " Run type checking" }
113- "typecheck:pyright" = { cmd = " pyright" , help = " Run pyright type checker" }
114- "typecheck:verify-types" = { cmd = " pyright --verifytypes agentex --ignoreexternal" , help = " Verify types" }
115- "typecheck:mypy" = { cmd = " mypy ." , help = " Run mypy type checker" }
103+ # === ATOMIC TASKS (building blocks) ===
104+ "format-ruff" = { cmd = " ruff format" , help = " Format code with ruff" }
105+ "format-docs" = { cmd = " python scripts/utils/ruffen-docs.py README.md api.md" , help = " Format documentation" }
106+ "check-ruff" = { cmd = " ruff check ." , help = " Check code with ruff" }
107+ "fix-ruff" = { cmd = " ruff check --fix ." , help = " Fix ruff issues automatically" }
108+ "check-types-pyright" = { cmd = " pyright" , help = " Run pyright type checker" }
109+ "check-types-mypy" = { cmd = " mypy ." , help = " Run mypy type checker" }
110+ "check-importable" = { cmd = " python -c 'import agentex'" , help = " Check that agentex can be imported" }
111+
112+ # === COMPOSITE TASKS with hooks ===
113+ format = { cmd = " task format-ruff" , help = " Format code with ruff and docs" }
114+ post_format = " task format-docs"
115+
116+ typecheck = { cmd = " task check-types-pyright" , help = " Run type checking" }
117+ post_typecheck = " task check-types-mypy"
118+
119+ lint = { cmd = " task check-ruff" , help = " Run all linting checks" }
120+ post_lint = " task typecheck && task check-importable"
121+
122+ # === SCRIPT DELEGATION (complex operations) ===
123+ bootstrap = { cmd = " ./scripts/bootstrap" , help = " Set up development environment" }
124+ test = { cmd = " ./scripts/test" , help = " Run tests with mock server" }
125+ mock = { cmd = " ./scripts/mock" , help = " Start mock API server" }
126+
127+ # === DEVELOPMENT SETUP ===
128+ setup-pre-commit = { cmd = " pre-commit install" , help = " Install pre-commit hooks" }
129+
130+ # === CI-SPECIFIC TASKS ===
131+ ci-lint = { cmd = " task lint" , help = " Run linting for CI" }
132+ ci-test = { cmd = " task test" , help = " Run tests for CI" }
133+ ci-build = { cmd = " uv build" , help = " Build package for CI" }
116134
117135[tool .hatch .build ]
118136include = [
0 commit comments