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

(C/C++) Removal of unused trsp code #2737

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

cvvergara
Copy link
Member

@cvvergara cvvergara commented Jan 27, 2025

Changes proposed in this pull request:

  • Removes unsed TRSP code

@pgRouting/admins

Summary by CodeRabbit

Release Notes for pgRouting 4.0.0

  • New Features

    • Promoted several transportation and pathfinding functions to official status, including pgr_trsp, pgr_withPoints, and various combination signatures
  • Improvements

    • Enhanced function signatures for multiple routing algorithms
    • Streamlined codebase by removing deprecated and unused functions
  • Removals

    • Eliminated deprecated SQL and internal C/C++ functions related to transportation routing
    • Removed legacy TRSP (Transport Routing Service Provider) implementation files

@cvvergara cvvergara added the Code Cleanup Code cleanup or small refactoring label Jan 27, 2025
@cvvergara cvvergara added this to the Release 4.0.0 milestone Jan 27, 2025
Copy link

coderabbitai bot commented Jan 27, 2025

Walkthrough

This pull request focuses on promoting several transportation and pathfinding functions to official status in pgRouting 4.0.0. The changes involve removing deprecated SQL and C/C++ functions, particularly those related to TRSP (Transportation Routing Service Provider) functionality. Multiple functions like pgr_trsp, pgr_withPoints, and various algorithm signatures (such as pgr_aStar, pgr_dijkstra) are now officially supported. The modifications represent a significant cleanup effort, removing unused code and streamlining the library's codebase.

Changes

File Change Summary
NEWS.md Updated with promoted functions and signatures for version 4.0.0
doc/src/release_notes.rst Updated release notes reflecting function promotions and removals
include/c_common/trsp_pgget.h Completely removed
include/cpp_common/trsp_pgfetch.hpp Completely removed
src/cpp_common/CMakeLists.txt Removed trsp_pgfetch.cpp and trsp_pgget.cpp from library definition
src/cpp_common/trsp_pgfetch.cpp Completely removed
src/cpp_common/trsp_pgget.cpp Completely removed

Possibly related PRs

Suggested labels

Documentation, functionality/official

Poem

🐰 Hop, hop, through the routing code we leap,
Cleaning functions, making pathways neat
Deprecated lines now fade away
Official signatures here to stay
A rabbit's dance of clean design! 🛤️


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b8aa244 and b904f17.

📒 Files selected for processing (7)
  • NEWS.md (1 hunks)
  • doc/src/release_notes.rst (1 hunks)
  • include/c_common/trsp_pgget.h (0 hunks)
  • include/cpp_common/trsp_pgfetch.hpp (0 hunks)
  • src/cpp_common/CMakeLists.txt (0 hunks)
  • src/cpp_common/trsp_pgfetch.cpp (0 hunks)
  • src/cpp_common/trsp_pgget.cpp (0 hunks)

🪧 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. (Beta)
  • @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

Copy link

coderabbitai bot commented Jan 27, 2025

@cvvergara The changes look good. This PR removes unused TRSP utility files (trsp_pgget and trsp_pgfetch) while preserving all core TRSP functionality. The removal of these files is safe as they are not referenced anywhere in the codebase. I'll proceed with the review and summary generation.

🔗 Analysis chain
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Fetch PR details
gh pr view 2737 --json files,additions,deletions,title,body

# Get the list of modified files
git diff --name-status origin/main...HEAD

# Check for any references to TRSP in the codebase
rg -i "trsp" -g '!{*.md,*.txt}' -l

# Look for any test files related to TRSP
fd -t f -g '*test*trsp*'

Length of output: 5432


Script:

#!/bin/bash
# Check for any references to the specific files being removed
rg -i "trsp_pgget|trsp_pgfetch" -g '!{*.md,*.txt}'

# Check git history for these files to understand their purpose
git log --oneline -- include/c_common/trsp_pgget.h include/cpp_common/trsp_pgfetch.hpp

Length of output: 52

✅ Actions performed

Summary regeneration triggered.

@cvvergara cvvergara merged commit 54dc6d8 into pgRouting:develop Jan 27, 2025
26 checks passed
@cvvergara cvvergara deleted the remove-unused-trsp-code branch January 27, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup Code cleanup or small refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant