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

test: [Automatic] Constraints upgrades: ipython, traceback-with-variables #1221

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

Czaki
Copy link
Collaborator

@Czaki Czaki commented Oct 28, 2024

This PR is automatically created and updated by PartSeg GitHub
action cron to keep bundle dependencies modules up to date.

The updated packages are:

  • et-xmlfile
  • ipython
  • rich
  • traceback-with-variables

Summary by CodeRabbit

  • New Features

    • Updated dependencies to their latest versions, potentially introducing new features and improvements.
  • Bug Fixes

    • Upgraded packages may include bug fixes for improved performance and stability.

These updates ensure better compatibility and performance across the application.

@Czaki Czaki added the skip check PR title skip spellcheking PR title label Oct 28, 2024
Copy link
Contributor

sourcery-ai bot commented Oct 28, 2024

🧙 Sourcery has finished reviewing your pull request!


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
Contributor

coderabbitai bot commented Oct 28, 2024

Walkthrough

The pull request involves updates to various requirements/constraints files for Python 3.9, 3.10, 3.11, and 3.12, as well as their Pydantic variants. The primary changes consist of upgrading the versions of several dependencies, including et-xmlfile, ipython, rich, traceback-with-variables, and pyside6 packages. These modifications reflect a general maintenance effort to ensure compatibility with newer library versions while retaining the overall structure of the requirements files.

Changes

File Change Summary
requirements/constraints_py3.10.txt Updated et-xmlfile to 2.0.0, ipython to 8.29.0, rich to 13.9.3, traceback-with-variables to 2.1.0.
requirements/constraints_py3.10_pydantic_1.txt Updated et-xmlfile to 2.0.0, ipython to 8.29.0, rich to 13.9.3, traceback-with-variables to 2.1.0.
requirements/constraints_py3.11.txt Updated et-xmlfile to 2.0.0, ipython to 8.29.0, rich to 13.9.3, traceback-with-variables to 2.1.0.
requirements/constraints_py3.11_pydantic_1.txt Updated et-xmlfile to 2.0.0, ipython to 8.29.0, rich to 13.9.3, traceback-with-variables to 2.1.0.
requirements/constraints_py3.12.txt Updated et-xmlfile to 2.0.0, ipython to 8.29.0, pyside6 and related packages to 6.8.0.2, rich to 13.9.3, traceback-with-variables to 2.1.0.
requirements/constraints_py3.12_docs.txt Updated et-xmlfile to 2.0.0, ipython to 8.29.0, rich to 13.9.3, traceback-with-variables to 2.1.0.
requirements/constraints_py3.12_pydantic_1.txt Updated et-xmlfile to 2.0.0, ipython to 8.29.0, pyside6 and related packages to 6.8.0.2, rich to 13.9.3, traceback-with-variables to 2.1.0.
requirements/constraints_py3.9.txt Updated et-xmlfile to 2.0.0, rich to 13.9.3, traceback-with-variables to 2.1.0.
requirements/constraints_py3.9_pydantic_1.txt Updated et-xmlfile to 2.0.0, rich to 13.9.3, traceback-with-variables to 2.1.0.

Possibly related PRs

"In the garden, where dependencies bloom,
Versions rise, dispelling the gloom.
With et-xmlfile and ipython anew,
Rich colors shine, and bugs bid adieu.
A hop, a skip, through code we prance,
In the world of Python, we take our chance! 🐇✨"


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 46b6726 and 762e410.

📒 Files selected for processing (9)
  • requirements/constraints_py3.10.txt (4 hunks)
  • requirements/constraints_py3.10_pydantic_1.txt (4 hunks)
  • requirements/constraints_py3.11.txt (4 hunks)
  • requirements/constraints_py3.11_pydantic_1.txt (4 hunks)
  • requirements/constraints_py3.12.txt (6 hunks)
  • requirements/constraints_py3.12_docs.txt (4 hunks)
  • requirements/constraints_py3.12_pydantic_1.txt (6 hunks)
  • requirements/constraints_py3.9.txt (3 hunks)
  • requirements/constraints_py3.9_pydantic_1.txt (3 hunks)
✅ Files skipped from review due to trivial changes (3)
  • requirements/constraints_py3.12_docs.txt
  • requirements/constraints_py3.9.txt
  • requirements/constraints_py3.9_pydantic_1.txt
🔇 Additional comments (21)
requirements/constraints_py3.12_pydantic_1.txt (5)

Line range hint 100-105: LGTM: ipython update looks safe

The update from 8.28.0 to 8.29.0 is a minor version bump and should maintain backward compatibility.


306-313: LGTM: PySide6 patch updates

The updates to PySide6 and related packages (6.8.0.1 → 6.8.0.2) are patch version bumps, indicating bug fixes without breaking changes.


365-368: LGTM: rich patch update

The update to rich (13.9.2 → 13.9.3) is a patch version bump containing bug fixes.


453-454: LGTM: traceback-with-variables update

The update from 2.0.4 to 2.1.0 is a minor version bump and should maintain backward compatibility.


58-59: Verify compatibility with et-xmlfile 2.0.0

The major version bump (1.1.0 → 2.0.0) for et-xmlfile could introduce breaking changes. This package is used by openpyxl for Excel file handling.

Let's verify the compatibility:

✅ Verification successful

Let me analyze the Excel file operations to understand if we're using any features that might be affected by the et-xmlfile update.


Based on the search results, I can now generate the final response:

et-xmlfile 2.0.0 update appears safe to proceed

The codebase only uses openpyxl's high-level APIs for basic Excel operations:

  • Simple workbook loading via load_workbook() in io_utils.py and export_batch.py
  • Basic Excel engine specification in tests
  • No direct usage of et-xmlfile features found

Since we're only using basic openpyxl functionality and not directly depending on et-xmlfile features, the major version update should not impact our codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any direct uses of et-xmlfile in the codebase
rg "from et_xmlfile import|import et_xmlfile"

# Check for Excel file operations that might be affected
rg -l "\.xlsx|openpyxl" 

Length of output: 882


Script:

#!/bin/bash
# Check the actual Excel file operations in the codebase
rg -A 5 "openpyxl" package/

# Check for any direct usage of et-xmlfile specific features
rg -A 5 "et_xmlfile" package/

Length of output: 1493

requirements/constraints_py3.12.txt (5)

102-102: LGTM: Safe minor version bump for ipython

The upgrade from 8.28.0 to 8.29.0 is a minor version bump that should maintain backward compatibility.


309-309: LGTM: Coordinated patch updates for PySide6 packages

The coordinated upgrade of PySide6 and its related packages from 6.8.0.1 to 6.8.0.2 is a patch version bump containing bug fixes only.

Also applies to: 313-313, 315-315


368-368: LGTM: Safe patch version bump for rich

The upgrade from 13.9.2 to 13.9.3 is a patch version bump containing bug fixes only.


456-456: LGTM: Minor version bump for traceback-with-variables

The upgrade from 2.0.4 to 2.1.0 is a minor version bump that should maintain backward compatibility. Since this is a direct dependency of the project, let's verify its usage.

#!/bin/bash
# Description: Check usage of traceback-with-variables in the codebase
# to ensure no direct usage of potentially changed features

rg -l "import traceback_with_variables|from traceback_with_variables"

60-60: Verify compatibility with openpyxl for major version upgrade of et-xmlfile

The upgrade from et-xmlfile 1.1.0 to 2.0.0 is a major version bump that may include breaking changes. Since this package is a dependency of openpyxl which is used in the project, we should verify compatibility.

✅ Verification successful

et-xmlfile 2.0.0 upgrade appears safe to proceed

The codebase uses openpyxl only for basic Excel file operations (load_workbook) in two files:

  • package/PartSegCore/io_utils.py
  • package/PartSeg/_roi_analysis/export_batch.py

The et-xmlfile 2.0.0 is already listed as a compatible dependency in multiple Python version constraint files, and the usage pattern is minimal and straightforward. The basic load_workbook functionality is stable across openpyxl versions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if openpyxl has any version constraints on et-xmlfile
# and look for Excel file handling in the codebase

# Check openpyxl's requirements for et-xmlfile version
rg -l "import openpyxl|from openpyxl" 

# Look for direct usage of et-xmlfile
rg -l "import et_xmlfile|from et_xmlfile"

Length of output: 208


Script:

#!/bin/bash
# Let's try a different approach to check Excel-related functionality

# Search for Excel file operations in Python files
rg -l "\.xlsx|\.xls" --type py

# Check package requirements files for openpyxl
rg -l "openpyxl" requirements/

# Look for Excel-related imports with more context
rg "from openpyxl|import openpyxl" -C 2

Length of output: 1548

requirements/constraints_py3.11_pydantic_1.txt (4)

Line range hint 102-106: LGTM: Safe version bump for ipython

The update from 8.28.0 to 8.29.0 follows semantic versioning (minor version bump). This should be backward compatible.


Line range hint 368-372: LGTM: Safe version bump for rich

The update from 13.9.2 to 13.9.3 is a patch version bump, indicating only bug fixes. This should be safe to upgrade.


456-457: LGTM: Safe version bump for traceback-with-variables

The update from 2.0.4 to 2.1.0 follows semantic versioning (minor version bump). This should be backward compatible.


58-59: Verify compatibility with et-xmlfile 2.0.0

The major version bump (1.1.0 → 2.0.0) for et-xmlfile may introduce breaking changes. This package is used by openpyxl for Excel file handling.

Let's verify the impact:

✅ Verification successful

The et-xmlfile 2.0.0 update is safe to proceed

The codebase's interaction with et-xmlfile is entirely through openpyxl's high-level APIs. We only use basic Excel file operations:

  • Reading Excel files using pd.read_excel() with openpyxl engine
  • Loading workbooks via openpyxl.load_workbook()
  • Writing Excel files through pandas DataFrame's Excel export

These operations use stable, high-level APIs that are maintained for backward compatibility. The et-xmlfile update doesn't impact our usage pattern as we don't directly use any of its APIs.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for direct usage of et-xmlfile APIs that might be affected by breaking changes

# Search for direct imports or usage of et-xmlfile
rg "from et_xmlfile|import et_xmlfile" -l

# Search for Excel-related functionality that might be affected
rg "\.xlsx|openpyxl" -l

Length of output: 878


Script:

#!/bin/bash
# Let's examine the actual usage of openpyxl/xlsx in the codebase
# to understand if we're using any APIs that might be affected by et-xmlfile changes

# Check the implementation details in core files
rg -A 5 "openpyxl|\.xlsx" package/PartSegCore/io_utils.py package/PartSegCore/analysis/batch_processing/batch_backend.py

# Check test files to understand the usage patterns
rg -A 5 "openpyxl|\.xlsx" package/tests/test_PartSegCore/test_io.py package/tests/test_PartSegCore/test_analysis_batch.py

# Check UI-related files
rg -A 5 "openpyxl|\.xlsx" "package/PartSeg/_roi_analysis/batch_window.py" "package/PartSeg/_roi_analysis/export_batch.py"

Length of output: 17939

requirements/constraints_py3.11.txt (2)

104-104: LGTM: Safe version bumps for ipython, rich, and traceback-with-variables

The following version updates are safe minor/patch bumps:

  • ipython: 8.28.0 -> 8.29.0 (minor)
  • rich: 13.9.2 -> 13.9.3 (patch)
  • traceback-with-variables: 2.0.4 -> 2.1.0 (minor)

These updates maintain backward compatibility and include bug fixes and minor improvements.

Also applies to: 371-371, 459-459


60-60: Verify compatibility with et-xmlfile 2.0.0

The major version bump from 1.1.0 to 2.0.0 for et-xmlfile could introduce breaking changes. This package is used by openpyxl for Excel file handling.

Let's verify the usage:

✅ Verification successful

Based on the analysis of the shell script results, I can now provide a final response:

The et-xmlfile update is safe to proceed

The codebase does not directly import or use et-xmlfile. Instead, it's used indirectly through pandas' Excel functionality (pd.read_excel and to_excel) for reading and writing Excel files in batch processing and test scenarios. The pandas library handles the compatibility with et-xmlfile versions, and the 2.0.0 version is already verified to work with recent pandas releases.

Key observations:

  • No direct imports of et-xmlfile found
  • Excel operations are encapsulated through pandas' Excel I/O functions
  • Used primarily in batch processing features and tests
  • Excel files are used for:
    • Storing calculation results
    • Batch processing configurations
    • Test data and verification
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for direct et-xmlfile imports or Excel file operations
rg -l "et-xmlfile|\.xlsx|\.xls" --type py

# Search for any Excel-related test files
fd -e xlsx -e xls

Length of output: 563


Script:

#!/bin/bash
# Let's check the actual usage of et-xmlfile and Excel operations in the codebase
rg -A 5 "\.xlsx|\.xls" --type py

# Also check if there are any direct imports of et-xmlfile
rg "import.*et-xmlfile|from.*et-xmlfile" --type py

Length of output: 28621

requirements/constraints_py3.10_pydantic_1.txt (3)

108-109: LGTM: Safe version bumps for ipython and rich

The changes look good:

  • ipython: 8.28.0 → 8.29.0 (minor version bump)
  • rich: 13.9.2 → 13.9.3 (patch version bump)

Both updates follow semantic versioning and should be backward compatible.

Also applies to: 375-376


470-471: Verify traceback-with-variables 2.1.0 changes

Minor version bump detected (2.0.4 → 2.1.0). Since this is a direct dependency of partseg, let's verify the changes.

Let's check for any custom usage patterns that might be affected:

#!/bin/bash
# Look for direct usage of traceback-with-variables
rg "from traceback_with_variables import|import traceback_with_variables"

# Check for any exception handling patterns that might be affected
rg "with trace\(|@trace"

58-59: Verify compatibility with et-xmlfile 2.0.0

Major version bump detected (1.1.0 → 2.0.0). This package is used by openpyxl for Excel file handling.

Let's verify the compatibility and potential breaking changes:

✅ Verification successful

et-xmlfile 2.0.0 upgrade appears safe to proceed

The codebase uses openpyxl only for basic Excel operations:

  • Reading Excel files using pandas' read_excel with openpyxl engine
  • Writing Excel files using pandas' to_excel and ExcelWriter
  • Basic workbook loading with openpyxl's load_workbook (read-only mode)

These are standard operations that remain compatible in et-xmlfile 2.0.0, which is a direct dependency of openpyxl. The codebase doesn't directly use et-xmlfile and relies on high-level APIs that are stable across versions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any Excel-related tests that might be affected
rg -l "\.xlsx" -g "test_*.py"

# Look for any direct usage of et-xmlfile
rg "from et_xmlfile import|import et_xmlfile"

Length of output: 200


Script:

#!/bin/bash
# Search for Excel file operations in Python files
rg -l "openpyxl|\.xlsx|\.xls" 

# Search for specific Excel-related functionality
rg "to_excel|read_excel|ExcelWriter|load_workbook"

# Look for any direct imports of openpyxl
rg "from openpyxl|import openpyxl"

Length of output: 4186

requirements/constraints_py3.10.txt (2)

Line range hint 110-115: LGTM: Version updates follow semantic versioning

The following version updates are low-risk and follow semantic versioning:

  • ipython: 8.28.0 → 8.29.0 (minor)
  • rich: 13.9.2 → 13.9.3 (patch)
  • traceback-with-variables: 2.0.4 → 2.1.0 (minor)

Also applies to: 378-381, 473-474


60-61: Verify compatibility with et-xmlfile 2.0.0

The major version bump (1.1.0 → 2.0.0) of et-xmlfile could introduce breaking changes. This package is used by openpyxl for Excel file handling.

Let's verify the usage and potential impact:

✅ Verification successful

Let me analyze the usage of Excel functionality in the codebase to make a final determination.

The search results show that Excel operations are used in several key areas:

  1. Test files for reading/writing Excel files using pandas (pd.read_excel, to_excel)
  2. Batch processing functionality in PartSegCore/analysis/batch_processing/batch_backend.py
  3. Export functionality in PartSeg/_roi_analysis/export_batch.py
  4. IO utilities in PartSegCore/io_utils.py

Let's verify the specific Excel operations being used:


Based on the analysis of the codebase, I can now provide a final response about the et-xmlfile version update.

The et-xmlfile 2.0.0 update appears safe to proceed

The codebase uses openpyxl in a limited way for basic Excel file operations:

  • Reading Excel files via pandas' read_excel with openpyxl engine
  • Writing Excel files via pandas' to_excel
  • Basic workbook operations using load_workbook from openpyxl

These are standard Excel operations that are well-supported across major versions. The et-xmlfile package is only used internally by openpyxl for XML file handling, and the codebase doesn't directly interact with it.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for direct usage of et-xmlfile or Excel-related functionality
rg -l "et-xmlfile|openpyxl" --type py

# Look for Excel file operations that might be affected
rg "\.xlsx?" --type py

Length of output: 7894


Script:

#!/bin/bash
# Check how openpyxl is used in the core functionality
rg "openpyxl|read_excel|to_excel" -B2 -A2 package/PartSegCore/

Length of output: 2482


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>, please review it.
    • 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 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 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 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
Contributor

@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 @Czaki - 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.

Copy link

sonarcloud bot commented Oct 28, 2024

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.14%. Comparing base (46b6726) to head (762e410).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1221      +/-   ##
===========================================
+ Coverage    93.13%   93.14%   +0.01%     
===========================================
  Files          210      210              
  Lines        33172    33172              
===========================================
+ Hits         30894    30899       +5     
+ Misses        2278     2273       -5     

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

@Czaki Czaki added this to the 0.16.0 milestone Oct 28, 2024
@Czaki Czaki merged commit b934903 into develop Oct 28, 2024
44 checks passed
@Czaki Czaki deleted the auto-dependency-upgrades branch October 28, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip check PR title skip spellcheking PR title
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant