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

chore: Update tests to avoid running setup test #174

Merged
merged 12 commits into from
Nov 30, 2024
Merged

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Nov 29, 2024

Summary by Sourcery

Update CI configuration to use the latest Python and Django versions, adjust test execution to use 'tests/settings.py', and ensure compatibility by modifying the Python path in the test settings.

CI:

  • Update GitHub Actions workflow to use the latest Ubuntu version and expand the matrix to include Python 3.11, 3.12, and 3.13, and Django 4.2, 5.0, and 5.1.

Tests:

  • Modify test execution to run coverage using 'tests/settings.py' instead of 'setup.py test'.
  • Update 'tox.ini' to reflect changes in Django version dependencies and test execution command.

Chores:

  • Add current directory to Python path in 'tests/settings.py' to ensure correct script execution.

Copy link

sourcery-ai bot commented Nov 29, 2024

Reviewer's Guide by Sourcery

This PR updates the CI configuration and test execution approach. The changes modernize the testing infrastructure by expanding the Python and Django version support matrices, updating to the latest Ubuntu runner, and modifying how tests are executed to use a dedicated settings file instead of setup.py test command.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Update CI workflow configuration with expanded version matrices and compatibility exclusions
  • Update Python version matrix to support 3.9 through 3.13
  • Update Django version matrix to support 3.2, 4.2, 5.0, and 5.1
  • Switch from ubuntu-20.04 to ubuntu-latest
  • Add version compatibility exclusions for Django 5.0/5.1 with Python 3.9 and Django 3.2 with Python 3.13
  • Update Django installation to use compatible versions with '~=' instead of '=='
.github/workflows/test.yml
Modify test execution approach across CI and local development
  • Replace 'setup.py test' command with direct execution of tests/settings.py
  • Add current directory to Python path in settings.py for proper module resolution
  • Add requirement to install base test dependencies from tests/requirements/base.txt
.github/workflows/test.yml
tox.ini
tests/settings.py
Update tox configuration to align with new Django version support
  • Remove configurations for Django 4.0 and 4.1
  • Add configurations for Django 5.0 and 5.1
  • Update test command to use tests/settings.py instead of setup.py test
tox.ini

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

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @fsbraun - I've reviewed your changes - here's some feedback:

Overall Comments:

  • There appears to be a typo in tox.ini for Django 5.0's version constraint: Django>=5.0,<4.1 should probably be Django>=5.0,<5.1
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

tox.ini Outdated Show resolved Hide resolved
tox.ini Outdated Show resolved Hide resolved
tests/settings.py Outdated Show resolved Hide resolved
tests/settings.py Outdated Show resolved Hide resolved
@fsbraun
Copy link
Member Author

fsbraun commented Nov 29, 2024

@sourcery-ai review

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @fsbraun - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@vinitkumar vinitkumar merged commit 1dd7a53 into master Nov 30, 2024
47 checks passed
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.

2 participants