|
| 1 | +--- |
| 2 | +phase: quick |
| 3 | +plan: 260403-qhw |
| 4 | +type: execute |
| 5 | +wave: 1 |
| 6 | +depends_on: [] |
| 7 | +files_modified: |
| 8 | + - environment.yml |
| 9 | + - .github/workflows/ci.yml |
| 10 | +autonomous: true |
| 11 | +requirements: [] |
| 12 | +must_haves: |
| 13 | + truths: |
| 14 | + - "environment.yml creates a working conda env with Python 3.12 and all runtime deps" |
| 15 | + - "conda-test CI job creates the env, verifies module imports, and runs unit tests" |
| 16 | + artifacts: |
| 17 | + - path: "environment.yml" |
| 18 | + provides: "Conda environment definition with pip-installed matlab-mcp-server" |
| 19 | + - path: ".github/workflows/ci.yml" |
| 20 | + provides: "conda-test job using conda-incubator/setup-miniconda" |
| 21 | + key_links: |
| 22 | + - from: ".github/workflows/ci.yml (conda-test job)" |
| 23 | + to: "environment.yml" |
| 24 | + via: "setup-miniconda activate-environment + environment-file" |
| 25 | + pattern: "environment-file.*environment.yml" |
| 26 | +--- |
| 27 | + |
| 28 | +<objective> |
| 29 | +Add conda/miniconda installation support with CI validation. |
| 30 | + |
| 31 | +Purpose: Enable users who prefer conda environments to install and use the MATLAB MCP server, and verify this path works in CI. |
| 32 | +Output: environment.yml at repo root, new conda-test job in CI workflow. |
| 33 | +</objective> |
| 34 | + |
| 35 | +<execution_context> |
| 36 | +@$HOME/.claude/get-shit-done/workflows/execute-plan.md |
| 37 | +@$HOME/.claude/get-shit-done/templates/summary.md |
| 38 | +</execution_context> |
| 39 | + |
| 40 | +<context> |
| 41 | +@pyproject.toml |
| 42 | +@.github/workflows/ci.yml |
| 43 | +</context> |
| 44 | + |
| 45 | +<tasks> |
| 46 | + |
| 47 | +<task type="auto"> |
| 48 | + <name>Task 1: Create environment.yml and add conda-test CI job</name> |
| 49 | + <files>environment.yml, .github/workflows/ci.yml</files> |
| 50 | + <action> |
| 51 | +1. Create `environment.yml` at repo root with: |
| 52 | + - `name: matlab-mcp` |
| 53 | + - `channels: [conda-forge, defaults]` |
| 54 | + - `dependencies:` section with `python=3.12` |
| 55 | + - A `pip:` subsection that installs the local package with dev+monitoring extras: `- -e ".[dev,monitoring]"` |
| 56 | + - This approach leverages conda for Python/env management while using pip for the actual package (since matlab-mcp-python is not on conda-forge) |
| 57 | + |
| 58 | +2. Add a `conda-test` job to `.github/workflows/ci.yml`: |
| 59 | + - `needs: lint` (same pattern as other test jobs) |
| 60 | + - `runs-on: ubuntu-latest` |
| 61 | + - Steps: |
| 62 | + a. `actions/checkout@v4` |
| 63 | + b. `conda-incubator/setup-miniconda@v3` with: |
| 64 | + - `activate-environment: matlab-mcp` |
| 65 | + - `environment-file: environment.yml` |
| 66 | + - `auto-activate-base: false` |
| 67 | + - `python-version: "3.12"` |
| 68 | + c. Module import verification step (shell: bash -el {0}): |
| 69 | + ``` |
| 70 | + python -c "from matlab_mcp.server import main; print('OK: server')" |
| 71 | + python -c "from matlab_mcp.auth.middleware import BearerAuthMiddleware; print('OK: auth')" |
| 72 | + python -c "from matlab_mcp.hitl.gate import request_execute_approval; print('OK: hitl')" |
| 73 | + ``` |
| 74 | + d. Run unit tests step (shell: bash -el {0}): |
| 75 | + `pytest tests/ -v -k "not matlab" --ignore=tests/test_integration.py --ignore=tests/test_mcp_integration.py -W ignore::pytest.PytestUnraisableExceptionWarning` |
| 76 | + - IMPORTANT: All run steps in the conda-test job MUST use `shell: bash -el {0}` so the conda environment is activated via the login shell profile. This is required by conda-incubator/setup-miniconda. |
| 77 | + - Place the job after `test-macos` and before `integration-test` in the file for logical grouping. |
| 78 | + </action> |
| 79 | + <verify> |
| 80 | + <automated>python -c "import yaml; d=yaml.safe_load(open('environment.yml')); assert d['name']=='matlab-mcp'; assert any('python=3.12' in str(x) for x in d['dependencies']); print('environment.yml OK')" && grep -q 'conda-test' .github/workflows/ci.yml && grep -q 'setup-miniconda' .github/workflows/ci.yml && grep -q 'environment-file' .github/workflows/ci.yml && echo "CI config OK"</automated> |
| 81 | + </verify> |
| 82 | + <done> |
| 83 | + - environment.yml exists with Python 3.12, pip install of local package with dev+monitoring extras |
| 84 | + - .github/workflows/ci.yml has a conda-test job that uses setup-miniconda, verifies module imports, and runs tests |
| 85 | + - All run steps use `shell: bash -el {0}` for conda activation |
| 86 | + </done> |
| 87 | +</task> |
| 88 | +
|
| 89 | +</tasks> |
| 90 | +
|
| 91 | +<verification> |
| 92 | +- `cat environment.yml` shows valid conda env spec with pip local install |
| 93 | +- `grep -A 30 'conda-test' .github/workflows/ci.yml` shows complete job definition |
| 94 | +- YAML is valid: `python -c "import yaml; yaml.safe_load(open('environment.yml')); yaml.safe_load(open('.github/workflows/ci.yml'))"` |
| 95 | +</verification> |
| 96 | +
|
| 97 | +<success_criteria> |
| 98 | +- environment.yml creates a conda env named matlab-mcp with Python 3.12 and all deps via pip |
| 99 | +- CI workflow has conda-test job that validates the conda install path end-to-end |
| 100 | +</success_criteria> |
| 101 | +
|
| 102 | +<output> |
| 103 | +After completion, create `.planning/quick/260403-qhw-add-conda-environment-yml-and-ci-test/260403-qhw-SUMMARY.md` |
| 104 | +</output> |
0 commit comments