-
-
Notifications
You must be signed in to change notification settings - Fork 376
Deprecate pgr analyze one way #2825
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 analyze one way #2825
Conversation
- Removed use on documentation - Removed use on pgtap - Removed references to documentation file - Added migration instructions
WalkthroughThe changes update documentation and SQL scripts to deprecate the function Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SQL_Engine
participant pgr_analyzeOneway_Function
User->>SQL_Engine: Execute one-way edge analysis query
SQL_Engine->>pgr_analyzeOneway_Function: Call pgr_analyzeOneway()
pgr_analyzeOneway_Function->>SQL_Engine: Raise deprecation warning ("deprecated function on v3.8.0")
pgr_analyzeOneway_Function->>SQL_Engine: Process query and return results
SQL_Engine->>User: Send analysis result
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
Note 🎁 Summarized by CodeRabbit FreeYour organization has reached its limit of developer seats under the Pro Plan. For new users, CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please add seats to your subscription by visiting https://app.coderabbit.ai/login.If you believe this is a mistake and have available seats, please assign one to the pull request author through the subscription management page using the link above. 🪧 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: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (15)
NEWS.md
(1 hunks)doc/src/migration.rst
(1 hunks)doc/src/release_notes.rst
(1 hunks)doc/topology/pgr_analyzeGraph.rst
(2 hunks)doc/topology/pgr_analyzeOneWay.rst
(2 hunks)doc/topology/pgr_createTopology.rst
(1 hunks)doc/topology/pgr_createVerticesTable.rst
(1 hunks)doc/topology/pgr_nodeNetwork.rst
(0 hunks)docqueries/src/migration.pg
(1 hunks)docqueries/src/migration.result
(1 hunks)docqueries/topology/analyzeOneWay.result
(1 hunks)locale/en/LC_MESSAGES/pgrouting_doc_strings.po
(8 hunks)locale/pot/pgrouting_doc_strings.pot
(8 hunks)pgtap/topology/nodeNetwork/edge_cases.pg
(1 hunks)sql/topology/analyzeOneway.sql
(3 hunks)
💤 Files with no reviewable changes (1)
- doc/topology/pgr_nodeNetwork.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: Ubuntu Boost (84)
- GitHub Check: Ubuntu Boost (86)
- GitHub Check: Ubuntu Boost (68)
- GitHub Check: Ubuntu Boost (83)
- GitHub Check: Ubuntu Boost (79)
- GitHub Check: Ubuntu Boost (78)
- GitHub Check: Ubuntu Boost (56)
- GitHub Check: Ubuntu Boost (76)
- GitHub Check: Ubuntu Boost (75)
- GitHub Check: Ubuntu Boost (77)
- GitHub Check: Ubuntu Boost (80)
- GitHub Check: Ubuntu clang
- GitHub Check: Check queries
- GitHub Check: macos (macos-latest)
- GitHub Check: macos (macos-14)
🔇 Additional comments (29)
pgtap/topology/nodeNetwork/edge_cases.pg (1)
27-27
: Test plan count updated to reflect removed test casesThe plan count has been reduced from 30 to 28, corresponding to the removal of test cases related to the deprecated
pgr_analyzeOneWay
function. This is consistent with the PR objective to deprecate this function.doc/src/release_notes.rst (1)
71-72
: Properly documented deprecation of pgr_analyzeOneWayThe deprecation of
pgr_analyzeOneWay
is correctly documented in the release notes with the appropriate issue reference. This change aligns with the PR objectives and follows the established format for function deprecation.NEWS.md (1)
39-40
: Documented deprecation in NEWS fileThe deprecation of
pgr_analyzeOneWay
is correctly added to the NEWS file with the appropriate issue reference, consistent with the release notes and following the same format as other deprecation entries.locale/en/LC_MESSAGES/pgrouting_doc_strings.po (6)
11-11
: No functional issues detected in POT-Creation-Date update.
All looks good here.
3962-3965
: Reference to deprecation issue #2754 is consistent and clear.
These lines correctly map the deprecation note to the relevant GitHub issue.
8063-8071
: No concerns with these translated strings.
References to incoming/outgoing vertices are consistent.
8177-8177
: Deprecation notice for “pgr_analyzeOneWay” is clear.
No issues with the updated message.
10028-10033
: Use of “AS incoming” and “AS outgoing” is consistent.
No problems found here.
13472-13472
: Reference to “pgr_createTopology” is consistent with doc changes.
No issues found.doc/topology/pgr_createTopology.rst (2)
114-114
: Documentation updated to remove deprecated function referenceThe reference to
pgr_analyzeOneWay
has been removed from the description of theein
field in the vertices table description, which aligns with the deprecation of this function (as stated in the PR objectives).
116-116
: Documentation updated to remove deprecated function referenceThe reference to
pgr_analyzeOneWay
has been removed from the description of theeout
field in the vertices table description, which aligns with the deprecation of this function.doc/topology/pgr_createVerticesTable.rst (2)
101-101
: Documentation updated to remove deprecated function referenceThe reference to
pgr_analyzeOneWay
has been removed from the description of theein
field in the vertices table description, which aligns with the deprecation of this function (as stated in the PR objectives).
103-103
: Documentation updated to remove deprecated function referenceThe reference to
pgr_analyzeOneWay
has been removed from the description of theeout
field in the vertices table description, which aligns with the deprecation of this function.docqueries/topology/analyzeOneWay.result (1)
35-35
: Deprecation warning correctly implementedA warning message has been added to notify users that
pgr_analyzeOneWay
is deprecated as of version 3.8.0. This effectively communicates to users that they should transition away from using this function in their code.doc/src/migration.rst (1)
27-68
: Well-structured migration guide for pgr_analyzeOneWay.The new migration section provides a clear alternative to the deprecated function by explaining how to:
- Identify dead ends using pgr_extractVertices
- Detect bridges that are one-way
- Use SQL queries with practical examples
The section is properly delimited with start/end markers and follows the documentation style consistently.
sql/topology/analyzeOneway.sql (2)
147-147
: Appropriate deprecation warning added.The warning correctly informs users that the function is deprecated since version 3.8.0, which aligns with the PR objectives.
279-279
: Function comment updated to reflect deprecation status.The simplified comment clearly indicates that the function is deprecated, which is consistent with the warning message.
doc/topology/pgr_analyzeOneWay.rst (4)
11-12
: Index entries correctly updated to indicate deprecation.The index entries now include "Deprecated since 3.8.0", making it clear in search results that this function should not be used in new code.
16-16
: Title updated to show deprecation status.The function title clearly indicates it's deprecated since version 3.8.0.
26-29
: Version information updated with deprecation notice.The availability section now explicitly states the function is deprecated in version 3.8.0 while preserving the original introduction version.
34-36
: Migration guide reference added.Good inclusion of a link to the migration guidelines, making it easy for users to find alternative approaches.
doc/topology/pgr_analyzeGraph.rst (2)
11-12
: Index entries updated to show deprecation status.The index entries now include "Deprecated since 3.8.0" for consistency with other deprecated functions.
109-111
: Removed references to pgr_analyzeOneWay.The description of the 'ein' and 'eout' columns has been simplified by removing links to the deprecated pgr_analyzeOneWay function, maintaining documentation coherence.
docqueries/src/migration.result (3)
1309-1318
: Added query to identify one-way dead ends.This query effectively identifies dead ends in the graph and checks if adjacent edges are one-way, providing a direct replacement for one aspect of the deprecated pgr_analyzeOneWay function.
1320-1332
: Added query to check one-way status of bridges.Good implementation that identifies bridges in the graph and determines if they are one-way, which is a critical use case for the deprecated function.
1334-1342
: Added query to find one-way bridges with their cost values.This query extends the previous query by returning detailed cost information for one-way bridges, providing valuable diagnostic information.
docqueries/src/migration.pg (3)
405-411
: Good addition of alternative technique for identifying one-way edges at deadendsThis query effectively identifies one-way edges connected to deadend vertices (vertices with only one edge). It uses a Common Table Expression (CTE) to find these deadend vertices and then joins with the edges table to filter those with negative costs, which indicate one-way restrictions. This provides users with a clear migration path from the deprecated
pgr_analyzeOneWay
function.
412-415
: Effective approach for identifying one-way bridge edgesThis query combines the
pgr_bridges
function with a simple boolean expression to identify one-way bridge edges in the graph. This is a useful migration alternative that focuses specifically on critical edges whose one-way status might significantly impact routing.
416-420
: Helpful detailed query for one-way bridge analysisThis query extends the previous approach by returning the actual cost values for one-way bridge edges, providing more detailed information for analysis. This is valuable for users who need to understand the specific cost structures of critical one-way connections in their network.
9e0678c
to
ae5e6fb
Compare
Fixes #2754
Changes proposed in this pull request:
@pgRouting/admins
Summary by CodeRabbit
pgr_analyzeOneWay
function is deprecated as of v3.8.0. Guidance on adjusting to these changes is now included.