Skip to content

Commit 2a3d696

Browse files
committed
pgr_bipartite: updating documentation
1 parent 071ee97 commit 2a3d696

File tree

5 files changed

+43
-8
lines changed

5 files changed

+43
-8
lines changed

doc/coloring/coloring-family.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,22 @@ Column Type Description
6565

6666
.. result-edge-color-end
6767

68+
.. result-node-color-start
69+
70+
Returns set of |result_node_color|
71+
72+
============ =========== =====================================
73+
Column Type Description
74+
============ =========== =====================================
75+
``node`` ``BIGINT`` Identifier of the node.
76+
``color`` ``BIGINT`` Color of the node.
77+
78+
- The minimum value of color is 1.
79+
80+
============ =========== =====================================
81+
82+
.. result-node-color-end
83+
6884
.. result columns start
6985

7086
Returns set of ``(vertex_id, color_id)``

doc/coloring/pgr_bipartite.rst

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ the same set are adjacent.
2525

2626
.. rubric:: Availability
2727

28-
* Version 3.2.0
28+
.. rubric:: Version 4.0.0
2929

30-
* New experimental function.
30+
* Output columns standardized to |result-node-color|
31+
32+
.. rubric:: Version 3.2.0
33+
34+
* New experimental function.
3135

3236
Description
3337
-------------------------------------------------------------------------------
@@ -86,8 +90,8 @@ Result columns
8690
-------------------------------------------------------------------------------
8791

8892
.. include:: coloring-family.rst
89-
:start-after: result columns start
90-
:end-before: result columns end
93+
:start-after: result-node-color-start
94+
:end-before: result-node-color-end
9195

9296
Additional Example
9397
--------------------------------------------------------------------------------

doc/conf.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ rst_epilog="""
365365
.. |result-1-1-no-seq| replace:: ``(seq, node, edge, cost, agg_cost)``
366366
.. |result-m-1-no-seq| replace:: ``(seq, start_vid, node, edge, cost, agg_cost)``
367367
.. |result-node-color| replace:: ``(vertex_id, color_id)``
368+
.. |result_node_color| replace:: ``(node, color)``
368369
.. |result_edge_color| replace:: ``(edge, color)``
369370
.. |result-node| replace:: ``(node)``
370371
.. |result-edge| replace:: ``(edge)``

doc/src/migration.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Migration to standardized columns
3434
.. |pid-m-m| replace:: ``(seq, path_seq, start_pid, end_pid, node, edge, cost, agg_cost)``
3535
.. |matrix-pid| replace:: ``(start_pid, end_pid, agg_cost)``
3636
.. |old-edge-color| replace:: ``(edge_id, color_id)``
37+
.. |old-node-color| replace:: ``(vertex_id, color_id)``
3738

3839
There has been an effort to standardize function output columns names and
3940
types.
@@ -84,6 +85,8 @@ types.
8485
- `Migration of single path functions`_
8586
* - .. versionchanged:: 4.0.0 :doc:`pgr_binaryBreadthFirstSearch` [3]_
8687
- `Migration of single path functions`_
88+
* - .. versionchanged:: 4.0.0 :doc:`pgr_bipartite` [3]_
89+
- `Migration of output column name change`_
8790
* - .. versionchanged:: 4.0.0 :doc:`pgr_dagShortestPath` [3]_
8891
- `Migration of single path functions`_
8992
* - .. versionchanged:: 4.0.0 :doc:`pgr_edgeColoring` [3]_
@@ -854,6 +857,17 @@ Before update:
854857
* To get the old version column names: in the ``SELECT`` clause use ``edge AS
855858
edge_id`` and ``color AS color_id``
856859

860+
.. rubric:: :doc:`pgr_bipartite`
861+
862+
From: |old-node-color|
863+
To: |result-node-color|
864+
865+
Before update:
866+
867+
* Rename ``vertex_id`` to ``node`` and ``color_id`` to ``color``.
868+
* To get the old version column names: in the ``SELECT`` clause use ``node AS
869+
vertex_id`` and ``color AS color_id``
870+
857871
Migration of deleted functions
858872
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
859873

pgtap/coloring/bipartite/types_check.pg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1919
********************************************************************PGR-GNU*/
2020
BEGIN;
2121

22-
SELECT CASE WHEN NOT min_version('3.2.0') THEN plan(1) ELSE plan(5) END;
22+
SELECT CASE WHEN min_version('4.0.0') THEN plan(5) ELSE plan(1) END;
2323

2424
CREATE OR REPLACE FUNCTION types_check()
2525
RETURNS SETOF TEXT AS
2626
$BODY$
2727
BEGIN
2828

29-
IF NOT min_version('3.2.0') THEN
29+
IF NOT min_version('4.0.0') THEN
3030
RETURN QUERY
31-
SELECT skip(1, 'Function is new on 3.2.0');
31+
SELECT skip(1, 'pgr_bipartite: testing only signatures standardaized in v4.0.0.');
3232
RETURN;
3333
END IF;
3434

@@ -38,7 +38,7 @@ BEGIN
3838

3939
RETURN QUERY
4040
SELECT function_args_eq('pgr_bipartite',
41-
$$SELECT '{"","vertex_id","color_id"}'::TEXT[] $$
41+
$$SELECT '{"","node","color"}'::TEXT[] $$
4242
);
4343

4444
RETURN QUERY

0 commit comments

Comments
 (0)