5 Commits

Author SHA1 Message Date
Pablo Estevez
5ed767ff9a run ruff 2026-01-17 17:29:21 +00:00
yusyus
824d817a41 fix: Make retry timing test more robust for CI
The exponential_backoff_timing test was flaky on CI due to strict timing assertions. On busy CI systems (especially macOS runners), CPU scheduling and execution time variance can cause measured delays to deviate from expected values.

Changes:
- Simplified test to check total elapsed time instead of individual delay comparisons
- Changed threshold from 1.5x comparison to lenient 0.25s total time minimum
- Expected delays: 0.1s + 0.2s = 0.3s minimum, using 0.25s threshold for variance
- Test now verifies behavior (delays applied) without strict timing requirements

This makes the test reliable across different CI environments while still validating retry logic.

Fixes CI failure on macOS runner (Python 3.12):
  AssertionError: 0.249 not greater than 0.250 * 1.5
2025-12-21 22:57:27 +03:00
Joseph Magly
0d0eda7149 feat(utils): add retry utilities with exponential backoff (#208)
Add retry_with_backoff() and retry_with_backoff_async() for network operations.

Features:
- Configurable max attempts (default: 3)
- Exponential backoff with configurable base delay
- Operation name for meaningful log messages
- Both sync and async versions

Addresses E2.6: Add retry logic for network failures

Co-authored-by: Joseph Magly <1159087+jmagly@users.noreply.github.com>
2025-12-21 22:31:38 +03:00
yusyus
9931066741 fix: Update test imports for new package structure
Updated 8 test files to use new skill_seekers.* imports:
- test_async_scraping.py
- test_estimate_pages.py
- test_package_skill.py
- test_parallel_scraping.py
- test_unified.py
- test_unified_mcp_integration.py
- test_upload_skill.py
- test_utilities.py

Changed:
- from cli.* → from skill_seekers.cli.*
- from skill_seeker_mcp.* → from skill_seekers.mcp.*
- Removed obsolete sys.path.insert() calls

Result:
- 364/389 tests passing (93.5% pass rate)
- Remaining 25 failures are path-related tests that need
  updating for new unified CLI commands (will fix next)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 01:21:29 +03:00
yusyus
13fcce1f4e Add comprehensive test coverage for CLI utilities
Expand test suite from 118 to 166 tests (+48 new tests) with focus on
untested CLI tools and utility functions. Overall coverage increased
from 14% to 25%.

New test files:
- tests/test_utilities.py (42 tests) - API keys, file validation, formatting
- tests/test_package_skill.py (11 tests) - Skill packaging workflow
- tests/test_estimate_pages.py (8 tests) - Page estimation functionality
- tests/test_upload_skill.py (7 tests) - Skill upload validation

Coverage improvements by module:
- cli/utils.py: 0% → 72% (+72%)
- cli/upload_skill.py: 0% → 53% (+53%)
- cli/estimate_pages.py: 0% → 47% (+47%)
- cli/package_skill.py: 0% → 43% (+43%)

All 166 tests passing. Added pytest-cov for coverage reporting.
Updated requirements.txt with all dependencies including MCP packages.

Test execution: 9.6s for complete suite

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 22:08:02 +03:00