init: seed framework reference content from agent-runtimes main repo
This commit is contained in:
19
harnesses/capabilities/python-dev/v1/harness.yaml
Normal file
19
harnesses/capabilities/python-dev/v1/harness.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
kind: capability
|
||||
name: python-dev
|
||||
version: 1
|
||||
description: "Python dev tools: pytest, ruff, mypy, uv"
|
||||
requires: []
|
||||
|
||||
packages:
|
||||
apt: [python3-venv]
|
||||
pip: [pytest, ruff, mypy, hypothesis, uv]
|
||||
|
||||
env:
|
||||
PIP_BREAK_SYSTEM_PACKAGES: "1"
|
||||
|
||||
network_hosts:
|
||||
- pypi.org
|
||||
- files.pythonhosted.org
|
||||
|
||||
scripts:
|
||||
init: "./init.sh"
|
||||
32
harnesses/capabilities/python-dev/v1/init.sh
Executable file
32
harnesses/capabilities/python-dev/v1/init.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# Python development capability layer initialization script
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "Initializing python-dev capability layer..."
|
||||
|
||||
# If pyproject.toml exists, install project in development mode
|
||||
if [[ -f "/workspace/pyproject.toml" ]]; then
|
||||
echo "Found pyproject.toml, installing project in development mode..."
|
||||
cd /workspace
|
||||
|
||||
# Create virtual environment if it doesn't exist
|
||||
if [[ ! -d ".venv" ]]; then
|
||||
python3 -m venv .venv
|
||||
fi
|
||||
|
||||
# Activate virtual environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Install project in development mode with all dependencies
|
||||
pip install -e ".[dev,test]" 2>/dev/null || pip install -e . 2>/dev/null || {
|
||||
echo "Could not install with extras, trying basic install..."
|
||||
pip install -e .
|
||||
}
|
||||
|
||||
echo "Project installed in development mode"
|
||||
else
|
||||
echo "No pyproject.toml found, skipping project installation"
|
||||
fi
|
||||
|
||||
echo "Python development environment ready"
|
||||
Reference in New Issue
Block a user