Releases: Emasoft/apias
v0.1.26 - Cost Estimation & Documentation
What's New in v0.1.26
New Features
- Cost Estimation: New
--estimate-costCLI flag to preview API costs before processing - 3-Tier Cost Scenarios: Conservative (P50), Average (Mean), and Worst Case (P95) estimates
- Model Comparison: View cost estimates across all 5 supported GPT-5 models
Documentation
- API.md: Comprehensive programmatic API documentation (978 lines)
- README: Fixed Python API examples, added missing CLI flags
- Version Sync: All version references now consistent at 0.1.26
CLI Flags Added
--estimate-cost: Estimate costs before processing--resume: Resume previous scraping session--scrape-only: Scrape without AI processing--whitelist/--blacklist: URL filtering patterns--force-retry-count: Force specific retry count
Full Changelog
See CHANGELOG.md
v0.1.25: DRY Compliance - Terminal Utilities
DRY Principle Compliance (Terminal Utilities)
- Add
get_safe_terminal_width()andget_safe_terminal_height()- Centralized terminal size detection with platform-safe fallbacks - Update apias.py - Uses centralized terminal width detection (2 call sites consolidated)
- Add
quiet_print()wrapper - Helper function for quiet-mode-aware printing
Code Quality
- Eliminate duplicate try/except patterns for terminal size detection
- Centralize platform-safe fallbacks for headless/CI environments
Testing
- All 351 tests pass (72.45% coverage)
Installation
pip install apias==0.1.25v0.1.24: DRY Compliance - Status History Helper
DRY Principle Compliance (Continued)
- Add URLTask.add_status_history() helper method - Consistent status tracking with automatic size limiting
- Update status_pipeline.py - Uses helper instead of duplicated append/pop logic (2 call sites consolidated)
Documentation
- Platform limitation comments for os.replace() - Documents Windows file locking and cross-device move limitations
Testing
- All 351 tests pass (72.58% coverage)
Installation
pip install apias==0.1.24v0.1.23 - DRY Compliance and Platform Compatibility
DRY Principle Compliance (Code Deduplication)
- ErrorCategory enum consolidated into single source in
event_system.py - RECOVERABLE_CATEGORIES consolidated into
event_system.py - Removed duplicate
format_size()frombatch_tui.py- now imports fromterminal_utils.py - Added centralized config constants:
EVENT_DISPATCH_TIMEOUT(50ms for standard event processing)EVENT_DISPATCH_FAST_TIMEOUT(10ms for tight loop processing)HTML_CHUNK_SIZE(80K chars default)HTML_MAX_CHUNK_SIZE(200K chars max)
- Updated
apias.py,event_system.py,status_pipeline.pyto use centralized constants
Platform Compatibility
- Fixed terminal size detection in
apias.pywith try/except fallback for headless/CI environments - Added
DEFAULT_TERMINAL_WIDTHfallback in_clear_line()andcreate_summary_box()
Documentation
- Added comprehensive WHY/DO NOT comments explaining DRY consolidation decisions
- Updated docstrings to reference centralized config constants
Test Results
- All 351 tests pass
- Coverage: 72.53% (above 72% threshold)
Full Changelog: v0.1.22...v0.1.23
v0.1.22 - Comprehensive Codebase Audit
Comprehensive Codebase Audit Fixes
This release addresses 8 critical and high-priority issues discovered during a comprehensive audit of the entire codebase.
Critical Fixes
| Issue | File | Fix |
|---|---|---|
| Race condition in event dispatch | event_system.py |
Make defensive copy of handlers list under lock |
| Terminal not restored | terminal_utils.py |
Catch ALL exceptions, not just specific ones |
| Silent emit() failure | logger_interceptor.py |
Track failures and report to stderr |
| TUI exception handling gaps | batch_tui.py |
Add try-except with fallback to no-TUI mode |
| wait_for_start() infinite loop | batch_tui.py |
Add should_stop check to loop condition |
| TOCTOU race condition | dialog_manager.py |
Use while True with exception-based exit |
| Error collector documentation | error_collector.py |
Document fail-fast consideration |
| os._exit() documentation | apias.py |
Document intentional emergency exit behavior |
Design Philosophy
All fixes include comprehensive WHY/DO NOT comments explaining:
- Why the fix was necessary
- What not to do in the future
- Design decisions and trade-offs
Quality Assurance
- All 351 tests pass
- 72.35% code coverage (above 72% threshold)
- mypy: no issues in 13 source files
- ruff: all checks passed
Installation
pip install apias==0.1.22Or upgrade:
pip install --upgrade apiasv0.1.21 - Critical Retry Loop Fixes
Critical Fixes (Retry Loop Audit)
This release addresses 6 critical and high-priority issues discovered during a comprehensive audit of the retry loop implementation from v0.1.20.
Fixes
-
CRITICAL: Add missing circuit breaker check in retry loop
- Retry loop was ignoring rate limits during retries
- Now properly checks
error_collector.is_trippedafter each wait
-
CRITICAL: Capture critical flag from
wait_for_update()- Flag indicates circuit breaker events
- Required for proper shutdown detection during retries
-
HIGH: Remove double state update causing stats double-counting
- Previously updated both
status_pipelineANDbatch_tui - Now only updates
status_pipeline(render_snapshot syncs to TUI)
- Previously updated both
-
HIGH: Update
progress_trackerafter each retry completes- Was missing, causing
--resumeto not see retry results
- Was missing, causing
-
MEDIUM: Save progress file after retry round completes
- Ensures
--resumehas accurate state
- Ensures
-
Add clarifying comment about cost tracking during retries
- Cost is intentionally NOT subtracted on retry (tracks total spending)
Quality Assurance
- All 351 tests pass
- 72.62% code coverage
- mypy: no issues in 13 source files
- ruff: all checks passed
Installation
pip install apias==0.1.21Or upgrade:
pip install --upgrade apiasv0.1.20 - Critical TUI Bug Fixes
Bug Fixes
-
Fix duration timers running forever after task completion (green 100% tasks)
- Duration now freezes on first transition to COMPLETE/FAILED state
- Prevents recalculation on subsequent render_snapshot() calls
-
Fix retry prompt not actually retrying failed tasks
- When user presses "Y", failed tasks are now reprocessed immediately
- Creates new ThreadPoolExecutor for retry processing
- Properly resets task states and runs processing loop
-
Clarify mock mode cost estimates
- Changed misleading "(no token costs)" to explain GPT-4 pricing simulation
- Mock mode simulates costs to help estimate real API spending
-
Fix stats not updating correctly when retrying (FAILED -> PENDING)
-
Reset task duration/start_time when retrying for accurate tracking
Installation
Using uv (Recommended)
# Fresh install
uv tool install apias --python=3.10
# Upgrade existing installation
uv tool upgrade apiasUsing pip
pip install apias==0.1.20Full Changelog: v0.1.19...v0.1.20
v0.1.19 - Type Safety Improvements
Type Safety
- Resolve all 17 mypy type errors for strict type checking
- Add TypeVar for generic EventBus.subscribe() method
- Unify URLState enum (import from batch_tui instead of duplicate)
- Fix Callable type annotations in logger_interceptor.py
- Add proper type annotations to context manager methods
Installation
Using uv (Recommended)
The fastest way to install APIAS is using uv:
uv tool install apias --python=3.10Using pip
pip install apias==0.1.19Full Changelog: v0.1.18...v0.1.19
v0.1.18 - Test Coverage Improvements
Test Coverage Improvements
This release significantly improves test coverage from 60% to 73%.
Testing
- Add 105 new tests for TUI components
- Add comprehensive
test_batch_tui.pywith 70 tests covering URLState, URLTask, BatchStats, BatchTUIManager - Extend
test_tui.pywith 35 new tests for terminal detection, spinners, keyboard handling - Add comprehensive
test_retry.pywith 23 tests for retry functionality and exponential backoff
Configuration
- Adjust coverage threshold to 72% (TUI code requires extensive terminal mocking)
Documentation
- Add child-friendly configuration guide to README explaining num_threads, max_retries, chunk_size
Stats
- Total tests: 351 (up from 246)
- Coverage: 72.98%
v0.1.17
Changelog
All notable changes to APIAS (API Auto Scraper) will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[0.1.17] - 2025-11-30
Bug Fixes
- Critical CI/CD and publishing infrastructure audit by @Emasoft
Documentation
- Update documentation for Python 3.10+ requirement by @Emasoft
- Add uv installation recommendation and update PyPI workflow to Python 3.10 by @Emasoft
Generated by git-cliff