Skip to content

Conversation

cvvergara
Copy link
Member

Fixes #2888 .

Changes proposed in this pull request:

  • Remove deprecated signatures in v3.8.0 (with partial parameter):
    • pgr_findcloseedges(text,geometry,double precision,integer,boolean,boolean)
    • pgr_findcloseedges(text,geometry[],double precision,integer,boolean,boolean)
  • pgtap tests are done only on signatures that exist on 4.0.0
    • Removing tests done on signatures that are removed

@pgRouting/admins

@cvvergara cvvergara added this to the Release 4.0.0 milestone May 21, 2025
@cvvergara cvvergara added the Remove rm of deprecated function or internal function label May 21, 2025
Copy link
Contributor

coderabbitai bot commented May 21, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. 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.

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch remove-deprecated-signatures-of-pgr_findCloseEdges
  • Post Copyable Unit Tests in Comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this 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.

@cvvergara cvvergara requested a review from robe2 May 21, 2025 15:33
@cvvergara
Copy link
Member Author

@coderabbitai review
@coderabbitai summary

Copy link
Contributor

coderabbitai bot commented May 21, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get PR information
gh pr view 2889 --json title,body,baseRefName,headRefName,state

# Get list of files changed
gh pr view 2889 --json files

# Get repository description to understand the project
gh repo view pgRouting/pgrouting --json description

Length of output: 1811


🏁 Script executed:

#!/bin/bash
# Look at the main SQL file being changed to see what's being removed
cat sql/utilities/findCloseEdges.sql

# Check the updated signature file to see what remains
cat sql/sigs/pgrouting--4.0.sig

# Look at the documentation changes in NEWS.md
cat NEWS.md

# Check the release notes being updated
cat doc/src/release_notes.rst

# Examine one of the test files to see how tests are being adjusted
cat pgtap/utilities/findCloseEdges/edge_cases.pg

Length of output: 90057


🏁 Script executed:

#!/bin/bash
# Let's look at how the deprecated functions are being removed

# Check the changes in the release notes for this specific issue/removal
grep -A5 "#2888" NEWS.md

# Look at the removed signatures from the signatures file
grep -n "pgr_findclose" sql/sigs/pgrouting--4.0.sig

# Check if there's a specific comment or notice about the deprecation in the test files
grep -n "deprecated" pgtap/utilities/findCloseEdges/edge_cases.pg

# Check what was removed from the test file
diff -u <(git show HEAD:pgtap/utilities/findCloseEdges/edge_cases.pg) pgtap/utilities/findCloseEdges/edge_cases.pg

Length of output: 706


🏁 Script executed:

#!/bin/bash
# Get more information about what was changed

# Look at the current edge_cases.pg test file
cat pgtap/utilities/findCloseEdges/edge_cases.pg

# Try to get the git diff for the specific file
git show HEAD:pgtap/utilities/findCloseEdges/edge_cases.pg > edge_cases_old.pg
cat edge_cases_old.pg

# Check what other files were modified in this PR
git diff --name-status HEAD~1 | grep -i findcloseedges

Length of output: 8779


🏁 Script executed:

#!/bin/bash
# Check for added, deleted, or modified files related to findCloseEdges
git status | grep -i findcloseedges

# Let's examine the PR directly
gh pr view 2889 --json files > pr_files.json
cat pr_files.json

# Look at specific test files to understand changes
cat pgtap/utilities/findCloseEdges/inner_query.pg
cat pgtap/utilities/findCloseEdges/no_crash_test.pg
cat pgtap/utilities/findCloseEdges/types_check.pg

# Let's check for any references to the partial parameter that was mentioned in the PR description
grep -r "partial" pgtap/utilities/findCloseEdges/

Length of output: 7460


🏁 Script executed:

#!/bin/bash
# Get more information about the deleted code from the git history

# Get the specific SQL changes to see what was removed
git show -- sql/utilities/findCloseEdges.sql

# Check for any deprecated notices or warning messages
grep -r "deprecated" --include="*.sql" sql/utilities/

# Look at the PR description for more context
gh pr view 2889 --json body

Length of output: 5510


@cvvergara I've reviewed your pull request #2889 (Remove deprecated signatures of pgr_findCloseEdges) and it looks good. The PR successfully removes the deprecated signatures for pgr_findCloseEdges that included the "partial" parameter:

  • pgr_findcloseedges(text,geometry,double precision,integer,boolean,boolean)
  • pgr_findcloseedges(text,geometry[],double precision,integer,boolean,boolean)

The test files have been appropriately updated to only test the valid signatures that remain in 4.0.0, and unnecessary code has been removed from the SQL files. This change is properly documented in the release notes, which mentions this as part of the cleanup for the 4.0.0 release.

This is a good step toward cleaning up the codebase by removing deprecated functionality, in line with the overall goals for pgRouting 4.0.0. The change is properly implemented and ready for review.


🏁 Script executed:

#!/bin/bash
# Generate the PR summary
gh pr view 2889 --json url,title,state,body,author

# Get a summary of the changes
echo "Files changed:"
gh pr view 2889 --json files | jq '.files | length'

echo "Total lines added:"
gh pr view 2889 --json files | jq '[.files[].additions] | add'

echo "Total lines removed:"
gh pr view 2889 --json files | jq '[.files[].deletions] | add'

Length of output: 1078


@cvvergara I've completed a review of PR #2889. Here's a summary of the changes:

PR Summary

  • Title: Remove deprecated signatures of pgr_findCloseEdges
  • Changes: 12 files changed, 72 lines added, 205 lines removed
  • The PR removes two deprecated function signatures from v3.8.0 that included the "partial" parameter:
    • pgr_findcloseedges(text,geometry,double precision,integer,boolean,boolean)
    • pgr_findcloseedges(text,geometry[],double precision,integer,boolean,boolean)
  • Test files have been updated to only test the signatures that remain in v4.0.0
  • Documentation and release notes have been updated to reflect these changes

Analysis

The PR successfully implements the removal of deprecated signatures as intended. The test adjustments are appropriate, and the documentation updates properly explain the changes. This fits well with the broader 4.0.0 release objective of cleaning up deprecated functionality.

The changes are well-structured and properly documented in the release notes as a breaking change for 4.0.0. This is an appropriate time to remove these deprecated signatures as part of a major version update.

@cvvergara cvvergara merged commit 449a29e into pgRouting:develop May 21, 2025
26 checks passed
@cvvergara cvvergara deleted the remove-deprecated-signatures-of-pgr_findCloseEdges branch May 21, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Remove rm of deprecated function or internal function
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants