-
Notifications
You must be signed in to change notification settings - Fork 1
fix: misc fixes #92
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: misc fixes #92
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI_Main
participant FileSystem
User->>CLI_Main: Invoke _generate()
CLI_Main->>FileSystem: Check requirements_dbt_source_file exists
alt File exists
CLI_Main->>FileSystem: Load dbt_requirements_file
CLI_Main->>FileSystem: Load airbyte_dbt_source_file (generated YAML)
CLI_Main->>User: Display source tables from airbyte_dbt_source_file
else File missing
CLI_Main->>User: Exit with status 1
end
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 1
🔭 Outside diff range comments (1)
src/morph/cli/main.py (1)
348-356
:⚠️ Potential issueRefactor needed: Function exceeds statement limit.
The linter has flagged that the
_generate
function now has 51 statements, exceeding the limit of 50 (PLR0915). Consider refactoring this function into smaller, more focused functions to reduce complexity.For example, you could extract the table evaluation logic (lines 396-435) into a separate function like
_evaluate_target_tables()
.🧰 Tools
🪛 Ruff (0.8.2)
348-348: Too many statements (51 > 50)
(PLR0915)
🪛 GitHub Actions: Lint
[error] 348-348: Ruff: Too many statements in function '_generate' (51 > 50) (PLR0915)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/morph/cli/main.py
(3 hunks)
🧰 Additional context used
🪛 GitHub Actions: Lint
src/morph/cli/main.py
[error] 348-348: Ruff: Too many statements in function '_generate' (51 > 50) (PLR0915)
🔇 Additional comments (3)
src/morph/cli/main.py (3)
367-370
: Improved code clarity with explicit path variable.Adding a dedicated variable for the generated source YAML file path improves code readability and makes the intent of using this specific file clearer.
373-377
: Better error handling for missing requirements file.Changing from a simple return to
sys.exit(1)
is a good improvement. This ensures the program terminates properly when a critical file is missing, which is appropriate for CLI tools.
452-452
: Fixed source tables display.Changing the source of tables in the display from
dbt_requirements_file.source_tables
toairbyte_dbt_source_file.source_tables
properly addresses the table comparison issue mentioned in the PR title.
/fix |
/fix
|
Summary by CodeRabbit
Bug Fixes
Refactor
Enhancements
Style