Skip to content

Conversation

@cvvergara
Copy link
Member

Fixes #2910 .

Changes proposed in this pull request:

  • SQL change
  • update the build script
  • add into migration
  • update NEWS and release notes about standardization

@pgRouting/admins

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 11, 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 issue-2910-standardize-output-columns-edwardMoore
  • 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
Copy link
Member Author

@coderabbitai summary
@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 11, 2025

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -e

# Detect the default branch of the upstream repo (origin/HEAD → origin/<default>)
default_branch_ref=$(git symbolic-ref --quiet refs/remotes/origin/HEAD || true)
default_branch=${default_branch_ref#refs/remotes/origin/}

echo "Default branch detected: $default_branch"
echo "----------------------------------------------------------"
echo "🗂️  Files changed in this PR (vs $default_branch):"
git diff --name-status "$default_branch"...HEAD
echo "----------------------------------------------------------"
echo "🔍  Displaying diffstat for a quick overview:"
git diff --stat "$default_branch"...HEAD

Length of output: 485


🏁 Script executed:

#!/bin/bash
set -e

echo "=== Git branches ==="
git branch -a

echo -e "\n=== Current HEAD ==="
git rev-parse --abbrev-ref HEAD
git log --oneline -n 5

echo -e "\n=== Remotes ==="
git remote -v

Length of output: 456


🏁 Script executed:

#!/bin/bash
set -e

# Ensure we have complete history to compute merge base
echo "Fetching full history..."
git fetch --unshallow || true
git fetch origin main coderabbit_2916 || true

echo -e "\n🔄  Diff (main..HEAD) with double-dot syntax:"
git diff --name-status main HEAD || true

echo -e "\n📊  Diffstat (main..HEAD):"
git diff --stat main HEAD || true | head -n 30

echo -e "\n📄  First 200 lines of patch for overview:"
git diff --patch-with-stat --unified=3 main HEAD | head -n 200

Length of output: 64028


@cvvergara

📝 PR Summary

This PR is an extensive clean-up / refactor that prepares pgRouting for the next major release (4 .0):

Feature removals / deprecations
– Drops the whole α-shape and topology tool-chain: C/C++ sources, SQL, docs, pgtap tests, CMake targets.
– Removes the deprecated TRSP drivers (_trsp*deprecated.sql, GraphDefinition, C/C++ sources, tests).
– Deletes a large set of old helper SQL in sql/common and pgtap helpers (isColumnInTable, checkVertTab, …).

New / re-organised code
– Introduces generic shortestPath_driver|process and merges “allpairs” drivers.
– Adds undirected{Has,No}CostBG wrappers.
– Creates a legacy/ module meant to host compatibility shims.
– Adds C++ and header moves/renames (e.g. allpairs_driver.[ch]pp).
– New extension signature file sql/sigs/pgrouting--4.0.sig.

Docs & localisation
– Purges all pages that describe removed functions.
– Updates doc/src/migration.rst, release_notes.rst, NEWS, README.
– Regenerates all *.po catalogues to remove strings for deleted functions.

Test suite & CI
– Deletes 400+ pgtap scripts tied to removed features, keeps and relocates remaining ones (e.g. extractVertices now under utilities).
– Minor tweaks to GitHub workflows and developer scripts.

Build files
– Cleans top-level CMakeLists.txt and many sub-CMakeLists to drop obsolete targets.

Overall: 27 k insertions, 51 k deletions across 488 files.


🔍 High-level Review Notes

  1. Breaking API surface
    • All removed SQL functions constitute a hard break. The PR already bumps the extension sig to 4.0 — good.
    • Consider adding upgrade-time NOTICEs in migration.sql or a dedicated “DROP … IF EXISTS” helper so users upgrading from 3.x don’t end up with orphaned objects.

  2. Legacy shim strategy
    • A src/legacy folder now exists but is almost empty. Decide early whether you’ll re-implement thin wrappers there (e.g., pgr_analyzeGraph() delegating to a new utility) or keep the namespace clean and document the removal only.

  3. Test coverage
    • With so many pgtap files deleted, coverage for the new generic drivers (shortestPath_driver, CH changes, undirected BG wrappers, etc.) is minimal.
    • Recommend adding fresh pgtap cases exercising the new driver paths and ensuring parity with the deleted ones (especially for edge cases formerly covered under topology / alpha-shape / TRSP).

  4. CMake / build sanity
    • Top-level CMakeLists.txt still references src/alpha_shape? (I saw the directory removal, but please double-check target lists to avoid “source not found” errors).
    • Similarly verify that every newly-added source file (*_process.cpp, undirected*BG.cpp) is in the correct target. A quick cmake --build . run will reveal missing links.

  5. Documentation artefacts
    • Search for stale references (pgr_analyzeGraph, alphaShape, etc.) that might linger in tutorial pages or examples.
    doc/src/pgRouting-concepts.rst gained edits but still mentions “topology functions” in § 4 — might need pruning.

  6. SQL helper renames
    _endPoint.sql was renamed to _get_statement.sql – ensure callers were updated (grep for _endPoint( in remaining SQL).
    • Removal of _point_toId.sql, _startPoint.sql, utilities_pgr.sql could break internal PL/pgSQL; run a plpgsql_check pass if available.

  7. CI changes
    • Workflows only had version bumps; make sure new build matrix still installs all dependencies required after code shuffle (Boost, BGL headers, …).


Suggested Next Steps

• Run the full CMake + make check pipeline to confirm there are no dangling references.
• Add at least smoke-tests for the new drivers.
• Decide on (and document) upgrade guidance for users of removed functionality.

Let me know if you’d like deeper dives into specific areas or automated searches for leftover references!

@cvvergara cvvergara merged commit 30d45a2 into pgRouting:develop Jun 12, 2025
26 checks passed
@cvvergara cvvergara deleted the issue-2910-standardize-output-columns-edwardMoore branch June 26, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants