Skip to content
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: Poetry builds and snowflake tests #595

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Jan 28, 2025

Summary by CodeRabbit

  • Dependency Updates
    • Restricted Python version support to 3.10 and 3.11
    • Updated build system requirements for poetry-core
  • Test Improvements
    • Enhanced clarity of test parameters with added comments linking to connection statuses.
    • Adjusted DataFrame shape assertions for increased flexibility in column count.

Copy link

coderabbitai bot commented Jan 28, 2025

📝 Walkthrough

Walkthrough

The pull request focuses on updating the pyproject.toml configuration for the Airbyte project. The changes involve narrowing the Python version compatibility range from >=3.10,<3.13 to >=3.10,<3.12, effectively removing support for Python 3.12. Additionally, the build system requirements have been modified to restrict the poetry-core version to below 2.0, while maintaining the existing constraint for poetry-dynamic-versioning. The tests/integration_tests/cloud/test_cloud_sql_reads.py file has also been updated to enhance test clarity and flexibility regarding DataFrame dimensions.

Changes

File Change Summary
pyproject.toml - Python version constraint updated from >=3.10,<3.13 to >=3.10,<3.12
- Build system requires updated to restrict poetry-core version to <2.0
tests/integration_tests/cloud/test_cloud_sql_reads.py - Added comments to pytest.param entries for clarity
- Updated assertions for pandas_df shape to allow for variations in column count

Possibly related PRs

What do you think about these updates? Do you want to dive deeper into any specific area? 😊

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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 or @coderabbitai title 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.

Copy link

@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

🧹 Nitpick comments (4)
tests/integration_tests/cloud/test_cloud_sql_reads.py (4)

36-43: Love the addition of connection URLs! 🎉

Great job documenting the connection IDs with their cloud URLs! This will help developers quickly check connection status. Would it be helpful to add a brief comment about what kind of test data we expect from each connection, wdyt?


85-89: Could we clarify what causes the column count variation? 🤔

Nice flexibility allowing for both 20 and 21 columns! The comment mentions it depends on "when it was created" - would it be helpful to document what specifically changed in the schema to cause this variation? This could help future maintainers understand if they see different column counts.


100-106: Consider reducing URL duplication? 💭

The connection URLs are duplicated from the first test. What do you think about defining these as constants at the module level? Something like:

SNOWFLAKE_CONN_ID = "c7b4d838-a612-495a-9d91-a14e477add51"
SNOWFLAKE_CONN_URL = "https://cloud.airbyte.com/workspaces/a0cc325a-d358-4df4-bdd4-c09d753b6afb/connections/c7b4d838-a612-495a-9d91-a14e477add51/status"

This would make updates easier and reduce the chance of URLs getting out of sync. Wdyt?


198-202: Consider extracting DataFrame validation to a helper? 🛠️

These shape assertions are identical to the ones in test_read_from_deployed_connection. What do you think about extracting them into a helper function? Something like:

def assert_valid_users_dataframe(df: pd.DataFrame) -> None:
    """Validate the shape and content of the users DataFrame."""
    assert df.shape[0] == 100
    assert df.shape[1] in {20, 21}  # Column count diff depending on when it was created

This would make the tests more DRY and easier to maintain. Thoughts?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d23857 and e0713e0.

📒 Files selected for processing (1)
  • tests/integration_tests/cloud/test_cloud_sql_reads.py (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Pytest (All, Python 3.11, Windows)
  • GitHub Check: Pytest (All, Python 3.11, Ubuntu)
  • GitHub Check: Pytest (No Creds)
  • GitHub Check: Pytest (All, Python 3.10, Windows)
  • GitHub Check: Pytest (All, Python 3.10, Ubuntu)
  • GitHub Check: Pytest (Fast)

@aaronsteers aaronsteers disabled auto-merge January 29, 2025 16:20
@aaronsteers aaronsteers merged commit e0c70b8 into main Jan 29, 2025
19 checks passed
@aaronsteers aaronsteers deleted the aj/fix/poetry-builds-and-snowflake-tests branch January 29, 2025 16:20
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.

1 participant