Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
python -m pip install --upgrade pip
pip install Sphinx
pip install sphinx-bootstrap-theme
pip install sphinx-collapse
pip list

- name: Configure
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-locale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
pip install Sphinx
pip install sphinx-bootstrap-theme
pip install sphinx-intl[transifex]
pip install sphinx-collapse
pip list

- name: Initialize mandatory git config
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
contents: read

jobs:
build:
update-ver:
name: Build
runs-on: ubuntu-latest

Expand Down Expand Up @@ -94,16 +94,16 @@ jobs:
cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF ..
make -j 4
sudo make install
sudo service postgresql start
createdb -p "${PGPORT}" ___pgr___test___
psql -p "${PGPORT}" -d ___pgr___test___ -c "CREATE EXTENSION pgrouting CASCADE;"

- name: Test old version before update with current tests
run: |
sudo service postgresql start
createdb -p "${PGPORT}" ___pgr___test___
psql -p "${PGPORT}" -d ___pgr___test___ -c "CREATE EXTENSION pgrouting CASCADE;"
psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();"
DIR=$(git rev-parse --show-toplevel)
bash "${DIR}/tools/testers/setup_db.sh" "${PGPORT}" ___pgr___test___ "${PG_RUNNER_USER}" "${{ matrix.old_pgr }}"
psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();"
pg_prove -Q -f --normalize --directives --recurse -U "${PG_RUNNER_USER}" -d ___pgr___test___ "pgtap"

- name: Build current version
Expand All @@ -118,8 +118,11 @@ jobs:
- name: Test old version with currrent tests after installing current
run: |
sudo service postgresql start
psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();"
dropdb -p "${PGPORT}" ___pgr___test___
createdb -p "${PGPORT}" ___pgr___test___
DIR=$(git rev-parse --show-toplevel)
bash "${DIR}/tools/testers/setup_db.sh" "${PGPORT}" ___pgr___test___ "${PG_RUNNER_USER}" "${{ matrix.old_pgr }}"
psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();"
pg_prove -Q -f --normalize --directives --recurse -U "${PG_RUNNER_USER}" -d ___pgr___test___ "pgtap"

- name: Test old version with current tests after update
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
pip install Sphinx
pip install sphinx-bootstrap-theme
pip install sphinx-intl[transifex]
pip install sphinx-collapse
pip list

- name: Configure and build documentation
Expand Down
9 changes: 4 additions & 5 deletions doc/metrics/pgr_degree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Signatures
| OR EMPTY SET

.. index::
single: degree ; Edges and Vertices
single: degree ; Edges

Edges
...............................................................................
Expand All @@ -92,6 +92,9 @@ Edges
:start-after: -- q1
:end-before: -- q2

.. index::
single: degree ; Edges and Vertices

Edges and Vertices
...............................................................................

Expand All @@ -116,10 +119,6 @@ Calculate the degree of the nodes:
:start-after: -- q2
:end-before: -- q3

.. index::
single: degree ; Edges


Parameters
-------------------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions doc/src/sampledata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ reached from both sides.
The points of interest:

.. literalinclude:: sampledata.queries
:start-after: -- p5
:end-before: -- p6
:start-after: -- p6
:end-before: -- p7

.. pois_end

Expand Down
24 changes: 19 additions & 5 deletions docqueries/src/sampledata.result
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ FROM edges ORDER BY id;

/* -- q5 */
/* --POINTS CREATE start */
DO LANGUAGE plpgsql $BODY$
DECLARE v FLOAT;
BEGIN
SELECT (parts[1]||'.'||parts[2])::FLOAT FROM STRING_TO_ARRAY(pgr_version(), '.') AS parts INTO v;
/* -- p1 */
CREATE TABLE pointsOfInterest(
pid BIGSERIAL PRIMARY KEY,
Expand All @@ -160,7 +164,7 @@ CREATE TABLE pointsOfInterest(
edge geometry,
newPoint geometry,
geom geometry);
CREATE TABLE
IF v > 3.4 THEN
/* -- p2 */
INSERT INTO pointsOfInterest (geom) VALUES
(ST_Point(1.8, 0.4)),
Expand All @@ -169,7 +173,6 @@ INSERT INTO pointsOfInterest (geom) VALUES
(ST_Point(0.3, 1.8)),
(ST_Point(2.9, 1.8)),
(ST_Point(2.2, 1.7));
INSERT 0 6
/* -- p3 */
UPDATE pointsofinterest SET
edge_id = poi.edge_id,
Expand All @@ -183,11 +186,22 @@ FROM (
FROM pgr_findCloseEdges(
$$SELECT id, geom FROM edges$$,(SELECT array_agg(geom) FROM pointsOfInterest), 0.5) ) AS poi
WHERE pointsOfInterest.geom = poi.geom;
UPDATE 6
/* -- p4 */
UPDATE pointsOfInterest SET side = 'b' WHERE pid = 6;
UPDATE 1
/* -- p5 */
ELSE
INSERT INTO pointsOfInterest (edge_id, side, fraction, geom) VALUES
(1, 'l' , 0.4, ST_POINT(1.8, 0.4)),
(15, 'r' , 0.4, ST_POINT(4.2, 2.4)),
(12, 'l' , 0.6, ST_POINT(2.6, 3.2)),
(6, 'r' , 0.3, ST_POINT(0.3, 1.8)),
(5, 'l' , 0.8, ST_POINT(2.9, 1.8)),
(4, 'b' , 0.7, ST_POINT(2.2, 1.7));
END IF;
END;
$BODY$;
DO
/* -- p6 */
SELECT
pid, ST_AsText(geom) geom,
edge_id, fraction AS frac, side, distance AS dist,
Expand All @@ -203,7 +217,7 @@ FROM pointsOfInterest;
6 | POINT(2.2 1.7) | 4 | 0.7 | b | 0.2 | LINESTRING(2.2 1.7,2 1.7) | POINT(2 1.7)
(6 rows)

/* -- p6 */
/* -- p7 */
/* --POINTS CREATE end */
/* --COMBINATIONS CREATE start */
/* -- c1 */
Expand Down
Loading