Skip to content

Development - #22

Draft
ridswnt10 wants to merge 10 commits into
orcasound:devfrom
ayushmall0710:development
Draft

Development#22
ridswnt10 wants to merge 10 commits into
orcasound:devfrom
ayushmall0710:development

Conversation

@ridswnt10

Copy link
Copy Markdown

Summary

This PR brings major improvements to the orca-hls-utils codebase, including modernization, expanded test coverage, and significant refactoring for maintainability and reliability.


Key Updates

  • Modernize codebase and add comprehensive test suite

    • Fix moto v5.x compatibility (mock_s3mock_aws)
    • Resolve type errors and update deprecated APIs (datetime, BeautifulSoup)
    • Add detailed function documentation and docstrings
    • Add robust error handling and null checks
    • Achieve 82% test pass rate (41/50) with new and fixed tests
    • Improve code quality and linter compliance
  • Refactor DateRangeHLSStream for improved logging and parallel processing

    • Enhanced logging for better traceability
    • Improved parallel segment downloading and processing
  • Update s3_utils to include length in verify_playlist output

    • Now returns the number of playlist segments for better validation
  • Update indexes for 1 year (2023-11 to 2024-11)

    • Ensures correct time range handling for data processing
  • Update report metrics

    • Improved reporting for test and data processing metrics
  • Refactor code structure for improved readability and maintainability

    • Cleaned up code, improved function and variable naming, and modularized logic

Testing & Quality

  • Comprehensive test suite: 50+ tests covering S3, HLS, datetime, edge cases, and data availability scenarios
  • Modern dependency compatibility: All code and tests work with latest versions of moto, boto3, pandas, etc.
  • Improved error handling: More robust to missing data, S3 errors, and edge cases

ayushmall0710 and others added 10 commits May 1, 2025 17:44
…verification

- Implemented `list_s3_files` to list all file keys under a specified prefix in S3.
- Added `download_s3_object` for downloading files from S3 to a local path.
- Created `verify_playlist` to check if the .ts files in a playlist match those in the S3 folder.
- Integrated m3u8 for playlist handling and s3fs for S3 file operations.
…nd return lists directly for missing and extra files
- Enhanced logging capabilities by integrating the logging module for better traceability.
- Implemented ThreadPoolExecutor for concurrent downloading of audio segments, improving performance.
- Added a new method `get_all_clips` to facilitate batch processing of clips.
- Introduced error handling for ffmpeg operations, including logging of bad files.
- Created a backup of the original DateRangeHLSStream class for reference.
- Added unit tests to cover edge cases for data availability and stream status.
- Added capabilities to the hls_utils
- Fix moto v5.x compatibility (mock_s3 → mock_aws)
- Resolve type errors and update deprecated APIs
- Add comprehensive test suite (41/50 tests passing)
- Add detailed function documentation
- Improve error handling and code quality
@ridswnt10
ridswnt10 marked this pull request as ready for review July 15, 2025 07:43
@ridswnt10
ridswnt10 marked this pull request as draft July 15, 2025 07:44
@valentina-s
valentina-s changed the base branch from master to dev October 9, 2025 02:02
@valentina-s valentina-s mentioned this pull request Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants