Skip to content

Conversation

@cvvergara
Copy link
Member

Fixes #2890

Changes proposed in this pull request:

  • Removes the deprecated signatures and functions of withPointsDD
  • _pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)
    • pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)
    • pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean)
  • pgTap tests: only tests the official functions of withPointsDD
  • Adjusts the migration guide, not using the removed signatures
  • Update the NEWS and release notes

@pgRouting/admins

cvvergara added 4 commits May 21, 2025 16:34
- Removing deprecated internal function _pgr_withPointsDD
- Removing deprecated C code to legacy and adjusting remaining C code
- (pgtap) Testing only valid signatures in 4.0.0
@cvvergara cvvergara added this to the Release 4.0.0 milestone May 21, 2025
@cvvergara cvvergara requested a review from robe2 May 21, 2025 22:35
@cvvergara cvvergara added withPoints Remove rm of deprecated function or internal function labels May 21, 2025
@coderabbitai
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.


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 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
Copy link
Member Author

@coderabbitai review
@coderabbitai summary

@coderabbitai
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 basic PR information
gh pr view 2891 --json title,body,state,baseRefName,headRefName,additions,deletions,changedFiles,files

# Get a list of changed files
gh pr view 2891 --json files -q '.files[].path'

# Get information about the repository
cat README.md | head -n 20

Length of output: 4643


🏁 Script executed:

#!/bin/bash
# Check the key implementation changes
cat src/driving_distance/driving_distance_withPoints.c | head -n 100

# Check the SQL files being removed 
cat sql/driving_distance/_withPointsDD.sql
cat sql/driving_distance/withPointsDD.sql | head -n 50

# Look at the issue being fixed
gh issue view 2890 --json title,body

# Check release notes and NEWS
cat NEWS.md | head -n 20
cat doc/src/release_notes.rst | tail -n 20

Length of output: 8607


🏁 Script executed:

#!/bin/bash
# Check migration guide changes to understand the replacement functionality
cat doc/src/migration.rst | grep -A 20 "pgr_withPointsDD"

# Check what's left in the withPointsDD functionality
grep -r "withPointsDD.*CREATE" sql/

# Let's look at any implementation changes in the core file
diff -U10 origin/develop...HEAD src/driving_distance/driving_distance_withPoints.c || echo "Failed to get diff, trying another approach"
git diff origin/develop...HEAD src/driving_distance/driving_distance_withPoints.c

Length of output: 3445


🏁 Script executed:

#!/bin/bash
# Check what functions remain for withPointsDD
find sql/ -type f -name "*.sql" | xargs grep -l "withPointsDD"

# Let's check the actual file content for withPointsDD functions
find sql/ -type f -name "*.sql" | xargs grep -A 20 "withPointsDD" | head -n 100

# Let's look at what changed in migration examples
cat docqueries/src/migration.pg | grep -A 20 "withpointsdd"

# Let's check the release notes and news for mentions of withPointsDD
grep -r "withPoints" NEWS.md
grep -r "withPointsDD" doc/src/release_notes.rst

Length of output: 8912


🏁 Script executed:

#!/bin/bash
# Get the core content of the remaining withPointsDD functions 
find sql -name '*.sql' | grep -v '_withPointsDD.sql\|withPointsDD.sql' | xargs grep -l "withPoints" | xargs grep -B 2 -A 2 "withPointsDD"

# Let's check the remaining files that will stay after this PR
find sql -name '*withPointsDD*' | xargs wc -l

# Check which files will contain the functionality after the PR
git status -s | grep withPointsDD

# Let's look at what's in the NEWS.md file for this PR
git diff origin/develop NEWS.md || git diff HEAD~1 NEWS.md

Length of output: 759


🏁 Script executed:

#!/bin/bash
# Let's check the specific changes in NEWS.md for this PR
cat NEWS.md | head -n 30

# Let's also check for any remaining references to withPointsDD in the source code
find src -name "*.c" -o -name "*.h" | xargs grep -l "withPointsDD" 

# Check for any new implementation files or changes in implementations
find src -name "*withPoints*" | xargs ls -la

# Check for remaining SQL function signatures after this PR
find sql -type f -not -path "*/_withPointsDD.sql" -not -path "*/withPointsDD.sql" | xargs grep -l "withPointsDD"

Length of output: 2780


@cvvergara I'll perform both the review and summary for this PR.


🏁 Script executed:

#!/bin/bash
# Let's get an overview of what still exists for withPointsDD in the repository
find . -not -path '*/\.*' -not -path '*/sql/driving_distance/_withPointsDD.sql' -not -path '*/sql/driving_distance/withPointsDD.sql' | xargs grep -l "withPointsDD" | head -n 20

# Check for any new implementations that replace the old ones
find . -name "*.sql" | xargs grep -l "withPointsDDv4" | head -n 10

Length of output: 8343


Review

I've reviewed PR #2891 which focuses on removing deprecated signatures and functions of withPointsDD. This is part of the preparation for pgRouting 4.0.0.

The PR correctly:

  • Removes the deprecated internal function _pgr_withpointsdd
  • Removes deprecated SQL function signatures that were marked as deprecated in v3.6.0
  • Updates pgTap tests to only test the official functions
  • Updates documentation (migration guide, release notes, NEWS.md)

The changes are well-structured and align with issue #2890. The removal of deprecated code (945 lines removed vs 233 added) represents proper code cleanup, which will make the codebase more maintainable.

All updates to the documentation are appropriate and clearly explain the migration path for users. The PR appears ready to merge.

Summary

This PR removes deprecated functions and signatures related to withPointsDD that were marked as deprecated in v3.6.0:

  • Removes deprecated internal function:

    • _pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)
  • Removes deprecated SQL signatures:

    • pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)
    • pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean)
  • Updates pgTap tests to focus only on the official functions

  • Updates migration guide and release notes to reflect these changes

These removals are part of the preparation for the pgRouting 4.0.0 release, where the pgr_withPointsDD functionality is being promoted to official status with standardized parameters and output columns.

@cvvergara cvvergara merged commit 849c833 into pgRouting:develop May 21, 2025
26 checks passed
@cvvergara cvvergara deleted the remove-deprecated-internal-function-_pgr_withPointsDD branch May 21, 2025 23:45
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 withPoints

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants