* feat: enhance coverage reporting and improve tool configuration - Added support for JSON coverage reports in pyproject.toml. - Updated .gitignore to include coverage.json and task files for better management. - Introduced a new Type Safety Audit Report to document findings and recommendations for type safety improvements. - Created a comprehensive coverage configuration guide to assist in understanding coverage reporting setup. - Refactored tools configuration to utilize environment variables for concurrent scraping settings. These changes improve the project's testing and reporting capabilities while enhancing overall code quality and maintainability. * feat: enhance configuration handling and improve error logging - Introduced a new utility function `_get_env_int` for robust environment variable integer retrieval with validation. - Updated `WebToolsConfig` and `ToolsConfigModel` to utilize the new utility for environment variable defaults. - Enhanced logging in `CircuitBreaker` to provide detailed state transition information. - Improved URL handling in `url_analyzer.py` for better file extension extraction and normalization. - Added type validation and logging in `SecureInputMixin` to ensure input sanitization and validation consistency. These changes improve the reliability and maintainability of configuration management and error handling across the codebase. * refactor: update imports and enhance .gitignore for improved organization - Updated import paths in various example scripts to reflect the new structure under `biz_bud`. - Enhanced .gitignore to include clearer formatting for task files. - Removed obsolete function calls and improved error handling in several scripts. - Added public alias for backward compatibility in `upload_r2r.py`. These changes improve code organization, maintainability, and compatibility across the project. * refactor: update graph paths in langgraph.json for improved organization - Changed paths for research, catalog, paperless, and url_to_r2r graphs to reflect new directory structure. - Added new entries for analysis and scraping graphs to enhance functionality. These changes improve the organization and maintainability of the graph configurations. * fix: enhance validation and error handling in date range and scraping functions - Updated date validation in UserFiltersModel to ensure date values are strings. - Improved error messages in create_scraped_content_dict to clarify conditions for success and failure. - Enhanced test coverage for date validation and scraping content creation to ensure robustness. These changes improve input validation and error handling across the application, enhancing overall reliability. * refactor: streamline graph creation and enhance type annotations in examples - Simplified graph creation in `catalog_ingredient_research_example.py` and `catalog_tech_components_example.py` by directly compiling the graph. - Updated type annotations in `catalog_intel_with_config.py` for improved clarity and consistency. - Enhanced error handling in catalog data processing to ensure robustness against unexpected data types. These changes improve code readability, maintainability, and error resilience across example scripts. * Update src/biz_bud/nodes/extraction/extractors.py Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * Update src/biz_bud/core/validation/pydantic_models.py Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * refactor: migrate Jina and Tavily clients to use ServiceFactory dependency injection * refactor: migrate URL processing to provider-based architecture with improved error handling * feat: add FirecrawlApp compatibility classes and mock implementations * fix: add thread-safe locking to LazyLoader factory management * feat: implement service restart and refactor cache decorator helpers * refactor: move r2r_direct_api_call to tools.clients.r2r_utils and improve HTTP service error handling * chore: update Sonar task IDs in report configuration --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1.9 KiB
1.9 KiB
CLAUDE.local.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Commands
Testing
# Run all tests with coverage (uses pytest-xdist for parallel execution)
make test
# Run tests in watch mode
make test_watch
# Run specific test file
make test TEST_FILE=tests/unit_tests/nodes/llm/test_unit_call.py
# Run single test function
pytest tests/path/to/test.py::test_function_name -v
# Run crash tests for resilience testing
python tests/crash_tests/run_crash_tests.py
# Run specific test categories
pytest -m "not slow" # Skip slow tests
pytest -m integration # Only integration tests
pytest -m e2e # Only end-to-end tests
pytest -m unit # Only unit tests
Code Quality
# Run all linters (ruff, basedpyright, pyrefly, codespell) - ALWAYS run before committing
make lint-all
# Format code with ruff
make format
# Run pre-commit hooks (recommended)
make pre-commit
# Advanced type checking with Pyrefly
pyrefly check .
# Lint single file
make lint-file FILE_PATH=path/to/file.py
# Format single file
make black FILE_PATH=path/to/file.py
# Generate coverage report
make coverage-report
Development Services
# Start docker services (postgres, redis, qdrant)
make start
# Stop development services
make stop
# Quick setup for new developers
make setup
# Complete environment setup
./scripts/setup-dev.sh
Package Management
The project uses UV for all package management:
# Install main project with all packages
uv pip install -e ".[dev]"
# Install main project in development mode
uv pip install -e .
# Sync dependencies
uv sync
Notes for Execution
- Use
make lint-allormake pyreflyfor comprehensive code quality checks
The rest of the file remains unchanged. I've added the new memory as a note in the "Code Quality" section to highlight the available commands for linting.