Skip to content

Conversation

squarege
Copy link
Contributor

@squarege squarege commented Jul 18, 2023

Changes proposed in this pull request:

  • removing new files and combining them with old files.
  • validating driving side
    • if directed graph then valid values r & l
    • if undirected graph then valid values b
  • adjusting pgtap and docqueries.

@pgRouting/admins

@squarege squarege added the yige-2023 Yige's GSoC 2023 project label Jul 18, 2023
@squarege squarege merged commit c4d41dc into pgRouting:yige-2023 Jul 23, 2023
@@ -115,46 +116,31 @@ IF min_version('3.6.0') THEN
---
--- DIRECTED GRAPH
---
-------- both driving sides
Copy link
Member

Choose a reason for hiding this comment

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

This test works for on 3.5.0
Please put it back and handle it in an if then else

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, this test works for 3.6.0. I didn't remove the tests work on 3.5.0, they still there.
And I added a TODO remove comment before the tests work on old version.

-------- right driving side

PREPARE q2 AS
PREPARE q1 AS
Copy link
Member

Choose a reason for hiding this comment

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

You will have to re-renumber the queries....

$$SELECT node, round(cost::numeric, 12) AS cost, round(agg_cost::numeric, 12) AS agg_cost FROM test4$$,
'Should be aggregating individual costs: both driving sides, UNDI');


-------- right driving side
Copy link
Member

Choose a reason for hiding this comment

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

These tests work on 3.5.0 so you will have to put them back

@@ -39,7 +34,7 @@ PREPARE q1 AS
SELECT seq, node, edge, cost::TEXT, agg_cost::TEXT FROM pgr_withPointsDD(
'SELECT id, source, target, cost, reverse_cost FROM edge_table ORDER BY id',
'SELECT pid, edge_id, fraction, side from pointsOfInterest',
-1, 4.8, 'b', details := true, directed:=false)
-1, 4.8, driving_side := 'b', details := true, directed:=false)
Copy link
Member

Choose a reason for hiding this comment

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

Note: if "driving side" is compulsory parameter, then it must not be a named parameter

Copy link
Member

Choose a reason for hiding this comment

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

If you use the driving_side named parameter then you are using the old function, not the new function.
So, now my question is:
Are you testing the old signatures? or the new signatures?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A: I am testing the old signatures.

Reasons:

  • What undirected_driving_side.pg does is:
    verify that in an undirected graph, if the results of r, b, l driving side are equal.
  • I do the change as you mention here:
if graph is directed then valid values are 'R', 'L', 'r', 'l', 
else valid values 'B', 'b'
  • Because of the change, now if graph is undirected, there is only one valid input b. So there won't be a similar test in 3.6.0.
  • What I did in this file is removing changes I made last week and keep it as the same to main repo.

END IF;


/* TODO remove tests on v4 of the old signatures */
Copy link
Member

Choose a reason for hiding this comment

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

The PR you are going to make to main repo is for V3.6
So you can not remove this test, they will be removed on Version V4.

@squarege squarege deleted the yige-week-8 branch July 26, 2023 12:20
@squarege squarege changed the title GSoC 2023: Yige Huang week 8 GSoC 2023: Yige Huang Week 8 Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
yige-2023 Yige's GSoC 2023 project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants