Help us improve RatCrawler and make it even better
First steps to contribute to RatCrawler
# Click the "Fork" button on GitHub
# This creates your own copy of the repository
git clone https://github.com/swadhinbiswas/ratcrawler.git
cd ratcrawler
git remote add upstream
https://github.com/swadhinbiswas/ratcrawler.git
git fetch upstream
# Install Python dependencies
pip install -r requirements.txt
# Install development dependencies
pip install pytest black flake8 mypy
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |
sh
# Build the project
cd rust_version
cargo build
# Test Python installation
python3 main.py --help
# Test Rust installation
cargo test
How to work on RatCrawler features and fixes
Always work on a separate branch for your changes
# Create and switch to a new branch
git checkout -b feature/your-feature-name
# Or for bug fixes
git checkout -b fix/issue-description
# Or for documentation
git checkout -b docs/update-readme
# Example branches:
# feature/add-google-trends-integration
# fix/crawler-timeout-issue
# docs/add-api-examples
# refactor/improve-error-handling
Implement your feature or fix
Save your work and push to your fork
# Check what files you've changed
git status
# Add your changes
git add .
# Or add specific files
git add filename.py
git add src/new_module.rs
# Commit with a descriptive message
git commit -m "feat: add Google Trends integration
- Add GoogleTrends class for trend analysis
- Implement trend data fetching
- Add trend visualization
- Update documentation
Closes #123"
# Push to your fork
git push origin feature/your-feature-name
Submit your changes for review
1. Go to your fork on GitHub
2. Click "Compare & pull request"
3. Fill out the pull request template:
- Title: Brief description of changes
- Description: Detailed explanation
- Link any related issues
4. Click "Create pull request"
Pull Request Template:
```
## Description
Brief description of what this PR does.
## Changes Made
- Change 1
- Change 2
- Change 3
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Screenshots (if applicable)
Add screenshots of new features or UI changes.
Fixes #123
```
Rules and best practices for contributions
type(scope): description [optional body] [optional footer]
feat: add backlink analysis
fix: handle timeout errors
docs: update API documentation
test: add crawler unit tests
# Run all tests
pytest
# Run specific test file
pytest test_crawler.py
# Run with coverage
pytest --cov=ratcrawler
# Run tests in verbose mode
pytest -v
# Run specific test function
pytest test_crawler.py::test_basic_crawl
# Run all tests
cargo test
# Run specific test
cargo test test_crawler
# Run with verbose output
cargo test -- --nocapture
# Run benchmarks
cargo bench
# Run tests in release mode
cargo test --release
Important guidelines for contributors