-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Improve progress prints #302
Conversation
WalkthroughWalkthroughThe changes enhance the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Progress
participant TestProgress
User->>Progress: Call reset()
Progress->>Progress: Set start_time and first_record_received_time
User->>Progress: Call log_records_read()
Progress->>Progress: Set first_record_received_time if not set
User->>Progress: Call elapsed_seconds()
Progress->>Progress: Calculate elapsed time based on start_time and end_time
User->>Progress: Call elapsed_read_time()
Progress->>Progress: Calculate time since read operation started
User->>Progress: Call elapsed_seconds_since_first_record()
Progress->>Progress: Calculate time since first record received
User->>Progress: Call _get_status_message()
Progress->>Progress: Generate detailed progress message
User->>TestProgress: Run unit tests
TestProgress->>Progress: Validate time tracking and progress messages
This sequence diagram illustrates the interaction between various methods in the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
@coderabbitai review |
Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- airbyte/progress.py (6 hunks)
Additional comments not posted (7)
airbyte/progress.py (7)
95-97
: LGTM! Improved precision for short durations.The added condition for handling cases where seconds are less than or equal to 2 provides more precise time reporting.
252-252
: LGTM! Tracking the first record received time.The new attribute
first_record_received_time
helps in tracking the time when the first record is received, improving progress reporting accuracy.
271-276
: LGTM! Improved precision in elapsed seconds.Returning a float in the
elapsed_seconds
property allows for more precise time tracking, enhancing progress reporting.
279-286
: LGTM! Accurate time tracking since the first record.The
elapsed_seconds_since_first_record
property now calculates the time elapsed since the first record was received, improving progress reporting accuracy.
315-321
: LGTM! Improved precision in finalization seconds.Returning a float in the
elapsed_finalization_seconds
property allows for more precise time tracking, enhancing progress reporting.
330-331
: LGTM! Ensuring accurate tracking of the first record received.The
log_records_read
method now setsfirst_record_received_time
if it's not already set, ensuring accurate tracking for progress reporting.
420-463
: LGTM! Enhanced progress reporting.The refactored
_get_status_message
method provides detailed and informative progress reporting, including start and end times for reading and finalization, records processed, and completion status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- airbyte/progress.py (7 hunks)
- tests/unit_tests/test_progress.py (4 hunks)
Files skipped from review as they are similar to previous changes (1)
- airbyte/progress.py
Additional comments not posted (9)
tests/unit_tests/test_progress.py (9)
108-110
: LGTM!The
_assert_lines
function is correctly asserting that expected lines are present in the actual lines.
118-119
: LGTM!The status message for starting to read from the source is clear and informative.
123-125
: LGTM!The logic for starting the "time since first record" timer is correct.
130-131
: LGTM!The status message after reading some records is clear and provides useful information about the progress.
140-141
: LGTM!The status message after resetting the progress is clear and informative.
145-147
: LGTM!The logic for starting the "time since first record" timer after resetting is correct.
155-159
: LGTM!The status messages for reading records, caching records, and starting cache processing are clear and provide detailed information about the progress.
168-173
: LGTM!The status messages for finalizing batches and processing cache files are clear and informative.
183-189
: LGTM!The final status messages after completing all records and streams are detailed and provide a comprehensive summary of the progress.
Summary by CodeRabbit
New Features
Bug Fixes
Improvements