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

Make tealer compatible with python 3.12 #209

Merged
merged 13 commits into from Feb 8, 2024
Merged

Make tealer compatible with python 3.12 #209

merged 13 commits into from Feb 8, 2024

Conversation

montyly
Copy link
Member

@montyly montyly commented Jan 22, 2024

Summary by CodeRabbit

  • New Features
    • Introduced a matrix strategy for Python versions in testing workflows, allowing tests to run across multiple Python versions.
  • Bug Fixes
    • Updated the Python version from 3.8 to 3.9 in workflow setups to ensure compatibility.
    • Transitioned from python setup.py install to pip install . for a more standard approach to installing dependencies.
  • Refactor
    • Modified the Python package setup process to simplify the configuration.
    • Replaced pkg_resources.require with importlib.metadata.version for version retrieval, enhancing the efficiency of internal operations.
    • Updated the method for handling entry points to use importlib.metadata, improving compatibility with different Python versions.

@montyly montyly requested a review from S3v3ru5 as a code owner January 22, 2024 10:12
@montyly montyly changed the title run tests for all python version Make tealer compatible with python 3.12 Jan 22, 2024
@montyly
Copy link
Member Author

montyly commented Jan 22, 2024

What this PR contains:

  • Drop py 3.8 support. The EOL is this year
  • Add support for py 3.12
  • Make all the CI tests run on 3.9 - 3.12
  • Drop setup.py in profit of pyproject.toml
  • Drop pkg_resources in profit of importlib (better forward compatibility)

@montyly montyly mentioned this pull request Jan 22, 2024
@aorumbayev
Copy link
Contributor

Hey @montyly any updates on when this is expected to be merged?

Copy link

coderabbitai bot commented Feb 8, 2024

Warning

Rate Limit Exceeded

@montyly has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 51 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 2fb904f and 034dff1.

Walkthrough

The recent updates focus on modernizing Python workflows and dependency management across various GitHub Actions, including transitioning to Python 3.9, enhancing test coverage with a matrix strategy for multiple Python versions, and adopting importlib.metadata over pkg_resources for version and entry point handling. Additionally, the setup.py configuration has been streamlined to simplify package setup, reflecting a shift towards more efficient and maintainable project configurations.

Changes

Files Change Summary
.github/workflows/.../darglint.yml, .github/workflows/.../linter.yml Updated Python version from 3.8 to 3.9.
.github/workflows/pytest.yml Changed workflow name to "Pytest", added matrix strategy for Python versions.
.github/workflows/pytest310.yml Switched from python setup.py install to pip install ..
.github/workflows/tests.yml Introduced matrix strategy for Python versions.
setup.py Modified import statement and replaced setup configuration with setuptools.setup().
tealer/__main__.py, tealer/utils/.../common.py Replaced pkg_resources.require and pkg_resources with importlib.metadata.version and importlib.metadata, added _get_entry_points function.

🐇✨
In a burrow, deep and wide,
Changes surge like the tide.
Python versions, new and bright,
CodeRabbit hops with delight!
🌟📦

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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • 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 tests 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 generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 14cfe8b and 2fb904f.
Files ignored due to path filters (1)
  • pyproject.toml is excluded by: !**/*.toml
Files selected for processing (8)
  • .github/workflows/darglint.yml (1 hunks)
  • .github/workflows/linter.yml (1 hunks)
  • .github/workflows/pytest.yml (2 hunks)
  • .github/workflows/pytest310.yml (1 hunks)
  • .github/workflows/tests.yml (1 hunks)
  • setup.py (1 hunks)
  • tealer/main.py (2 hunks)
  • tealer/utils/command_line/common.py (4 hunks)
Additional comments: 8
setup.py (1)
  • 1-3: Ensure all necessary configurations previously in setup.py are correctly specified in pyproject.toml.
.github/workflows/darglint.yml (1)
  • 20-23: Change aligns with PR objectives to drop support for Python 3.8.
.github/workflows/tests.yml (1)
  • 21-36: Change correctly implements the intended update to test across Python versions 3.9 to 3.12.
.github/workflows/pytest310.yml (1)
  • 32-32: Change aligns with modern Python packaging practices.
.github/workflows/pytest.yml (1)
  • 18-60: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-57]

Changes correctly implement the intended updates, including the workflow name change and the introduction of a matrix strategy for Python versions 3.9 to 3.12.

.github/workflows/linter.yml (1)
  • 26-29: Change aligns with PR objectives to drop support for Python 3.8.
tealer/utils/command_line/common.py (1)
  • 90-115: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [58-111]

Changes correctly implement the intended updates to use importlib.metadata and improve compatibility across different Python versions with the _get_entry_points function.

tealer/__main__.py (1)
  • 74-74: Change aligns with PR objectives and modern Python practices by using importlib.metadata.version for retrieving version information.

@montyly montyly merged commit 9817d18 into main Feb 8, 2024
23 checks passed
@montyly montyly deleted the pytest branch February 8, 2024 14:01
@montyly
Copy link
Member Author

montyly commented Feb 8, 2024

@aorumbayev : it's available on pypi. The support for 3.12 took us a bit more time than anticipated

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.

None yet

2 participants