Agent skill

aqwa-batch-execution-python-subprocess-pattern

Sub-skill of aqwa-batch-execution: Python Subprocess Pattern.

Stars 4
Forks 4

Install this agent skill to your Project

npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/engineering/marine-offshore/aqwa/batch-execution/python-subprocess-pattern

SKILL.md

Python Subprocess Pattern

Python Subprocess Pattern

python
import subprocess
from pathlib import Path

AQWA_EXE = Path("/ansys_inc/v251/aqwa/bin/lnx64/Aqwa")

def run_aqwa(work_dir: Path, job_name: str, job_type: str = "std") -> bool:
    """Run AQWA batch. Returns True on success."""
    result = subprocess.run(
        [str(AQWA_EXE), job_type, job_name],
        cwd=str(work_dir), capture_output=True, text=True,
    )
    mes = (work_dir / f"{job_name}.mes")
    if mes.exists() and any(
        kw in mes.read_text(errors="replace").upper()
        for kw in ("ERROR", "FATAL", "ABORT")
    ):
        return False
    return (work_dir / f"{job_name}.res").exists()

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results