fix: Allow COPT solution parsing for IMPRECISE status #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Claude Code | |
on: | |
issue_comment: | |
types: [created] | |
pull_request_review_comment: | |
types: [created] | |
issues: | |
types: [opened, assigned] | |
pull_request_review: | |
types: [submitted] | |
jobs: | |
claude: | |
# This workflow triggers when @claude is mentioned in: | |
# - Issue comments (on issues or PRs) | |
# - Pull request review comments (inline code comments) | |
# - Pull request reviews (general review comments) | |
# - New issues (in title or body) | |
if: | | |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || | |
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || | |
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || | |
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
permissions: | |
contents: read | |
pull-requests: read | |
issues: read | |
id-token: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Validate required secrets | |
run: | | |
if [ -z "${{ secrets.ANTHROPIC_API_KEY }}" ]; then | |
echo "Error: Missing required secret ANTHROPIC_API_KEY" | |
echo "Please add the ANTHROPIC_API_KEY secret to your repository settings" | |
exit 1 | |
fi | |
- name: Run Claude Code | |
id: claude | |
uses: anthropics/claude-code-action@beta | |
with: | |
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} | |
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) | |
# model: "claude-opus-4-20250514" | |
# Optional: Customize the trigger phrase (default: @claude) | |
# trigger_phrase: "/claude" | |
# Optional: Trigger when specific user is assigned to an issue | |
# assignee_trigger: "claude-bot" | |
# Project-specific tools for Python development | |
allowed_tools: "Bash(pytest),Bash(ruff check .),Bash(ruff format .),Bash(mypy .),Bash(uv pip install -e .[dev,solvers])" | |
# Custom instructions for linopy project | |
custom_instructions: | | |
You are working on linopy, a optimization library built on xarray. | |
Follow these guidelines: | |
- Use type hints and ensure mypy compliance | |
- Follow xarray patterns for dimension handling | |
- Write tests for new features or bug fixes | |
- Use ruff for linting and formatting (run ruff check --fix .) | |
- Place tests in the test directory with test_*.py naming | |
- Maintain consistency with existing codebase patterns, avoiding redundant code | |
- Consider memory efficiency for large-scale optimization problems | |
# Optional: Custom environment variables for Claude | |
# claude_env: | | |
# NODE_ENV: test |