- β
__init__()- Initialization with adapter, config, and default adapter creation - β
scrape()- Success cases, options, validation, error handling - β
crawl()- Success cases, options, validation, error handling - β
map()- With and without search, validation, error handling - β
search()- Success cases, options, validation, error handling - β
extract()- With schema, prompt, multiple URLs, validation, error handling
- β
__init__()- Initialization, error handling, validation - β
scrape_url()- Success, formats, actions, timeout errors, connection errors - β
crawl_url()- Success, options, error handling - β
map_url()- Success, with search, error handling - β
search_web()- Success, options, error handling - β
extract_data()- Success, schema, prompt, error handling
- β
__init__()- Initialization, error handling - β
scrape()- Success, format conversion - β
crawl()- Success, result conversion - β
map()- Success, result conversion - β
search()- Success, result conversion - β
extract()- Success, result conversion - β
_convert_scrape_result()- Dict and Document object formats - β
_convert_crawl_result()- Various data structures - β
_convert_map_result()- Link conversion - β
_convert_search_result()- Search result conversion - β
_convert_extract_result()- Extract result conversion
- β
ScrapeConfig- Default values, custom config, from_env, validation - β
get_config(),set_config(),reset_config()- Global config management
- β
ScrapeFormatenum - β
ScrapeResult- Creation, methods, formats - β
ScrapeOptions- Defaults, customization, to_dict - β All result types (CrawlResult, MapResult, SearchResult, ExtractResult)
- β
BaseScraperabstract class
- β
All methods have complete docstrings with:
- Description
- Args documentation
- Returns documentation
- Raises documentation
- Example usage (in class docstring)
- β
All methods have complete docstrings with:
- Description
- Args documentation
- Returns documentation (including return structure)
- Raises documentation
- Example usage
- β
All methods have complete docstrings with:
- Description
- Args documentation
- Returns documentation
- Example usage
- β
ScrapeConfigclass fully documented - β All methods documented with examples
- β Environment variables documented
- test_core.py - 8 test classes, 20+ test methods
- test_scraper.py - 1 test class, 25+ test methods
- test_firecrawl.py - 3 test classes, 30+ test methods
- test_config.py - 2 test classes, 15+ test methods
- test_scrape_integration.py - 2 test classes, 5+ test methods
Total: 90+ test methods covering all functionality
- README.md - User-facing documentation with examples
- AGENTS.md - Technical documentation for agents
- SPEC.md - Functional specification
- SECURITY.md - Security considerations
- CHANGELOG.md - Version history
- docs/API_SPECIFICATION.md - Complete API reference
- docs/USAGE_EXAMPLES.md - Comprehensive usage examples
- firecrawl/README.md - Firecrawl integration docs
- firecrawl/AGENTS.md - Firecrawl technical docs
- firecrawl/SPEC.md - Firecrawl specification
All public methods are:
- β Fully documented with docstrings
- β Include example usage
- β Document all parameters and return values
- β Document exceptions raised
- β Covered by unit tests
- β Tested for error cases
- β Tested for edge cases
# All unit tests
pytest src/codomyrmex/scrape/tests/unit/ -v
# With coverage
pytest src/codomyrmex/scrape/tests/unit/ --cov=codomyrmex.scrape --cov-report=term-missing
# Integration tests (requires API key)
export FIRECRAWL_API_KEY="your-key"
pytest src/codomyrmex/scrape/tests/integration/ -v- β No Mock Methods: All tests use real implementations. No unittest.mock, MagicMock, or @patch decorators.
- β Real Data Analysis: All data processing and conversion logic tested with real data structures.
- β Test Adapters: Use test adapters that implement BaseScraper interface, not mocks.
- β Skip When Unavailable: Tests skip when dependencies (like firecrawl-py) are not available rather than mocking.
- β Comprehensive Error Handling: Real error propagation tested.
- β Edge Case Coverage: Boundary conditions tested with real data.
- β Input Validation: All validation logic tested with real inputs.
- β Type Safety: Type hints and conversions verified.
- β Integration Tests: End-to-end validation with real API calls (when API key available).
- Parent: Project Overview
- Module Index: All Agents
- Documentation: Reference Guides
- Home: Root README