Skip to content

ci: add poe install definition to save some keystrokes #154

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

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Dec 7, 2024

Summary by CodeRabbit

  • New Features

    • Introduced several new tasks for installation, building, formatting checks, linting, and testing to streamline the development workflow.
    • Added dynamic versioning for project dependencies.
    • Enhanced project configuration for better dependency management.
  • Improvements

    • Improved structure for managing tasks related to code quality and testing, including combined tasks for checking and fixing code.

Copy link
Contributor

coderabbitai bot commented Dec 7, 2024

📝 Walkthrough

Walkthrough

The modifications in the pyproject.toml file enhance the configuration for the Poetry build system and introduce new tasks under the [tool.poe.tasks] section. Key changes include the specification of build dependencies, dynamic versioning, and a comprehensive list of tasks for installation, building, formatting, linting, and testing. The tasks streamline the development workflow, allowing for efficient management of dependencies and project operations.

Changes

File Change Summary
pyproject.toml - Enhanced [build-system] with dependencies like poetry-core and poetry-dynamic-versioning.
- Updated [tool.poetry] for dynamic versioning and extensive dependencies.
- Introduced new tasks under [tool.poe.tasks]: install, assemble, build-package, _format-check-ruff, _format-check-prettier, format-check, _format-fix-ruff, _format-fix-prettier, format-fix, _lint-ruff, type-check, lint, check-lockfile, lint-fix, lint-fix-unsafe, check-all, fix-all, fix-and-check, pytest, pytest-fast, unit-test-with-cov, check-local, check-ci, pre-push, docs-generate, docs-preview.
- Detailed logging configuration for PyTest under [tool.pytest.ini_options].
- Outlined Python version compatibility and CI-related tasks in [tool.airbyte_ci].

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@aaronsteers aaronsteers enabled auto-merge (squash) December 7, 2024 01:22
@github-actions github-actions bot added the ci label Dec 7, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Outside diff range and nitpick comments (4)
pyproject.toml (4)

127-128: Consider adding a lightweight install variant?

The install task with --all-extras is great for full development setup, but what do you think about adding a lightweight variant without extras for faster installation when working on core features? Something like:

 # Installation
 install = { shell = "poetry install --all-extras" }
+install-core = { shell = "poetry install", help = "Install only core dependencies without extras" }

wdyt? 🤔


Line range hint 133-156: Add documentation for ignore_fail behavior?

The format and lint tasks look great! Would it be helpful to add a comment explaining why ignore_fail = "return_non_zero" is used in these tasks? This could help other developers understand the behavior, something like:

 # Format check tasks
+# ignore_fail is used to continue execution even if one formatter fails, allowing all format issues to be reported
 _format-check-ruff = {cmd = "ruff format --check .", help = "Check formatting with Ruff."}

What are your thoughts on this? 🤔


Line range hint 169-171: Consider enhancing coverage reporting options?

The test tasks look solid! Would it be valuable to add HTML coverage reports for better visualization? Maybe something like:

-unit-test-with-cov = {cmd = "pytest -s unit_tests --cov=airbyte_cdk --cov-report=term --cov-config ./pyproject.toml", help = "Run unit tests and create a coverage report."}
+unit-test-with-cov = {cmd = "pytest -s unit_tests --cov=airbyte_cdk --cov-report=term --cov-report=html --cov-config ./pyproject.toml", help = "Run unit tests and create coverage reports (terminal + HTML)."}

This would generate a browsable coverage report. What do you think? 📊


Line range hint 175-176: Address the TODO comment about mypy check

There's a TODO about finding a version of the modified mypy check that works both locally and in CI. Would you like help investigating and implementing this? I can help create a solution that works consistently across environments.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 580f60e and 81ab18d.

📒 Files selected for processing (1)
  • pyproject.toml (1 hunks)
🔇 Additional comments (1)
pyproject.toml (1)

129-132: Verify the manifest generation script

Let's ensure the shell script exists and has proper permissions.

✅ Verification successful

All good with the manifest generation script! 🎯

The script setup looks solid - both the shell script and its Python companion exist and are properly configured. The shell script handles the Docker environment setup for consistent codegen, and the Python script takes care of the actual manifest generation with proper version pinning. Everything's in place and executable!

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the script exists and is executable
if [ -x "bin/generate-component-manifest-dagger.sh" ]; then
    echo "✅ Script exists and is executable"
else
    echo "❌ Script not found or not executable"
    # Check if it exists but isn't executable
    if [ -f "bin/generate-component-manifest-dagger.sh" ]; then
        echo "Found script but it's not executable"
    fi
fi

Length of output: 131


Script:

#!/bin/bash
# Let's check the content of the script to understand what it does
cat bin/generate-component-manifest-dagger.sh

Length of output: 461


Script:

#!/bin/bash
# Let's verify if the Python script it calls exists and check its content
if [ -f "bin/generate_component_manifest_files.py" ]; then
    echo "✅ Python script exists"
    echo "Content of the Python script:"
    cat bin/generate_component_manifest_files.py
else
    echo "❌ Python script not found"
fi

Length of output: 3470

@aaronsteers aaronsteers merged commit d516523 into main Dec 7, 2024
19 of 20 checks passed
@aaronsteers aaronsteers deleted the aj/ci/add-poe-install-task branch December 7, 2024 01:38
@coderabbitai coderabbitai bot mentioned this pull request Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant