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

[pre-commit.ci] pre-commit autoupdate #253

Merged
merged 1 commit into from
Oct 7, 2024
Merged

Conversation

pre-commit-ci[bot]
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Oct 7, 2024

updates:

Summary by Sourcery

Update pre-commit configuration to use the latest versions of pre-commit-hooks and ruff-pre-commit.

Build:

  • Update pre-commit hook for pre-commit-hooks from v4.6.0 to v5.0.0.
  • Update pre-commit hook for ruff-pre-commit from v0.6.8 to v0.6.9.

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.6.8 → v0.6.9](astral-sh/ruff-pre-commit@v0.6.8...v0.6.9)
Copy link

Review changes with SemanticDiff.

Copy link

coderabbitai bot commented Oct 7, 2024

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 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 bot commented Oct 7, 2024

Reviewer's Guide by Sourcery

This pull request updates two pre-commit hooks to their latest versions. The changes are automated updates to the .pre-commit-config.yaml file, which manages the project's pre-commit configuration.

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

File-Level Changes

Change Details Files
Update pre-commit-hooks to v5.0.0
  • Bump pre-commit-hooks version from v4.6.0 to v5.0.0
.pre-commit-config.yaml
Update ruff-pre-commit to v0.6.9
  • Bump ruff-pre-commit version from v0.6.8 to v0.6.9
.pre-commit-config.yaml

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

what-the-diff bot commented Oct 7, 2024

PR Summary

  • Upgraded the pre-commit-hooks repository
    This update moves the pre-commit-hooks repository from version 4.6.0 to the newer version 5.0.0. This can enhance the functionality of our coding and could potentially bring improved features that increase our development efficiency.

  • Updated the ruff-pre-commit repository
    The ruff-pre-commit repository has been upgraded from version 0.6.8 to version 0.6.9. This could mean small but useful improvements in the quality of our code validations while committing changes.

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.

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, pre-commit-ci[bot]!). We assume it knows what it's doing!

Copy link

github-actions bot commented Oct 7, 2024

Failed to generate code suggestions for PR

Copy link

github-actions bot commented Oct 7, 2024

Preparing review...

Copy link

CI Failure Feedback 🧐

Action: hypothesis-tests (3.12)

Failed stage: Test with pytest including hypothesis tests [❌]

Failed test name: test_fuzz_convex_hull

Failure summary:

The action failed because the test test_fuzz_convex_hull in the file
tests/hypothesis/test_functions.py failed. The failure occurred due to an assertion error:

  • The test expected the signed area of the convex hull to be greater than or equal to 0.
  • However, the signed area calculated was -0.25, which does not meet the expected condition.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    212:  tests/test_geometrycollection.py ............................x           [ 57%]
    213:  tests/test_line.py .................................                     [ 64%]
    214:  tests/test_linear_ring.py ...........................                    [ 71%]
    215:  tests/test_multiline.py .....................                            [ 75%]
    216:  tests/test_multipoint.py .....................                           [ 80%]
    217:  tests/test_multipolygon.py ..................                            [ 85%]
    218:  tests/test_point.py ..................................                   [ 93%]
    219:  tests/test_polygon.py ..............................                     [100%]
    220:  =================================== FAILURES ===================================
    ...
    
    259:  ),
    260:  )
    261:  def test_fuzz_convex_hull(points: typing.List[typing.Tuple[float, float]]) -> None:
    262:  hull = pygeoif.functions.convex_hull(points=points)
    263:  for coord in hull:
    264:  assert coord in points
    265:  assert len(hull) <= len(points) + 1
    266:  >       assert pygeoif.functions.signed_area(hull) >= 0
    267:  E       AssertionError: assert -0.25 >= 0
    268:  E        +  where -0.25 = <function signed_area at 0x7faa19adbe20>(((0.5, 9007200328482816.0), (1.0, 0.0), (1.0, 1.0), (0.5, 9007200328482816.0)))
    269:  E        +    where <function signed_area at 0x7faa19adbe20> = <module 'pygeoif.functions' from '/home/runner/work/pygeoif/pygeoif/pygeoif/functions.py'>.signed_area
    270:  E        +      where <module 'pygeoif.functions' from '/home/runner/work/pygeoif/pygeoif/pygeoif/functions.py'> = pygeoif.functions
    271:  E       Falsifying example: test_fuzz_convex_hull(
    272:  E           points=[(1.0, 0.0), (1.0, 1.0), (0.5, 9007200328482816.0)],
    273:  E       )
    274:  E       
    275:  E       You can reproduce this example by temporarily adding @reproduce_failure('6.112.4', b'AXicY2SAA0YGrGxkJoh9AEmZAhgxMQAAEe8BCQ==') as a decorator on your test case
    276:  tests/hypothesis/test_functions.py:222: AssertionError
    277:  =============================== warnings summary ===============================
    278:  tests/hypothesis/test_line.py::test_max_points_lt_2
    279:  /home/runner/work/pygeoif/pygeoif/tests/hypothesis/test_line.py:17: NonInteractiveExampleWarning: The `.example()` method is good for exploring strategies, but should only be used interactively.  We recommend using `@given` for tests - it performs better, saves and replays failures to avoid flakiness, and reports minimal examples. (strategy: line_strings(max_points=1))
    ...
    
    289:  assert line.convex_hull == force_3d(line).convex_hull
    290:  tests/hypothesis/test_line.py: 36 warnings
    291:  /home/runner/work/pygeoif/pygeoif/tests/hypothesis/test_line.py:55: UserWarning: The convex Hull will only return the projection to 2 dimensions xy coordinates
    292:  assert line.convex_hull
    293:  tests/hypothesis/test_line.py: 36 warnings
    294:  /home/runner/work/pygeoif/pygeoif/tests/hypothesis/test_line.py:56: UserWarning: The convex Hull will only return the projection to 2 dimensions xy coordinates
    295:  assert line.convex_hull.bounds == line.bounds
    296:  tests/hypothesis/test_linear_ring.py::test_max_points_lt_3
    297:  /home/runner/work/pygeoif/pygeoif/tests/hypothesis/test_linear_ring.py:15: NonInteractiveExampleWarning: The `.example()` method is good for exploring strategies, but should only be used interactively.  We recommend using `@given` for tests - it performs better, saves and replays failures to avoid flakiness, and reports minimal examples. (strategy: linear_rings(max_points=3))
    ...
    
    334:  assert multi_poly.convex_hull.bounds == multi_poly.bounds
    335:  tests/hypothesis/test_point.py: 53 warnings
    336:  /home/runner/work/pygeoif/pygeoif/tests/hypothesis/test_point.py:40: UserWarning: The convex Hull will only return the projection to 2 dimensions xy coordinates
    337:  assert point.convex_hull == force_2d(point)
    338:  tests/hypothesis/test_point.py: 53 warnings
    339:  /home/runner/work/pygeoif/pygeoif/tests/hypothesis/test_point.py:41: UserWarning: The convex Hull will only return the projection to 2 dimensions xy coordinates
    340:  assert point.convex_hull.bounds == point.bounds
    341:  tests/hypothesis/test_polygon.py::test_max_points_lt_3
    342:  /home/runner/work/pygeoif/pygeoif/tests/hypothesis/test_polygon.py:16: NonInteractiveExampleWarning: The `.example()` method is good for exploring strategies, but should only be used interactively.  We recommend using `@given` for tests - it performs better, saves and replays failures to avoid flakiness, and reports minimal examples. (strategy: polygons(max_points=3))
    ...
    
    389:  tests/test_polygon.py::test_convex_hull_3d
    390:  /home/runner/work/pygeoif/pygeoif/tests/test_polygon.py:226: UserWarning: The convex Hull will only return the projection to 2 dimensions xy coordinates
    391:  assert polygon.convex_hull == geometry.LineString([(0, 0), (2, 2)])
    392:  tests/test_polygon.py::test_convex_hull_3d_collapsed_to_point
    393:  /home/runner/work/pygeoif/pygeoif/tests/test_polygon.py:232: UserWarning: The convex Hull will only return the projection to 2 dimensions xy coordinates
    394:  assert polygon.convex_hull == geometry.Point(0, 0)
    395:  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    396:  =========================== short test summary info ============================
    397:  FAILED tests/hypothesis/test_functions.py::test_fuzz_convex_hull - AssertionError: assert -0.25 >= 0
    398:  +  where -0.25 = <function signed_area at 0x7faa19adbe20>(((0.5, 9007200328482816.0), (1.0, 0.0), (1.0, 1.0), (0.5, 9007200328482816.0)))
    399:  +    where <function signed_area at 0x7faa19adbe20> = <module 'pygeoif.functions' from '/home/runner/work/pygeoif/pygeoif/pygeoif/functions.py'>.signed_area
    400:  +      where <module 'pygeoif.functions' from '/home/runner/work/pygeoif/pygeoif/pygeoif/functions.py'> = pygeoif.functions
    401:  Falsifying example: test_fuzz_convex_hull(
    402:  points=[(1.0, 0.0), (1.0, 1.0), (0.5, 9007200328482816.0)],
    403:  )
    404:  You can reproduce this example by temporarily adding @reproduce_failure('6.112.4', b'AXicY2SAA0YGrGxkJoh9AEmZAhgxMQAAEe8BCQ==') as a decorator on your test case
    405:  ===== 1 failed, 427 passed, 1 xfailed, 1125 warnings in 116.68s (0:01:56) ======
    406:  ##[error]Process completed with exit code 1.
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    @cleder cleder merged commit 7984170 into develop Oct 7, 2024
    38 of 39 checks passed
    @cleder cleder deleted the pre-commit-ci-update-config branch October 7, 2024 18:20
    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