Skip to content

Conversation

cvvergara
Copy link
Member

Fixes #2755

Removes:

  • SQL files
  • pgtap files, not testing a deprecated function
  • docqueries files
  • documentation files

@pgRouting/admins

@cvvergara cvvergara added Topology Remove rm of deprecated function or internal function labels Apr 9, 2025
@cvvergara cvvergara added this to the Release 4.0.0 milestone Apr 9, 2025
Copy link
Contributor

coderabbitai bot commented Apr 9, 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.


🪧 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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

Copy link
Contributor

coderabbitai bot commented Apr 9, 2025

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get PR details
gh pr view 2839 --json title,body,baseRefName,headRefName,changedFiles

# Get a list of changed files and their changes
gh pr view 2839 --json files --jq '.files[] | {path: .path, additions: .additions, deletions: .deletions}'

# Get the actual diff to analyze the changes
gh pr diff 2839

Length of output: 72661


🏁 Script executed:

#!/bin/bash
# Get more information about issue #2755 that this PR is fixing
gh issue view 2755 --json title,body,state,author,labels

# Get more information about the pgr_analyzeOneWay function to understand the context
git grep -A 10 -B 10 "pgr_analyzeOneWay" -- '*.cpp' '*.hpp' 

# Check commit messages to understand the reasoning for this change
git log --format="%s" HEAD~10..HEAD | grep -i "analyzeOneWay"

# Find what replaced this deprecated function (if any)
git grep "analyzeOneWay.*deprecated" -- '*.md' '*.rst'

Length of output: 631


🏁 Script executed:

#!/bin/bash
# Get additional information about the PR
gh pr view 2839 --json title,baseRefName,headRefName,state,author,createdAt,mergeable,isDraft,additions,deletions,labels

# Find information about when pgr_analyzeOneWay was deprecated
git grep -A 5 -B 5 "pgr_analyzeOneWay.*deprecated" -- '*.sql' 

# Check if any replacement function exists
git grep -l "analyzeOneWay" -- 'src/' 'sql/' 'include/'

# Check the migration guidance for users of this function
grep -A 20 -B 5 "migrate_pgr_analyzeOneWay" doc/topology/migration.rst

Length of output: 951


🏁 Script executed:

#!/bin/bash
# Try to find migration.rst elsewhere in the repository
find . -name migration.rst

# Check for any mentions of migrating from pgr_analyzeOneWay in the codebase
git grep -i "migrate.*analyzeOneWay" 

# Check if there's any topology migration documentation
find . -path "*/doc/*" -name "*migration*"

# Search for specific guidance on migrating from this function
git grep -i "migrat.*from.*analyzeOneWay"

Length of output: 316


🏁 Script executed:

#!/bin/bash
# Look at the migration documentation for pgr_analyzeOneWay
cat ./doc/src/migration.rst | grep -A 20 "migrate_pgr_analyzeOneWay_start" | grep -B 20 "migrate_pgr_analyzeOneWay_end"

# Let's look at the sql file being removed
cat sql/topology/analyzeOneway.sql

# Check if there are any test fixtures that are still present
find . -name "*.test.sql" | grep -i "analyzeoneway"

# Check the topology functions to understand the current directory structure
ls -la doc/topology/

Length of output: 839


@cvvergara I've reviewed PR #2839 "Remove deprecated pgr analyze one way v4.0" which addresses issue #2755.

Summary

This pull request removes the deprecated pgr_analyzeOneWay function from the pgRouting codebase. The function was marked as deprecated in version 3.8.0 and is now being removed in the upcoming 4.0.0 release, which follows the project's policy of removing deprecated functions in major version releases.

Changes:

  • Removes the implementation code (sql/topology/analyzeOneway.sql)
  • Removes documentation (doc/topology/pgr_analyzeOneWay.rst)
  • Removes test cases and sample queries
  • Updates related files to remove references to the function
  • Updates translation files to remove related strings
  • Adds entries to NEWS.md and release_notes.rst documenting the removal

The PR is clean and focused on the removal of this single deprecated function. The changes appear to be complete, removing all traces of the deprecated function while properly documenting the removal in the project's changelog.

@cvvergara cvvergara requested a review from robe2 April 9, 2025 15:32
@cvvergara cvvergara merged commit 5ac417f into pgRouting:develop Apr 9, 2025
2 checks passed
@cvvergara cvvergara deleted the remove-deprecated-pgr_analyzeOneWay-v4.0 branch April 9, 2025 17:39
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 Topology
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants