-
Notifications
You must be signed in to change notification settings - Fork 67
fix: Replace pendulum with ab_datetime_now() and fix linting issues #733
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
fix: Replace pendulum with ab_datetime_now() and fix linting issues #733
Conversation
- Replace pendulum.now().format() calls with ab_datetime_now().strftime() in progress.py - Add noqa comment for intentional private member access in sources/base.py - Fix line length violation in progress.py - Apply ruff formatting to both files Fixes CI failures in stream preview functionality. Co-Authored-By: AJ Steers <[email protected]>
Original prompt from AJ Steers
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. Testing This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1753943347-fix-ci-failures' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1753943347-fix-ci-failures' Helpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
Community SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
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.
Pull Request Overview
This PR fixes CI failures in PR #725 by replacing missing pendulum imports with the ab_datetime_now()
utility function and addressing linting violations. The changes enable the stream preview functionality to pass CI checks.
- Replaced three instances of
pendulum.now().format('HH:mm:ss')
withab_datetime_now().strftime('%H:%M:%S')
- Fixed linting issues including private member access warning and line length violations
- Applied consistent code formatting to improve readability
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
airbyte/sources/base.py | Added noqa comment for intentional private member access and reformatted code for line length compliance |
airbyte/progress.py | Replaced pendulum datetime calls with ab_datetime_now() and fixed string formatting for readability |
Copilot pointed out we have some missing import statements. |
Co-Authored-By: AJ Steers <[email protected]>
fix: Replace pendulum with ab_datetime_now() and fix linting issues
This PR targets the following PR:
Summary
Fixes CI failures in PR #725 that were blocking the stream preview functionality. The failures were caused by:
airbyte/progress.py
usedpendulum.now().format()
without importing pendulumKey Changes:
pendulum.now().format('HH:mm:ss')
withab_datetime_now().strftime('%H:%M:%S')
in 3 locations (following existing codebase pattern)# noqa: SLF001
comment to suppress intentional private member access warningReview & Testing Checklist for Human
ab_datetime_now().strftime('%H:%M:%S')
produces identical output topendulum.now().format('HH:mm:ss')
ab_datetime_now()
aligns with the intended "whenever" replacement mentioned in the original contextRecommended Test Plan:
poetry run pytest tests/unit_tests/test_lowcode_connectors.py::test_nocode_execution -v
poetry run pytest tests/unit_tests/ -v
Diagram
Notes
ab_datetime_now()
pattern based on existing codebase usage, though original context mentioned "whenever" replacementThe changes are mechanical replacements following established patterns in the codebase, but human verification of the datetime format equivalence and broader testing is recommended to ensure no subtle regressions.