Skip to content

Deprecating pgr AlphaShape #2832

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

Merged
merged 2 commits into from
Apr 8, 2025

Conversation

cvvergara
Copy link
Member

@cvvergara cvvergara commented Apr 8, 2025

Fixes #2749 .

Changes proposed in this pull request:

  • Deprecation message
  • Remove use on doc, docqueries, pgtap
  • (doc) documenting changes on NEWS and release notes

@pgRouting/admins

Summary by CodeRabbit

  • Documentation

    • Updated user-facing deprecation notices in release notes and guides to highlight that the alpha shape functionality is deprecated as of version 3.8.
    • Added migration guidance with alternatives for generating alpha shapes.
    • Removed obsolete references linking to the deprecated feature.
  • Chores

    • Introduced warning messages in query results and SQL outputs to clearly indicate the deprecation status.

- Remove use on doc, docqueires, pgtap
- (doc) documenting changes on NEWS and release notes
Copy link
Contributor

coderabbitai bot commented Apr 8, 2025

Walkthrough

This pull request deprecates the pgr_alphaShape function across various documentation and SQL files. The updates include adding deprecation notices in NEWS and release notes with a reference to issue #2749, appending a new version number in the page history, and adding a migration section outlining PostGIS alternatives. Additionally, obsolete references to the function have been removed from related documentation, and warnings have been inserted in the SQL and result files to indicate its deprecated status as of version 3.8.0.

Changes

Files Change Summary
NEWS.md, doc/src/release_notes.rst, locale/en/LC_MESSAGES/pgrouting_doc_strings.po, locale/pot/pgrouting_doc_strings.pot Added deprecation notices for pgr_alphaShape with a reference to issue #2749 and updated documentation text.
doc/_static/page_history.js, doc/alpha_shape/pgr_alphaShape.rst, doc/src/migration.rst Updated version information by appending version 3.8 and adding a migration directive for the deprecated function.
doc/driving_distance/pgr_drivingDistance.rst, doc/withPoints/pgr_withPointsDD.rst Removed references to pgr_alphaShape from the “See Also” sections.
docqueries/alpha_shape/alphashape.result, sql/alpha_shape/alphaShape.sql Inserted warning messages and updated comments signaling that pgr_alphaShape is deprecated as of version 3.8.0.

Assessment against linked issues

Objective Addressed Explanation
Deprecate pgr_alphaShape and document migration alternatives (#2749)

Possibly related PRs

Suggested reviewers

  • robe2

Poem

I'm a rabbit on a joyful spree,
Deprecating old code as swift as can be.
pgr_alphaShape steps down with grace,
Making room for a newer pace.
Hop along on the migration trail,
With warnings and updates that never fail!

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 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 plan to trigger planning for file edits and PR creation.
  • @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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1f8a9ee and 690e82c.

📒 Files selected for processing (11)
  • NEWS.md (1 hunks)
  • doc/_static/page_history.js (1 hunks)
  • doc/alpha_shape/pgr_alphaShape.rst (2 hunks)
  • doc/driving_distance/pgr_drivingDistance.rst (0 hunks)
  • doc/src/migration.rst (1 hunks)
  • doc/src/release_notes.rst (1 hunks)
  • doc/withPoints/pgr_withPointsDD.rst (0 hunks)
  • docqueries/alpha_shape/alphashape.result (1 hunks)
  • locale/en/LC_MESSAGES/pgrouting_doc_strings.po (6 hunks)
  • locale/pot/pgrouting_doc_strings.pot (6 hunks)
  • sql/alpha_shape/alphaShape.sql (2 hunks)
💤 Files with no reviewable changes (2)
  • doc/withPoints/pgr_withPointsDD.rst
  • doc/driving_distance/pgr_drivingDistance.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 (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (14)
docqueries/alpha_shape/alphashape.result (1)

8-8: Warning message correctly added for deprecation.

The deprecation warning for pgr_alphashape function has been properly added to the query result, clearly indicating it's deprecated as of version 3.8.0. This aligns with the PR objective to deprecate the pgr AlphaShape function.

doc/src/release_notes.rst (1)

71-72: Deprecation entry correctly added to release notes.

The pgr_alphaShape function has been properly added to the "Deprecation of functions" section with a reference to issue #2749. This documentation change is consistent with the PR objectives and follows the same format as other deprecation entries in this section.

locale/en/LC_MESSAGES/pgrouting_doc_strings.po (5)

11-11: POT-Creation-Date appears to be set to a future date.

The creation date is set to April 8, 2025, which is in the future. Please verify and correct this date to reflect the actual creation time.

-"POT-Creation-Date: 2025-04-08 19:58+0000\n"
+"POT-Creation-Date: 2023-04-08 19:58+0000\n"

3962-3965: LGTM: Proper deprecation notice added.

The added text correctly references issue #2749 and clearly indicates that pgr_alphaShape is deprecated, which aligns with the PR objectives.


4065-4065: LGTM: Migration section header added.

Adding a dedicated migration section for pgr_alphaShape is good practice to help users transition to alternative functions.


7865-7869: LGTM: Clear deprecation marking.

Good job marking the function as deprecated and specifying the version number (3.8.0) when the deprecation takes effect. This helps users understand when the change occurred.


15516-15517: Verify if this change belongs in this PR.

This "Support" section addition doesn't appear to be directly related to the pgr_alphaShape deprecation. Please verify if this change should be part of this PR or if it belongs to a different set of changes.

NEWS.md (1)

39-40: Properly documented deprecation in the NEWS.

The addition of the pgr_alphaShape function to the "Deprecation of functions" section correctly documents this change for users upgrading to version 3.8.0. Including the GitHub issue reference (#2749) provides valuable context for the deprecation decision.

doc/_static/page_history.js (1)

263-265: Version history correctly updated.

Adding version 3.8 to the pgr_alphaShape entry in the page history is appropriate. This ensures that the documentation system correctly tracks and displays the version in which this function was deprecated, helping users understand the timeline of API changes.

doc/src/migration.rst (1)

27-55: Comprehensive migration guide added.

The new migration section for pgr_alphaShape is well-structured and provides clear guidance for users:

  1. It clearly states when the deprecation begins (v3.8.0)
  2. It explains what the function did before deprecation
  3. It provides concrete alternatives using PostGIS functionality:
    • CG_AlphaShape and ST_AlphaShape for PostGIS 3.5+ with SFCGAL
    • Other options like ST_ConvexHull and ST_ConcaveHull

This approach helps users smoothly transition to supported alternatives.

sql/alpha_shape/alphaShape.sql (2)

43-43: Runtime warning added for deprecated function.

Adding a warning message that will be displayed when the function is used is a good practice for deprecation. This ensures users are immediately aware that they're using a deprecated function, even if they haven't read the release notes.


86-87: Function comment updated to reflect deprecation.

The simplified comment that focuses on the deprecated status is appropriate. Users looking at the function definition in the database will clearly see that this function is deprecated in version 3.8.0.

doc/alpha_shape/pgr_alphaShape.rst (2)

23-25: Deprecation Notice Update

The addition of the new version entry:

  • * Version 3.8.0
  • * Deprecated function.

clearly marks the pgr_alphaShape function as deprecated. This aligns well with the PR objectives and ensures that users are immediately informed about the deprecation status. Please double-check that the version numbering is consistent across all related documentation and that any references in NEWS and release notes are updated accordingly.


47-49: Migration Instructions Inclusion

The inclusion directive for migration.rst is a valuable addition to guide users through the transition. Ensure that:

  • The file migration.rst exists in the expected location.
  • The markers :start-after: migrate_pgr_alphaShape_start and :end-before: migrate_pgr_alphaShape_end correctly identify the intended migration section.

This will help maintain clear instructions for migrating to the recommended alternatives such as CG_AlphaShape and ST_AlphaShape.

@cvvergara cvvergara merged commit e4c2974 into pgRouting:main Apr 8, 2025
2 checks passed
@cvvergara cvvergara deleted the deprecate-pgr_alphashape branch April 8, 2025 20: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.

Deprecate pgr_AlphaShape in 3.8
2 participants