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

Boost version #2013

Merged
merged 4 commits into from
Oct 23, 2024
Merged

Boost version #2013

merged 4 commits into from
Oct 23, 2024

Conversation

ternaus
Copy link
Collaborator

@ternaus ternaus commented Oct 23, 2024

Summary by Sourcery

Update CI configuration to streamline dependency installation and version management. Remove version file and refactor version handling to use direct imports. Simplify and consolidate dependency installation steps in the CI workflow.

Enhancements:

  • Remove version retrieval logic from setup.py and refactor to use direct imports for versioning.

CI:

  • Update CI workflow to ignore all markdown files and remove specific path exclusions.

Copy link
Contributor

sourcery-ai bot commented Oct 23, 2024

Reviewer's Guide by Sourcery

This PR updates the CI workflow and dependency management system. The main changes include switching to uv for package management, streamlining the CI workflow, updating dependencies, and simplifying version management by removing the separate version file.

Architecture diagram for updated CI workflow

graph TD;
    A[CI Workflow] -->|uses| B[actions/cache@v4];
    A -->|uses| C[codecov/[email protected]];
    A -->|uses| D[actions/setup-python@v5];
    B -->|caches| E[uv dependencies];
    C -->|uploads| F[Coverage Reports];
    D -->|sets up| G[Python Environment];
Loading

Updated class diagram for setup.py

classDiagram
    class Setup {
        -list~str~ INSTALL_REQUIRES
        -list~tuple~ CHOOSE_INSTALL_REQUIRES
        +list~str~ get_install_requirements(list~str~ install_requires, list~tuple~ choose_install_requires)
        +str choose_requirement(tuple~str~ mains, str secondary)
    }
    note for Setup "Removed get_version method and version attribute"
Loading

Updated class diagram for version management

classDiagram
    class CheckVersion {
        -str current_version
    }
    class Serialization {
        -str __version__
    }
    note for CheckVersion "Updated import for current_version"
    note for Serialization "Updated import for __version__"
Loading

File-Level Changes

Change Details Files
Streamlined CI workflow configuration
  • Simplified path ignore patterns by using '**.md' wildcard
  • Updated cache key prefix from 'pip' to 'uv'
  • Consolidated PyTorch installation steps using bash conditionals
  • Added XML coverage report generation
  • Updated Python version for coverage upload from 3.10 to 3.12
  • Consolidated dependency installation steps
.github/workflows/ci.yml
Updated dependency management and version handling
  • Upgraded albucore dependency from 0.0.18 to 0.0.19
  • Removed get_version() function and separate version file
  • Updated type hints to use built-in types instead of typing module
  • Added trailing comma for better git diff handling
setup.py
albumentations/_version.py
albumentations/check_version.py
albumentations/core/serialization.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

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 @ternaus - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The version handling code has been removed from setup.py and _version.py, but the new location of version definition isn't shown in the diff. Please clarify where and how the version is now being managed.
  • The codecov.yaml validation check was removed from the CI workflow. Was this intentional, and if so, what's the reasoning behind removing this validation step?
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

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.

Project coverage is 90.32%. Comparing base (b1a79c2) to head (8ea89b5).
Report is 225 commits behind head on main.

Files with missing lines Patch % Lines
albumentations/__init__.py 60.00% 4 Missing ⚠️
setup.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           main    #2013       +/-   ##
=========================================
+ Coverage      0   90.32%   +90.32%     
=========================================
  Files         0       47       +47     
  Lines         0     7558     +7558     
=========================================
+ Hits          0     6827     +6827     
- Misses        0      731      +731     

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

@ternaus ternaus merged commit 13a510d into main Oct 23, 2024
16 checks passed
@ternaus ternaus deleted the boost_version branch October 23, 2024 20:08
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