Skip to content

Commit efa5f82

Browse files
fix(workflows): fix date interpolation and remove seaborn matplotlib constraint
- Fix heredoc in gen-library-impl.yml to properly interpolate date - Remove matplotlib version constraint from seaborn dependencies - Seaborn 0.13+ works with any modern matplotlib 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 989c85d commit efa5f82

2 files changed

Lines changed: 15 additions & 20 deletions

File tree

.github/workflows/gen-library-impl.yml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -198,33 +198,28 @@ jobs:
198198
fi
199199
200200
# Create attempt documentation comment
201-
cat > /tmp/attempt_comment.md << 'COMMENTEOF'
202-
## Attempt $ATTEMPT/3 - $(date -u +"%Y-%m-%dT%H:%M:%SZ")
201+
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
202+
PR_LINK=$([[ -n "$PR_NUMBER" ]] && echo "#$PR_NUMBER" || echo "Not created")
203+
204+
# Use Python to safely create the comment with code
205+
python3 << PYEOF
206+
code = '''$CODE'''
207+
comment = f"""## Attempt $ATTEMPT/3 - {TIMESTAMP}
203208
204209
### Generated Code
205-
```python
206-
$CODE
207-
```
210+
\`\`\`python
211+
{code}
212+
\`\`\`
208213
209214
### Status
210-
- **PR:** $([[ -n "$PR_NUMBER" ]] && echo "#$PR_NUMBER" || echo "Not created")
211-
- **File:** `$PLOT_FILE`
215+
- **PR:** {PR_LINK}
216+
- **File:** \`$PLOT_FILE\`
212217
- **Workflow:** [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
213218
214219
---
215-
COMMENTEOF
216-
217-
# Replace placeholders
218-
sed -i "s/\$ATTEMPT/$ATTEMPT/g" /tmp/attempt_comment.md
219-
sed -i "s|\$PLOT_FILE|$PLOT_FILE|g" /tmp/attempt_comment.md
220-
221-
# Escape code for sed
222-
python3 << PYEOF
223-
with open('/tmp/attempt_comment.md', 'r') as f:
224-
content = f.read()
225-
content = content.replace('\$CODE', '''$CODE''')
220+
"""
226221
with open('/tmp/attempt_comment.md', 'w') as f:
227-
f.write(content)
222+
f.write(comment)
228223
PYEOF
229224
230225
# Post to sub-issue

.github/workflows/gen-new-plot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ jobs:
211211
library: seaborn
212212
main_issue_number: ${{ github.event.issue.number }}
213213
sub_issue_number: ${{ needs.create-sub-issues.outputs.seaborn_issue }}
214-
deps: "seaborn>=0.13.0 matplotlib>=3.8.0,<3.9.0 numpy>=1.26.0"
214+
deps: "seaborn>=0.13.0 matplotlib numpy>=1.26.0"
215215
secrets:
216216
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
217217

0 commit comments

Comments
 (0)