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

Upgrade python to 3.11 #80

Merged
merged 3 commits into from
May 13, 2024
Merged

Upgrade python to 3.11 #80

merged 3 commits into from
May 13, 2024

Conversation

eberrigan
Copy link
Collaborator

@eberrigan eberrigan commented May 13, 2024

  • change python in environment to 3.11
  • update pip package document use of python 3.10 and 3.11
  • add python 3.11 to suggestion in README
  • bump version number

Summary by CodeRabbit

  • New Features

    • Updated the software to support Python versions 3.10 and 3.11.
    • Upgraded the package version to 0.1.0.
  • Documentation

    • Revised installation instructions to use Python 3.11.
  • Chores

    • Updated Python version dependency in the project environment setup.

Copy link
Contributor

coderabbitai bot commented May 13, 2024

Walkthrough

The changes revolve around elevating the Python version from 3.9 to 3.11 across multiple files in the sleap-roots project. This includes updating installation commands, environment setups, classifiers, and package versions, signifying a significant evolution in the project's technology stack.

Changes

File Path Change Summary
README.md, environment.yml Updated Python version from 3.9 to 3.11
pyproject.toml Added support for Python 3.10 and 3.11 in classifiers
sleap_roots/__init__.py Updated package version from "0.0.9" to "0.1.0"
.github/workflows/build.yml, .github/workflows/ci.yml Updated Python version from 3.9 to 3.11 in workflows

🐰✨
A hop and a skip on version's trail,
Python grows, as old versions pale.
From 3.9 to beyond, we sail,
In sleap-roots land, updates prevail!
🌟📦


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 testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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.
  • 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

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.78%. Comparing base (59785c6) to head (b914b43).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #80   +/-   ##
=======================================
  Coverage   75.78%   75.78%           
=======================================
  Files          13       13           
  Lines        1396     1396           
=======================================
  Hits         1058     1058           
  Misses        338      338           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Out of diff range and nitpick comments (1)
sleap_roots/__init__.py (1)

Line range hint 14-27: Remove or use the unused imports to clean up the code.

- import sleap_roots.trait_pipelines
- from sleap_roots.trait_pipelines import (
-     DicotPipeline,
-     TraitDef,
-     YoungerMonocotPipeline,
-     OlderMonocotPipeline,
-     MultipleDicotPipeline,
- )
- from sleap_roots.series import (
-     Series,
-     find_all_h5_paths,
-     find_all_slp_paths,
-     load_series_from_h5s,
-     load_series_from_slps,
- )
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 59785c6 and a8d4ffa.
Files selected for processing (4)
  • README.md (1 hunks)
  • environment.yml (1 hunks)
  • pyproject.toml (1 hunks)
  • sleap_roots/init.py (1 hunks)
Files skipped from review due to trivial changes (1)
  • pyproject.toml
Additional Context Used
LanguageTool (2)
README.md (2)

Near line 24: Unpaired symbol: ‘]’ seems to be missing
Context: ...ntation per pipeline is available here: [sleap-roots HackMD](https://hackmd.io/DM...


Near line 141: Possible missing comma found.
Context: ...oks`. To use them, activate your conda environment which includes JupyterLab (recommended)...

Ruff (11)
sleap_roots/__init__.py (11)

14-14: sleap_roots.trait_pipelines imported but unused; consider removing, adding to __all__, or using a redundant alias


16-16: sleap_roots.trait_pipelines.DicotPipeline imported but unused; consider removing, adding to __all__, or using a redundant alias


17-17: sleap_roots.trait_pipelines.TraitDef imported but unused; consider removing, adding to __all__, or using a redundant alias


18-18: sleap_roots.trait_pipelines.YoungerMonocotPipeline imported but unused; consider removing, adding to __all__, or using a redundant alias


19-19: sleap_roots.trait_pipelines.OlderMonocotPipeline imported but unused; consider removing, adding to __all__, or using a redundant alias


20-20: sleap_roots.trait_pipelines.MultipleDicotPipeline imported but unused; consider removing, adding to __all__, or using a redundant alias


23-23: sleap_roots.series.Series imported but unused; consider removing, adding to __all__, or using a redundant alias


24-24: sleap_roots.series.find_all_h5_paths imported but unused; consider removing, adding to __all__, or using a redundant alias


25-25: sleap_roots.series.find_all_slp_paths imported but unused; consider removing, adding to __all__, or using a redundant alias


26-26: sleap_roots.series.load_series_from_h5s imported but unused; consider removing, adding to __all__, or using a redundant alias


27-27: sleap_roots.series.load_series_from_slps imported but unused; consider removing, adding to __all__, or using a redundant alias

Additional comments not posted (3)
environment.yml (1)

8-8: Update to Python 3.11 approved.

sleap_roots/__init__.py (1)

32-32: Version update to "0.1.0" approved.

README.md (1)

17-17: Update to Python 3.11 in installation instructions approved.

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

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between a8d4ffa and b914b43.
Files selected for processing (2)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/ci.yml (3 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/build.yml
Additional comments not posted (5)
.github/workflows/ci.yml (5)

41-41: Updated Python version to 3.11 in the lint job setup.

Verification successful

Updated Python version to 3.11 in the lint job setup. No known incompatibilities with Python 3.11 were found in the Python files of the repository. It is recommended to perform further checks or tests to ensure full compatibility with all dependencies.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all dependencies are compatible with Python 3.11.

# Test: Check for any known incompatibilities in the dependencies.
rg --type py 'import' --exec cat {} | grep -E 'known_incompatibilities'

Length of output: 480



Script:

#!/bin/bash
# Description: Verify all dependencies are compatible with Python 3.11 by checking for any known incompatibilities.

# Find Python files and check for the string 'known_incompatibilities'
rg --type py 'import' | xargs grep -E 'known_incompatibilities'

Length of output: 28944



Script:

#!/bin/bash
# Description: Verify all dependencies are compatible with Python 3.11 by checking for any known incompatibilities.

# Directly search for the string 'known_incompatibilities' within Python files
rg --type py 'known_incompatibilities'

Length of output: 38


61-61: Updated Python version to 3.11 in the test matrix.

Verification successful

The test matrix in the CI configuration covers the following operating systems:

  • Ubuntu 22.04
  • Windows 2022

This setup should generally suffice for broad compatibility testing across different platforms. The Python version has been correctly updated to 3.11 as intended.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the test matrix covers all necessary operating systems.

# Test: Check the test matrix configuration.
cat .github/workflows/ci.yml | grep 'matrix:'

Length of output: 59



Script:

#!/bin/bash
# Description: Extract the matrix configuration details from the ci.yml file.

# Extract the matrix configuration section to check the operating systems.
sed -n '/matrix:/,/^    [^ ]/p' .github/workflows/ci.yml

Length of output: 205


94-94: Updated conditional execution for tests without coverage to check for Ubuntu OS and Python 3.11.

Verification successful

Several conditions in the GitHub Actions workflow are tailored to handle test executions differently based on the OS and Python version:

  • General tests are excluded for Ubuntu with Python 3.11.
  • Tests with coverage and coverage uploads are specifically performed for this combination.

This setup ensures that coverage-related tasks are handled appropriately for specific environments, confirming the logic behind the conditional execution as intended.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the condition's logic is correct.

# Test: Check the conditional execution logic.
cat .github/workflows/ci.yml | grep 'if:'

Length of output: 272



Script:

#!/bin/bash
# Description: Examine the context of the conditional statements in the ci.yml file.

# Extract the sections of the file around each 'if:' condition to understand their purpose.
grep -C 3 'if:' .github/workflows/ci.yml

Length of output: 696


100-100: Updated conditional execution for tests with coverage to check for Ubuntu OS and Python 3.11.


107-107: Updated conditional execution for uploading coverage to check for Ubuntu OS and Python 3.11.

Verification successful

Updated conditional execution for uploading coverage to check for Ubuntu OS and Python 3.11 is correctly implemented and serves its intended purpose without conflicts or redundancy.

  • The condition to negate the test with coverage ensures that standard tests run for configurations other than Ubuntu OS with Python 3.11.
  • Tests with coverage and subsequent uploading of coverage are specifically targeted for Ubuntu OS with Python 3.11, aligning with the workflow's requirements.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the condition's logic is correct.

# Test: Check the conditional execution logic.
cat .github/workflows/ci.yml | grep 'if:'

Length of output: 272



Script:

#!/bin/bash
# Description: Extract the full context of each conditional statement to understand their purpose.

# Extract lines around each 'if:' condition to get more context.
grep -C 3 'if:' .github/workflows/ci.yml

Length of output: 696

@eberrigan eberrigan merged commit 97c69a0 into main May 13, 2024
5 checks passed
@eberrigan eberrigan deleted the elizabeth/update-dependencies branch May 13, 2024 03:26
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