-
-
Notifications
You must be signed in to change notification settings - Fork 376
Deprecate pgr create vertices table #2829
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
Deprecate pgr create vertices table #2829
Conversation
Caution Review failedThe pull request is closed. WalkthroughThe changes document and enforce the deprecation of the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant PG as pgRouting Library
participant EV as pgr_extractVertices
participant TT as Topology Functions
U->>PG: Request vertices table creation
PG->>TT: Validate creation method
Note over PG,TT: pgr_createVerticesTable is deprecated
PG->>EV: Call pgr_extractVertices to gather vertices data
EV-->>PG: Return vertices data
PG-->>U: Create vertices table using new process
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (18)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
pgtap/common/checkVertTab.pg (1)
28-28
:⚠️ Potential issueThis test still uses the deprecated function
pgr_createVerticesTable
.This test uses the function that's being deprecated in this PR. Consider updating this test to use the recommended approach with
pgr_extractVertices
instead, similar to changes made in other files.#!/bin/bash # Check if other test files have been updated to use the alternative approach grep -r "pgr_createVerticesTable" pgtap/ | grep -v checkVertTab.pg
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (19)
NEWS.md
(1 hunks)doc/_static/page_history.js
(1 hunks)doc/src/migration.rst
(1 hunks)doc/src/release_notes.rst
(1 hunks)doc/topology/pgr_analyzeGraph.rst
(1 hunks)doc/topology/pgr_analyzeOneWay.rst
(2 hunks)doc/topology/pgr_createTopology.rst
(0 hunks)doc/topology/pgr_createVerticesTable.rst
(1 hunks)doc/topology/pgr_extractVertices.rst
(0 hunks)docqueries/topology/createVertTab-any.result
(18 hunks)docqueries/topology/createVerticesTable.result
(19 hunks)locale/en/LC_MESSAGES/pgrouting_doc_strings.po
(8 hunks)locale/pot/pgrouting_doc_strings.pot
(8 hunks)pgtap/common/checkVertTab.pg
(1 hunks)pgtap/topology/analyzeGraph/issue_1311.pg
(1 hunks)pgtap/topology/analyzeOneWay/edge_cases.pg
(1 hunks)pgtap/topology/createVerticesTable/checkVertTab.pg
(1 hunks)sql/common/utilities_pgr.sql
(1 hunks)sql/topology/createverticestable.sql
(2 hunks)
💤 Files with no reviewable changes (2)
- doc/topology/pgr_extractVertices.rst
- doc/topology/pgr_createTopology.rst
👮 Files not reviewed due to content moderation or server errors (1)
- locale/pot/pgrouting_doc_strings.pot
⏰ Context from checks skipped due to timeout of 90000ms (16)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Check queries
- GitHub Check: Ubuntu Boost (86)
- GitHub Check: Ubuntu Boost (80)
- GitHub Check: Ubuntu Boost (79)
- GitHub Check: Ubuntu Boost (76)
- GitHub Check: Ubuntu Boost (83)
- GitHub Check: Ubuntu Boost (78)
- GitHub Check: Ubuntu Boost (84)
- GitHub Check: Ubuntu Boost (77)
- GitHub Check: Ubuntu Boost (75)
- GitHub Check: Ubuntu Boost (68)
- GitHub Check: Ubuntu Boost (56)
- GitHub Check: macos (macos-latest)
- GitHub Check: macos (macos-14)
- GitHub Check: Ubuntu clang
🔇 Additional comments (27)
locale/en/LC_MESSAGES/pgrouting_doc_strings.po (7)
3972-3976
: LGTM: Clear reference to the deprecation issueGood job adding a reference to the GitHub issue that prompted this deprecation, making it easier for users to understand the context behind this change.
4055-4056
: LGTM: Clear migration section headerGood addition of a dedicated migration section that will help users understand how to transition away from the deprecated function.
4066-4077
: LGTM: Comprehensive migration instructionsExcellent job providing both "Before Deprecation" and "After Deprecation" explanations. The clear recommendation to use
pgr_extractVertices
as an alternative helps users adapt to this change.
8047-8048
: LGTM: Alternative function referenceGood update recommending
pgr_createTopology
as an alternative for creating the vertices table.
8281-8281
: LGTM: Updated documentation referenceGood update to reference the recommended alternative function in the examples section.
8296-8296
: LGTM: Consistent recommendationGood job maintaining consistency by recommending
pgr_createTopology
throughout the documentation.
10152-10152
: LGTM: Clear deprecation noticeExcellent deprecation notice that clearly specifies when the function was deprecated (version 3.8.0), helping users understand the timeline for this change.
pgtap/common/checkVertTab.pg (1)
1-1
: Note the filename addition.The file path has been added at the beginning of the file. This is a non-functional change that simply provides metadata about the file's location.
NEWS.md (1)
43-44
: Good documentation of the deprecation.The addition to the NEWS.md file properly documents the deprecation of
pgr_createVerticesTable
function in the release notes for version 3.8.0, referencing the relevant issue #2826.pgtap/topology/analyzeOneWay/edge_cases.pg (1)
31-33
: Good implementation of the alternative approach.The code now uses
pgr_extractVertices
to create the vertices table instead of the deprecatedpgr_createVerticesTable
function. This aligns with the migration path documented in the PR objectives.sql/common/utilities_pgr.sql (1)
285-285
: Updated error message to remove reference to deprecated function.The error message has been modified to remove the reference to
pgr_createVerticesTable
, now only suggesting_pgr_createTopology()
for creating the vertex table. This is consistent with the deprecation plan.docqueries/topology/createVertTab-any.result (1)
14-14
: Consistent deprecation warnings correctly implemented.The warnings have been consistently implemented across all calls to
pgr_createVerticesTable
, clearly indicating the function is deprecated in version 3.8.0.Also applies to: 31-31, 48-48, 65-65, 82-82, 99-99, 116-116, 131-131, 150-150, 167-167, 184-184, 201-201, 218-218, 235-235, 254-254, 276-276, 294-294, 311-311
doc/src/release_notes.rst (1)
75-76
: Documentation properly updated with deprecation notice.The release notes correctly document the deprecation of
pgr_createVerticesTable
with a reference to the related GitHub issue #2826.pgtap/topology/analyzeGraph/issue_1311.pg (1)
32-34
: Good migration example from deprecated function to recommended approach.This change demonstrates the recommended approach of replacing
pgr_createVerticesTable
withpgr_extractVertices
. The replacement code properly:
- Creates all necessary columns
- Initializes additional tracking columns (cnt, chk, ein, eout) to zero
- Renames the geometry column to match expected convention
This serves as a good example for users migrating away from the deprecated function.
docqueries/topology/createVerticesTable.result (1)
7-7
: Consistent deprecation warnings correctly implemented in test results.The warnings have been properly added to all test scenarios involving
pgr_createVerticesTable
, maintaining consistency with other documentation and providing clear indication that this function is now deprecated.Also applies to: 26-26, 44-44, 59-59, 78-78, 97-97, 116-116, 136-136, 161-161, 187-187, 205-205, 220-220, 241-241, 262-262, 283-283, 304-304, 321-321, 343-343, 360-360
doc/src/migration.rst (1)
27-45
: Good addition of migration documentation forpgr_createVerticesTable
.This new section clearly explains the differences between the pre-deprecation and post-deprecation behavior, and provides guidance on using
pgr_extractVertices
as an alternative. The included code example will help users understand how to migrate their code.doc/topology/pgr_analyzeOneWay.rst (2)
101-101
: References to deprecated function properly removed.The documentation correctly updates the reference to only recommend
pgr_createTopology
instead of the deprecatedpgr_createVerticesTable
function.
123-124
: Appropriate update to vertices table creation guidance.The instructions for creating vertices tables have been properly updated to recommend only using
pgr_createTopology
, aligning with the deprecation ofpgr_createVerticesTable
.doc/_static/page_history.js (1)
219-219
: Version marker added for deprecated function.The version number 3.8 has been added to mark when
pgr_createVerticesTable
was deprecated, which helps maintain proper documentation versioning.doc/topology/pgr_analyzeGraph.rst (1)
98-99
: Documentation properly updated to remove deprecated function reference.The instructions for creating the vertices table have been modified to solely reference
pgr_createTopology
, correctly removing mentions of the deprecatedpgr_createVerticesTable
function.doc/topology/pgr_createVerticesTable.rst (4)
11-12
: Updated index entries correctly reflect function deprecation.The index entries now properly indicate that the
pgr_createVerticesTable
function is deprecated since version 3.8.0, which matches the PR objectives of marking this function as deprecated.
16-16
: Function title now includes deprecation notice.The title has been updated to include "Deprecated since 3.8.0", which is consistent with the index entries and helps to make the deprecation status clear to users.
24-26
: Appropriately added deprecation notice in Availability section.Adding this information under the "Availability" section follows proper documentation practice for deprecated functions, making it very clear to users that this function should no longer be used.
33-35
: Migration guide inclusion will help users transition.The inclusion of a migration guide is essential for helping users move away from the deprecated function. This directive will insert appropriate migration instructions from a separate file.
pgtap/topology/createVerticesTable/checkVertTab.pg (1)
1-51
: Well-structured test file for verifying deprecated function behavior.This new test file provides good coverage of the
pgr_createVerticesTable
functionality, ensuring that despite being deprecated, the function continues to work correctly until it is eventually removed.A few observations:
- The test properly sets
client_min_messages
to WARNING to manage the output- The test validates the structure of the created vertices table
- Error handling is tested with
throws_ok
for non-existent tables- Test cleanup is handled through ROLLBACK
The test includes all necessary checks to ensure the function still operates as expected while being marked as deprecated.
sql/topology/createverticestable.sql (2)
99-99
: Appropriately added deprecation warning message.The warning message clearly indicates that the function is deprecated in version 3.8.0, which aligns with the documentation changes and PR objectives. The message is displayed when the function is called, ensuring users are aware of the deprecation.
268-268
: Function comment updated to reflect deprecation status.The function comment has been simplified to focus on the deprecation notice, which is appropriate since the function is being phased out. This matches the PR objective of deprecating the function.
- Removing use on pgtap and docqueries
6bb114c
to
7deae88
Compare
Fixes #2826 .
Changes proposed in this pull request:
@pgRouting/admins
Summary by CodeRabbit
Documentation
Tests
Chores