Skip to content

Conversation

cvvergara
Copy link
Member

@cvvergara cvvergara commented Mar 6, 2025

Fixes #2760 .

Changes proposed in this pull request:

  • Documentation: classified as official
  • SQL: remove PROPOSED comment

@pgRouting/admins

Summary by CodeRabbit

  • Documentation

    • Updated documentation to reflect the reclassification of core routing functions from proposed to official.
    • Reorganized metrics sections and streamlined entries for improved clarity across the user guides.
  • Refactor

    • Renamed a key routing function and updated its interface by removing an obsolete parameter, resulting in a simplified user experience.

Copy link
Contributor

coderabbitai bot commented Mar 6, 2025

Walkthrough

This pull request updates the pgRouting documentation and SQL function interface. The function previously known as pgr_findCloseEdges has been renamed to pgr_degree and is now promoted to official status with an updated signature that accepts only Edges SQL. Several documentation files have been reorganized: proposed metrics sections have been replaced with official sections, and references to the metrics-family have been adjusted. Additionally, the SQL code for pgr_degree has been simplified by removing the vertices parameter.

Changes

File(s) Change Summary
NEWS.md, doc/metrics/pgr_degree.rst, doc/src/release_notes.rst, sql/metrics/degree.sql Renamed pgr_findCloseEdges to pgr_degree, updated the function signature in SQL (removed vertices parameter), and promoted the function from proposed to official status.
doc/metrics/metrics-family.rst, doc/src/experimental.rst, doc/src/proposed.rst, doc/src/routingFunctions.rst Reorganized metrics documentation by replacing proposed sections with official ones, removing outdated metrics-family references, and integrating metrics-family content into routing functions.

Possibly related PRs

Suggested labels

Documentation

Suggested reviewers

  • robe2

Poem

I'm a bunny with a hop so light,
Scanning docs deep into the night.
The code now sings a cheerful tune,
With pgr_degree shining like the moon.
Carrots and bytes in joyful flight,
Happy hops for changes done just right!


📜 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 b20b80a and 677d23f.

📒 Files selected for processing (8)
  • NEWS.md (1 hunks)
  • doc/metrics/metrics-family.rst (1 hunks)
  • doc/metrics/pgr_degree.rst (4 hunks)
  • doc/src/experimental.rst (0 hunks)
  • doc/src/proposed.rst (0 hunks)
  • doc/src/release_notes.rst (1 hunks)
  • doc/src/routingFunctions.rst (2 hunks)
  • sql/metrics/degree.sql (0 hunks)
💤 Files with no reviewable changes (3)
  • doc/src/experimental.rst
  • doc/src/proposed.rst
  • sql/metrics/degree.sql
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: cvvergara
PR: pgRouting/pgrouting#2771
File: doc/topology/pgr_degree.rst:28-35
Timestamp: 2025-02-27T23:08:14.497Z
Learning: In the pgRouting documentation, historical version notes should be retained to show the evolution of functions across different versions.
doc/metrics/pgr_degree.rst (1)
Learnt from: cvvergara
PR: pgRouting/pgrouting#2771
File: doc/topology/pgr_degree.rst:28-35
Timestamp: 2025-02-27T23:08:14.497Z
Learning: In the pgRouting documentation, historical version notes should be retained to show the evolution of functions across different versions.
doc/src/release_notes.rst (2)
Learnt from: cvvergara
PR: pgRouting/pgrouting#2744
File: doc/src/release_notes.rst:94-94
Timestamp: 2025-02-06T20:50:07.967Z
Learning: In pgRouting, changes to functions can happen at two levels:
1. SQL level - removal/addition of function signatures
2. C/C++ level - deprecation/changes to the underlying implementation
These are documented separately in the release notes.
Learnt from: cvvergara
PR: pgRouting/pgrouting#2771
File: doc/topology/pgr_degree.rst:28-35
Timestamp: 2025-02-27T23:08:14.497Z
Learning: In the pgRouting documentation, historical version notes should be retained to show the evolution of functions across different versions.
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Check queries
🔇 Additional comments (6)
doc/metrics/pgr_degree.rst (2)

11-12: Index Update for Official Promotion
The new index entries (“single: Metrics Family ; pgr_degree” and “single: degree”) now clearly group the function under its metrics family. This change is consistent with promoting the function to official status.


31-33: Official Status and Signature Update Noted
The bullet points in the “Version 3.8.0” section now list:
– Error messages adjustment
– New signature with only Edges SQL
Function promoted to official
This clearly documents the evolution. The later “Version 3.4.0” section still notes “New proposed function” to retain historical context. This is appropriate per the pgRouting documentation guidelines.

doc/src/release_notes.rst (1)

50-60:

❓ Verification inconclusive

Clarity on Renaming: pgr_degree vs. pgr_findCloseEdges
The release notes now include two bullet items—one for pgr_degree and one for pgr_findCloseEdges. Since the PR objectives state that the function previously known as “pgr_findCloseEdges” is now renamed to pgr_degree and promoted to official status, it is not immediately clear why both entries are still present.

Please verify whether both entries are needed for backward compatibility or if they should be consolidated (for example, by clearly indicating that pgr_findCloseEdges has been fully renamed to pgr_degree). This change will help prevent any confusion among users.


Action Required: Clarify and Consolidate Release Note Entries

The current release notes show two bullet items—one for pgr_degree and one for pgr_findCloseEdges. Since the PR objectives indicate that the function formerly known as pgr_findCloseEdges has been renamed to pgr_degree and promoted to official status, it’s ambiguous why both entries remain. Please verify:

  • If backward compatibility is intended: Update the pgr_findCloseEdges entry with an explicit note (e.g., “alias for pgr_degree”) to clearly indicate that it is maintained solely for legacy support.
  • If backward compatibility is not required: Remove the pgr_findCloseEdges bullet item, consolidating the documentation under pgr_degree to avoid user confusion.

Please review this with the PR objectives and project standards in mind.

doc/metrics/metrics-family.rst (1)

18-24: Updated Section Markers Reflect Official Status
The old “proposed” markers have been replaced with “official-start” and “official-end,” which correctly reflects the promotion of the underlying functions to official status. This update aligns with both the PR objectives and the long‐term memory guidance regarding retaining historical notes while signaling the current status.

doc/src/routingFunctions.rst (1)

74-79: Integration of the Metrics Family
A new documentation entry for the metrics family has been added here (lines 74–79), including the directive to include the updated “metrics-family.rst” content. This reinforces that pgr_degree is now part of the officially recognized family of metrics functions. The change is clear and consistent with the promotion effort.

NEWS.md (1)

11-29:

❓ Verification inconclusive

Ambiguity in Function Naming and Status
In the News release notes for pgRouting 3.8.0 the following two entries appear in close succession:

pgr_degree
  – Error messages adjustment.
  – New signature with only Edges SQL.
  – Function promoted to official.

pgr_findCloseEdges
  – Error messages adjustment.
  – “partial” option is removed.
  – Function promoted to official.

Because the PR objective indicates that pgr_findCloseEdges has been renamed to pgr_degree, the simultaneous presence of both entries may confuse readers. Please verify if these entries should be merged or if additional clarifying text is needed (for example, marking pgr_findCloseEdges as the deprecated name that has been fully replaced by pgr_degree).


Clarify Function Naming and Deprecation in NEWS.md

The NEWS release notes currently list both pgr_degree and pgr_findCloseEdges as promoted to official functions. However, since the PR objective indicates that pgr_findCloseEdges has been renamed to pgr_degree, the two entries can cause confusion. Please verify whether to merge these entries into a single note for pgr_degree (consolidating its new signature, error message adjustments, and removal of the “partial” option) or to add a clarifying remark that explicitly marks pgr_findCloseEdges as deprecated in favor of pgr_degree.


🪧 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 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 March 6, 2025 15:59
@cvvergara cvvergara merged commit 0020b47 into pgRouting:main Mar 6, 2025
12 checks passed
@cvvergara cvvergara deleted the issue-2760-promote-to-official-pgr_degree branch March 6, 2025 19:11
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.

Promote to official pgr_degree in 3.8
2 participants