Skip to content

(pgtap) Removing use of pgr_analyzeGraph #2824

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

Conversation

cvvergara
Copy link
Member

@cvvergara cvvergara commented Apr 5, 2025

More on #2820 .

Changes proposed in this pull request:

  • Remove use of pgr_analyzeGraph on pgtap Directory
  • Also removing unused file for transifex

@pgRouting/admins

Summary by CodeRabbit

  • Chores
    • Removed outdated localization configuration to streamline internal maintenance.
  • Tests
    • Simplified graph validation tests by reducing redundant checks, enhancing overall efficiency and maintainability.

@cvvergara cvvergara added this to the Release 3.8.0 milestone Apr 5, 2025
Copy link
Contributor

coderabbitai bot commented Apr 5, 2025

Walkthrough

This pull request completely removes the .tx/config file, which previously defined Transifex localization settings for pgRouting. In addition, it streamlines several SQL test scripts in the pgtap/topology/nodeNetwork directory by reducing the number of planned test cases (via the SELECT plan(...) statements) and removing multiple SQL assertions that checked graph data attributes. No changes were made to any exported or public entities.

Changes

File(s) Change Summary
.tx/config Removed the complete configuration file containing Transifex settings for localization.
pgtap/.../nodeNetwork/{edge_cases.pg, issue_1009.pg, issue_1074.pg, issue_1336.pg} Reduced SELECT plan counts and removed several SQL validation queries and assertions related to graph checks.

Suggested labels

Deprecation, Tests

Suggested reviewers

  • robe2

Poem

Hi, I'm a rabbit with hops so bright,
Celebrating changes on a breezy night.
The config is gone—bye old transfixing might,
And tests now run simpler in the soft moonlight.
With every nibble of code, I leap with delight!


📜 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 3354577 and e318b4e.

📒 Files selected for processing (5)
  • .tx/config (0 hunks)
  • pgtap/topology/nodeNetwork/edge_cases.pg (1 hunks)
  • pgtap/topology/nodeNetwork/issue_1009.pg (1 hunks)
  • pgtap/topology/nodeNetwork/issue_1074.pg (1 hunks)
  • pgtap/topology/nodeNetwork/issue_1336.pg (1 hunks)
💤 Files with no reviewable changes (1)
  • .tx/config
⏰ Context from checks skipped due to timeout of 90000ms (15)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Ubuntu clang
  • GitHub Check: Ubuntu Boost (78)
  • GitHub Check: Ubuntu Boost (79)
  • GitHub Check: Ubuntu Boost (86)
  • GitHub Check: Ubuntu Boost (77)
  • GitHub Check: Ubuntu Boost (83)
  • GitHub Check: Ubuntu Boost (84)
  • GitHub Check: Ubuntu Boost (80)
  • GitHub Check: Ubuntu Boost (76)
  • GitHub Check: Ubuntu Boost (56)
  • GitHub Check: Ubuntu Boost (75)
  • GitHub Check: Ubuntu Boost (68)
  • GitHub Check: macos (macos-14)
  • GitHub Check: macos (macos-latest)
🔇 Additional comments (10)
pgtap/topology/nodeNetwork/issue_1009.pg (2)

25-25: Test plan count adjustment for removed pgr_analyzeGraph usage

The plan count has been reduced from 20 to 14, reflecting the removal of the pgr_analyzeGraph function and its associated test assertions. This change aligns with the PR objective to remove usage of pgr_analyzeGraph.


61-64: Keeping NULL value checks is appropriate

These assertions now simply verify that the vertex attributes remain NULL after topology creation, since pgr_analyzeGraph is no longer being used to populate these values. The test still correctly verifies the expected state of the graph.

pgtap/topology/nodeNetwork/edge_cases.pg (4)

27-27: Test plan count adjustment for removed pgr_analyzeGraph usage

The plan count has been reduced from 41 to 30, reflecting the removal of the pgr_analyzeGraph function and its associated test assertions. This change is consistent with the PR objective to remove usage of pgr_analyzeGraph.


63-66: Keeping NULL value checks for original_noded_vertices_pgr is appropriate

These assertions now simply verify that the vertex attributes remain NULL after topology creation, since pgr_analyzeGraph is no longer being used to populate these values. The test still correctly verifies the expected state of the graph.


106-109: Keeping NULL value checks for noded_vertices_pgr is appropriate

Similarly, these assertions for the noded table verify that vertex attributes remain NULL after topology creation. This maintains consistency with the changes across all files in this PR.


111-118: Maintaining pgr_analyzeoneway functionality

It's good that pgr_analyzeoneway is retained as it serves a different purpose than pgr_analyzeGraph. The assertions correctly verify that ein and eout are populated by this function.

pgtap/topology/nodeNetwork/issue_1336.pg (2)

26-26: Test plan count adjustment for removed pgr_analyzeGraph usage

The plan count has been reduced from 20 to 14, reflecting the removal of the pgr_analyzeGraph function and its associated test assertions. This change aligns with the PR objective.


66-69: Keeping NULL value checks is appropriate

These assertions now simply verify that the vertex attributes remain NULL after topology creation, since pgr_analyzeGraph is no longer being used to populate these values. The test still correctly verifies the expected state of the graph.

pgtap/topology/nodeNetwork/issue_1074.pg (2)

26-26: Test plan count adjustment for removed pgr_analyzeGraph usage

The plan count has been reduced from 22 to 15, reflecting the removal of the pgr_analyzeGraph function and its associated test assertions. This is consistent with the PR objective to remove usage of pgr_analyzeGraph.


82-85: Keeping NULL value checks is appropriate

These assertions now simply verify that the vertex attributes remain NULL after topology creation, since pgr_analyzeGraph is no longer being used to populate these values. The test still correctly verifies the expected state of the graph.


🪧 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.

@cvvergara cvvergara requested a review from robe2 April 5, 2025 02:36
@cvvergara cvvergara merged commit c7a225e into pgRouting:main Apr 5, 2025
22 checks passed
@cvvergara cvvergara deleted the remove-use-of-pgr_analyzeGraph-on-pgtap branch April 5, 2025 15:12
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.

2 participants