Commit d0a0208a authored by Jan Reimes's avatar Jan Reimes
Browse files

feat(config): add configuration files for tasks and tools

* Add default tasks for running, upgrading tools, and syncing environment.
* Implement formatting tasks for source code and Markdown files.
* Introduce linting tasks with options for fixing issues.
* Add MCP server management tasks and quality check tasks.
parent 1e247742
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
[tasks.default]
run = "mise tasks"

[tasks.upgrade-tools]
description = "Upgrade all development tools to their latest versions"
run = ["mise install", "mise up", "mise prune"]

[tasks.env-sync]
description = "Sync the virtual environment with pyproject.toml dependencies"
run = "uv sync -U --dev --all-extras --all-groups"
+11 −0
Original line number Diff line number Diff line
[tasks.format]
description = "Format source code and tests"
run = [
    "uv run undersort corr_plot/ tests/ --exclude .config/",
    "ruff check --select I --fix",                           # isort-equivalent sorting of imports
    "ruff format corr_plot/ tests/ --exclude .config",
]

[tasks.format-md]
description = "Format Markdown files"
run = "uvx mdformat . --exclude .agents/"
+11 −0
Original line number Diff line number Diff line
[tasks.lint]
description = "Lint source code and tests (no fixes)"
run = "ruff check corr_plot/ tests/ packages/"

[tasks.lint-fix]
description = "Lint source code and tests and fix safe issues"
run = "ruff check --fix corr_plot/ tests/ packages/"

[tasks.lint-fix-unsafe]
description = "Lint source code and tests and fix safe and unsafe issues"
run = "ruff check --fix --unsafe-fixes corr_plot/ tests/ packages/"
+14 −0
Original line number Diff line number Diff line
[tasks.add-mcp-servers]

depends = ["upgrade-tools", "env-sync"]

usage = '''
arg "<ai_agent>" help="AI assistant to use: claude, gemini, copilot, opencode, ... see: https://github.com/neondatabase/add-mcp"
'''
shell = "pwsh -NoProfile -Command"
run = [
    'cls',
    #'bun x add-mcp -y -a {{usage.ai_agent}} "grepai mcp-serve"',
    'bun x add-mcp -y -a {{usage.ai_agent}} -n cytoscnpy-mcp "cytoscnpy mcp-server"',

]
+4 −0
Original line number Diff line number Diff line
[tasks.analyze]
# see: https://github.com/djinn-soul/CytoScnPy/blob/main/docs/usage.md
description = "Run quality checks on source code and tests"
run = "cytoscnpy . --secrets --danger --quality --include-tests"
Loading