Spaces:
Sleeping
Download TEST_GUIDE.md from Tanish2416/RepoRepair: direct link, hf CLI and curl.
- Browser
- Download file 5.58 kB
-
https://huggingface.co/spaces/Tanish2416/RepoRepair/resolve/main/TEST_GUIDE.md
- Command line
-
hf download hf://spaces/Tanish2416/RepoRepair/TEST_GUIDE.md
-
curl -L -o TEST_GUIDE.md https://huggingface.co/spaces/Tanish2416/RepoRepair/resolve/main/TEST_GUIDE.md
RepoRepair Test Guide
β Configuration Status
Your RepoRepair is now fully set up with:
- β GitHub Token: Configured
- β Gemini API Key: Configured
- β All dependencies installed
- β Ready to test!
π§ͺ How to Test RepoRepair
Option 1: Test with a Demo Repository (Recommended)
I recommend testing with a simple public repository first. Here are some options:
Test Scenario 1: Simple Python Bug Fix
Open your terminal in the RepoRepair folder
Activate virtual environment:
venv\Scripts\activateRun a DRY RUN first (no actual PR will be created):
py -m cli.main fix https://github.com/octocat/Hello-World/issues/1 --dry-run --skip-testsThis will:
- Fetch the issue
- Clone the repository
- Analyze the problem
- Generate a fix
- Show you what it would do (WITHOUT creating a PR)
Test Scenario 2: Use Your Own Repository
If you have your own repository with an open issue:
Create a test issue in your repository:
- Go to your GitHub repo
- Click "Issues" β "New issue"
- Title: "Fix typo in README"
- Description: "The word 'teh' should be 'the' in README.md"
Copy the issue URL (e.g.,
https://github.com/yourusername/yourrepo/issues/1)Run RepoRepair:
py -m cli.main fix YOUR_ISSUE_URL --dry-run
Option 2: Create Draft PR (Real Test)
Once you're comfortable, try creating a real draft PR:
py -m cli.main fix YOUR_ISSUE_URL
This will:
- Analyze the issue
- Generate a code fix
- Run tests (if available)
- Create a DRAFT Pull Request
- You can review and approve/reject it
π Command Reference
Basic Commands
# Activate environment (always do this first!)
venv\Scripts\activate
# Check configuration
py -m cli.main config
# Dry run (no PR created)
py -m cli.main fix <issue-url> --dry-run
# Skip tests (faster for testing)
py -m cli.main fix <issue-url> --skip-tests
# Verbose mode (see what's happening)
py -m cli.main fix <issue-url> --verbose
# Full run (creates draft PR)
py -m cli.main fix <issue-url>
Understanding the Output
β Issue fetched: [Issue Title] β Issue loaded successfully
β Repository cloned β Repo downloaded
β Found 3 relevant files β AI found where to fix
β Generated code changes β Fix created
β Tests passed (8.2s) β Validation successful
β Draft PR created: [PR URL] β Success!
π― Example Test Issues
You can test with these public repositories:
Easy Test (Recommended for first try):
Create your own test issue in a personal repository:
Create a simple repo:
- Go to GitHub β New Repository
- Name:
test-reporepair - Add README
- Create repository
Create a test file (
test.py):def add(a, b): return a - b # Bug: should be +Create an issue:
- Title: "Fix add function"
- Description: "The add function is subtracting instead of adding. It should return a + b"
Copy issue URL and test:
py -m cli.main fix https://github.com/YOUR_USERNAME/test-reporepair/issues/1 --dry-run
β οΈ Important Notes
Before Running:
Always activate the virtual environment:
venv\Scripts\activateMake sure Docker is running (if you want to run tests):
- Open Docker Desktop
- Or use
--skip-testsflag
Use
--dry-runfirst to see what will happen
Safety Features:
- β Always creates DRAFT Pull Requests
- β Never auto-merges code
- β You must manually review and approve
- β All changes are logged
- β Tests run in isolated Docker containers
π Troubleshooting
"Module not found"
Fix: Activate virtual environment first
venv\Scripts\activate
"Docker not available"
Fix: Either start Docker Desktop or use:
py -m cli.main fix <issue-url> --skip-tests
"GitHub API rate limit"
Fix: Wait a few minutes, or use your personal repositories
"Permission denied"
Fix: Make sure your GitHub token has repo and workflow permissions
π What to Expect
Timeline for a typical run:
- Fetching issue: 2-5 seconds
- Cloning repository: 5-15 seconds (depends on repo size)
- AI Analysis: 10-20 seconds
- Code generation: 15-30 seconds
- Running tests: 30-120 seconds (if enabled)
- Creating PR: 3-5 seconds
Total: 1-3 minutes for most issues
π Next Steps
After your first successful test:
- β Review the draft PR on GitHub
- β Check if the fix makes sense
- β Run tests locally
- β Approve and merge if good
- β Try with more complex issues!
π Need Help?
- Check
reporepair.logfor detailed logs - Read
USAGE.mdfor advanced features - See
README.mdfor architecture details
π Ready to Test!
Your first command:
# Activate environment
venv\Scripts\activate
# Run a dry-run test
py -m cli.main fix YOUR_GITHUB_ISSUE_URL --dry-run --skip-tests
# Or just check the config
py -m cli.main config
Good luck! π
Remember: RepoRepair is a tool to ASSIST you, not replace you. Always review AI-generated code before merging!