Skip to content

Commit afad981

Browse files
abrichrclaude
andauthored
docs: enforce branch protection rules (#30)
* docs: add mandatory branch/PR rule to CLAUDE.md Adds explicit instruction that all changes must go through feature branches and pull requests. enforce_admins has been enabled on GitHub to prevent admin bypass of branch protection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(modal): remove unused os import Fixes ruff F401 lint error on modal_cloud.py. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0c48a16 commit afad981

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Claude Context for openadapt-ml
22

3+
## MANDATORY: Branches and Pull Requests
4+
5+
**NEVER push directly to main. ALWAYS use feature branches and pull requests.**
6+
7+
1. Create a feature branch: `git checkout -b feat/description` or `fix/description`
8+
2. Make commits on the branch
9+
3. Push the branch: `git push -u origin branch-name`
10+
4. Create a PR: `gh pr create --title "..." --body "..."`
11+
5. Only merge via PR (never `git push origin main`)
12+
13+
This is a hard rule with NO exceptions, even for "small" changes.
14+
15+
---
16+
317
## Simplicity Guidelines
418

519
**Philosophy**: "Less is more. 80/20 impact/complexity. Working code beats elegant design."

openadapt_ml/cloud/modal_cloud.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
import argparse
4040
import json
41-
import os
4241
import subprocess
4342
import sys
4443
import tempfile
@@ -387,7 +386,9 @@ def infer(
387386
text_content = msg["content"]
388387
# Replace <image> tag in text with proper multi-modal format
389388
if "<image>" in text_content:
390-
text_content = text_content.replace("<image>\n", "").replace("<image>", "")
389+
text_content = text_content.replace("<image>\n", "").replace(
390+
"<image>", ""
391+
)
391392
msg["content"] = [
392393
{"type": "image"},
393394
{"type": "text", "text": text_content},
@@ -404,9 +405,7 @@ def infer(
404405
text=[text], images=[image], return_tensors="pt", padding=True
405406
)
406407
else:
407-
inputs = infer._processor(
408-
text=[text], return_tensors="pt", padding=True
409-
)
408+
inputs = infer._processor(text=[text], return_tensors="pt", padding=True)
410409

411410
inputs = inputs.to(infer._model.device)
412411

0 commit comments

Comments
 (0)