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 integration test and update config files #35

Merged
merged 2 commits into from
Oct 11, 2024
Merged

Conversation

Bilbottom
Copy link
Owner

@Bilbottom Bilbottom commented Oct 11, 2024

Summary by Sourcery

Fix the integration test by setting the correct environment variables and adding a cleanup step. Update the CI workflow to use the latest versions of Poetry and Python setup actions. Revise README badges to reflect current project status and add a pre-commit hook for generating a coverage badge.

Bug Fixes:

  • Fix the integration test by ensuring the correct environment variables are set and adding a teardown fixture to clean up the compiled directory.

CI:

  • Simplify the GitHub Actions workflow by removing specific path triggers and updating the setup for Poetry and Python to newer versions.

Documentation:

  • Update README badges to reflect the current status of tests and coverage, and remove outdated application tests badge.

Tests:

  • Enhance the integration test to verify that dbt can be successfully invoked, including a new teardown fixture for cleanup.

Chores:

  • Add a pre-commit hook to generate a coverage badge automatically.

Copy link

sourcery-ai bot commented Oct 11, 2024

Reviewer's Guide by Sourcery

This pull request focuses on improving the integration test, updating configuration files, and enhancing the project's documentation. The changes include refactoring the integration test, updating GitHub Actions workflow, modifying the README, and adding a new pre-commit hook for generating a coverage badge.

Sequence diagram for the integration test refactor

sequenceDiagram
    actor Tester
    participant TestEnv as Test Environment
    participant DBT as dbt_py

    Tester->>TestEnv: Set environment variables
    TestEnv-->>DBT: Provide environment variables
    Tester->>DBT: Invoke dbt_py with arguments
    DBT-->>Tester: Execute and return results
    Note over Tester,DBT: Test checks if dbt can be successfully invoked
Loading

Architecture diagram for updated GitHub Actions workflow

graph TD;
    A[GitHub Actions] -->|workflow_dispatch| B[Tests]
    A -->|pull_request| B
    B --> C[version-testing]
    C --> D[Check out repository]
    C --> E[Set up Poetry]
    C --> F[Set up Python]

    subgraph Matrix
        G[windows-latest]
        H[macos-latest]
        I[ubuntu-latest]
    end
    C -->|runs-on| Matrix
Loading

File-Level Changes

Change Details Files
Refactored and improved the integration test
  • Added a new teardown fixture to remove the compiled directory after tests
  • Renamed the test function to be more descriptive
  • Updated environment variable setting to improve readability
tests/integration/test__integration.py
Updated GitHub Actions workflow configuration
  • Renamed the workflow from 'Application Tests' to 'Tests'
  • Removed specific path triggers for the workflow
  • Updated the versions of actions/checkout, actions/setup-python, and Poetry
  • Simplified the matrix strategy for OS testing
.github/workflows/tests.yaml
Enhanced README with additional badges and information
  • Added badges for tests, coverage, and Sourcery
  • Updated existing badges for better consistency and information
  • Removed outdated badge for application tests
README.md
Added a new pre-commit hook for generating a coverage badge
  • Configured a new hook to generate and update a coverage badge SVG file
.pre-commit-config.yaml
Refactored environment variable handling in the main script
  • Moved the PACKAGE_ROOT environment variable retrieval into the function where it's used
  • Removed a global variable to improve code organization
dbt_py/main.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Bilbottom Bilbottom merged commit f8ab2a2 into main Oct 11, 2024
4 checks passed
@Bilbottom Bilbottom deleted the fix-integration-test branch October 11, 2024 15:18
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