Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
b81d77b
fix appveyor
vidhan13j07 May 26, 2017
b415653
fix appveyor
vidhan13j07 May 26, 2017
7608e30
Merge remote-tracking branch 'upstream/develop' into gsoc/rewritetrsp
vidhan13j07 May 26, 2017
73eb5e0
Merge pull request #802 from vidhan13j07/gsoc/rewritetrsp
vidhan13j07 May 26, 2017
b5895a8
Generated template code
vidhan13j07 May 29, 2017
f2af36f
boost version updated by itself
vidhan13j07 May 29, 2017
146adbc
Fixed input for additional TEXT column
vidhan13j07 May 29, 2017
7fe6fec
fixed index errors
vidhan13j07 May 29, 2017
fccac7c
Fixing process
vidhan13j07 May 29, 2017
e8f0d84
Fixed documentation test
vidhan13j07 May 29, 2017
3510489
Added pgtap testing support
vidhan13j07 May 31, 2017
e45eaaf
travis not fixed
vidhan13j07 May 31, 2017
89e501a
fixed typescheck
vidhan13j07 May 31, 2017
695ac5c
removed unwanted comments
vidhan13j07 May 31, 2017
1d695d3
Added todos
vidhan13j07 Jun 1, 2017
445536e
Added two edge test
vidhan13j07 Jun 2, 2017
d33ba26
removed comma from conf file
vidhan13j07 Jun 2, 2017
f3193d3
Added sample cases in two edge test
vidhan13j07 Jun 2, 2017
25461e7
Added edges 4 and 7 only in two edge test
vidhan13j07 Jun 2, 2017
5e7655b
Added tests
vidhan13j07 Jun 2, 2017
263ebf4
Changed restrictions_table to restrictions
vidhan13j07 Jun 2, 2017
e1bc81e
Extend tests
vidhan13j07 Jun 2, 2017
f6f5c43
Add condition on restrictions table
vidhan13j07 Jun 2, 2017
8e5c0b3
Added 4 more tests
vidhan13j07 Jun 2, 2017
463d5bd
Add result file and fix travis
vidhan13j07 Jun 2, 2017
e7867a0
Added empty_set.test.sql
vidhan13j07 Jun 2, 2017
4e5ac2c
Added pgtap integration to empty_set.test.sql
vidhan13j07 Jun 2, 2017
0aaaf3f
Fixed file location
vidhan13j07 Jun 2, 2017
65e23ba
fix travis
vidhan13j07 Jun 2, 2017
857cafa
fixed some filenames
vidhan13j07 Jun 2, 2017
e8a8e3d
fixed small bugs
vidhan13j07 Jun 2, 2017
4b22723
remove comments
vidhan13j07 Jun 2, 2017
c7bd0bf
removed extra line from pgtap_design.test.sql
vidhan13j07 Jun 2, 2017
d05355b
Added more tests
vidhan13j07 Jun 3, 2017
9ecf433
Merge pull request #806 from vidhan13j07/gsoc/rewritetrsp
cvvergara Jun 3, 2017
25333c9
Merge remote-tracking branch 'upstream/develop' into test/merge
vidhan13j07 Jun 6, 2017
314b256
moving documentation files tto a new location
vidhan13j07 Jun 6, 2017
94e6b10
moved queries files to queries folder
vidhan13j07 Jun 6, 2017
07ad586
created CMakeLists file for dijkstraTRSO
vidhan13j07 Jun 6, 2017
c9a6277
Edited configuration file
vidhan13j07 Jun 6, 2017
d9bc648
Merge branch 'test/merge' into gsoc/rewritetrsp
vidhan13j07 Jun 6, 2017
8d1db99
Merge pull request #811 from vidhan13j07/gsoc/rewritetrsp
vidhan13j07 Jun 6, 2017
425f7f4
Added more pgtap tests for empty set
vidhan13j07 Jun 6, 2017
b85d928
added comments
vidhan13j07 Jun 6, 2017
f90c868
change structure of comments in the file
vidhan13j07 Jun 6, 2017
154573d
for better view
vidhan13j07 Jun 6, 2017
7b70de6
Added tests for existant starting vertex to existant destination
vidhan13j07 Jun 6, 2017
ff31615
Added strict column
vidhan13j07 Jun 7, 2017
f03c407
small fix
vidhan13j07 Jun 7, 2017
f2e59a4
Added tests for different connected components and change default of …
vidhan13j07 Jun 7, 2017
2ac2665
Added pgtap tests for strict=true
vidhan13j07 Jun 7, 2017
06ad2c0
Changed default value to true
vidhan13j07 Jun 8, 2017
293abed
Resolved todo errors of dijkstraTRSP-innerQuery.sql
vidhan13j07 Jun 9, 2017
67c31a9
Added restrict table
vidhan13j07 Jun 9, 2017
8ab91c2
fix conflicts
vidhan13j07 Jun 9, 2017
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ build
fix_typos
code_linter

tools/template/mycreate.sh
*.sh
.DS_Store
.vagrant
tools/vagrant/packaging.sh
Expand Down
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ------------------------------------------------------------------------------
# Travis CI scripts
# Travis CI scripts
# Copyright(c) pgRouting Contributors
#
# Main configuration
Expand All @@ -8,7 +8,7 @@
#choose trusty

group: edge
dist: trusty
dist: trusty
sudo: required


Expand Down Expand Up @@ -70,12 +70,11 @@ before_script:
- ./tools/travis/check-extensions.sh $POSTGRESQL_VERSION ___pgr___test___


script:
script:
- ./tools/travis/pgrouting_build.sh $POSTGRESQL_VERSION $POSTGIS_VERSION
# tests as part of script so if a test fails the build fails
- ./tools/testers/pg_prove_tests.sh $PG_USER DEBUG

after_script:
#after_script:
- ./tools/travis/pgrouting_test.sh $POSTGRESQL_VERSION $PG_USER -ignorenotice

#after_success:
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ configure_file("configuration.conf" "configuration.conf")
file(STRINGS configuration.conf PgRouting_CONFIGURATION_FILE)

set(PgRouting_SOURCE_NAMES "")
set(PgRouting_SQL_DIRECTORIES "")
set(PgRouting_DOC_DIRECTORIES "")
set(PgRouting_SQL_DIRECTORIES "")
set(PgRouting_DOC_DIRECTORIES "")
foreach(line ${PgRouting_CONFIGURATION_FILE})
string(REGEX REPLACE "^(#).*" "\\1" comment ${line})
string(REGEX REPLACE "^(#).*" "\\1" comment ${line})
if("${comment}" MATCHES "#")
continue()
endif()
Expand Down Expand Up @@ -143,7 +143,7 @@ set(PgRouting_SOURCE_NAMES
"pickDeliver" # 2.3
"vrp_basic" # 2.0
"withPoints" # 2.2

"dijkstraTRSP"
"components" # 2.5

# template generated name
Expand Down
2 changes: 1 addition & 1 deletion configuration.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contraction | Y | Y | Y
pickDeliver | Y | Y | Y
vrp_basic | Y | Y | Y
withPoints | Y | Y | Y
#doc-dijkstraTRSP | Y | Y | Y
dijkstraTRSP | Y | Y | Y
areaContraction | Y | Y | Y
components | Y | Y | Y
#----------------------
Expand Down
280 changes: 0 additions & 280 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,280 +0,0 @@
#
# Find Sphinx
# Find Sphinx executable to build documentation
# Source: http://ericscottbarr.com/blog/2012/03/sphinx-and-cmake-beautiful-documentation-for-c-projects/
#
# Daniel Kastl 03/2013
#

#---------------------------------------------
# Kind of sphinx output
#---------------------------------------------

option(LOCALE
"Set ON|OFF (default=OFF) to build ithe latest pot/po files" OFF)

option(WITH_ALL_DOC
"Set ON|OFF (default=OFF) to build Documentation library tree" OFF)

#option(PDF
# "Set ON|OFF (default=OFF) to build Documentation library tree as PDF" OFF)

option(LATEX
"Set ON|OFF (default=OFF) to build Documentation library tree as PDF" OFF)

option(SINGLEHTML
"Set ON|OFF (default=OFF) to build Documentation library tree as SINGLE HTML" OFF)

option(HTML
"Set ON|OFF (default=OFF) to build Documentation library tree as HTML" OFF)

#option(MAN
# "Set ON|OFF (default=OFF) to build Documentation library tree as MAN page" OFF)

option(EPUB
"Set ON|OFF (default=OFF) to build Documentation library tree as EPUB page" OFF)

option(DUMMY
"Set ON|OFF (default=OFF) for debugging purposes" OFF)

foreach(opt HTML LATEX SINGLEHTML EPUB DUMMY)
if (${${opt}} OR WITH_ALL_DOC)
string(TOLOWER ${opt} val)
list(APPEND PgRouting_DOC_TARGETS ${val})
set(WITH_DOC ON)
endif()
endforeach()


message(STATUS "PgRouting_DOC_TARGETS = ${PgRouting_DOC_TARGETS}")

#---------------------------------------------
#---------------------------------------------
#---------------------------------------------

# LANGUAGES SETINGS

#---------------------------------------------
#---------------------------------------------
#---------------------------------------------

#---------------------------------------------
# Avaliable Languages
# English is allways built
#---------------------------------------------
set(PgRouting_SUPPORTED_LANGUAGES "de" "es" "fr" "it" "ja" "ru")
set(PgRouting_ENGLISH "en")

#---------------------------------------------
# Language options
#---------------------------------------------
option(WITH_ALL_LANG
"Set ON|OFF (default=OFF) to build all the supported languages:
Main Language will always be built:
${PgRouting_ENGLISH}
Optional languages:
${PgRouting_SUPPORTED_LANGUAGES}

When OFF and want to build specific optional language, use the language code in capital letters:
-D ES=ON
"
OFF
)

foreach(lang ${PgRouting_SUPPORTED_LANGUAGES})
string(TOUPPER ${lang} val)
option(${val}
"Set ON|OFF (default=OFF) build ${lang} Documentation" OFF)
endforeach()

#---------------------------------------------
# Catching the language options to be build
#---------------------------------------------
foreach(lang ${PgRouting_SUPPORTED_LANGUAGES})
string(TOUPPER ${lang} opt)
if (${opt} OR WITH_ALL_LANG)
list(APPEND PgRouting_BUILD_LANGUAGES ${lang})
endif()
endforeach()

#---------------------------------------------
# All languages po files are to be generated
#---------------------------------------------

set (SPHINXINTL_LANGUAGE ${PgRouting_ENGLISH})
foreach(lang ${PgRouting_BUILD_LANGUAGES})
set(SPHINXINTL_LANGUAGE "${SPHINXINTL_LANGUAGE},${lang}")
endforeach()


list(APPEND PgRouting_BUILD_LANGUAGES ${PgRouting_ENGLISH})
message(STATUS "PgRouting_BUILD_LANGUAGES = ${PgRouting_BUILD_LANGUAGES}")
message(STATUS "SPHINXINTL_LANGUAGE = ${SPHINXINTL_LANGUAGE}")


if(NOT WITH_DOC)
return()
endif()


#---------------------------------------------
# Checking for prerequisites
#---------------------------------------------
find_package(Sphinx ${SPHINX_MINIMUM_VERSION} REQUIRED)

if (NOT SPHINX_FOUND)
message(FATAL_ERROR "Sphinx not found.
Cannot generate documentation!
Install Sphinx or build without documentation")
endif()

if (SPHINX_VERSION VERSION_LESS 1.0)
message(WARNING "Your Sphinx version is too old!
This project requires Sphinx v${SPHINX_MINIMUM_VERSION} or above to produce
proper documentation (you have v${SPHINX_VERSION}).
You will get output but it will have errors.")
endif()

#pip install rst2pdf



#---------------------------------------------
# Kind of "looks"
#---------------------------------------------
option(DOC_USE_BOOTSTRAP
"Set ON|OFF (default=ON) to build Documentation library tree as MAN page" OFF)

if (DOC_USE_BOOTSTRAP)
set(SPHINX_INCLUDE "import sphinx_bootstrap_theme")
set(SPHINX_THEME "bootstrap")
set(SPHINX_THEME_DIR "sphinx_bootstrap_theme.get_html_theme_path()")
set(SPHINX_THEME_OPTIONS "'source_link_position': \"none\",")
else()
set(SPHINX_INCLUDE "")
set(SPHINX_THEME "haiku")
set(SPHINX_THEME_DIR "['']")
set(SPHINX_THEME_OPTIONS "")
endif()




# configured documentation tools and intermediate build results
set(PGR_DOCUMENTATION_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")
set(PGR_DOCUMENTATION_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}")

message(STATUS "PGR_DOCUMENTATION_BUILD_DIR = ${PGR_DOCUMENTATION_BUILD_DIR}")


#---------------------------------------------
# Adding documentation directories
#---------------------------------------------
foreach (subdir ${PgRouting_DOC_DIRECTORIES} "src" "queries")
add_subdirectory(${subdir})
endforeach()

add_subdirectory("images")


configure_file("../tools/testers/sampledata.sql" "${PGR_DOCUMENTATION_SOURCE_DIR}/sampledata/sampledata.sql")


#TODO ???
#add_subdirectory("static")
#add_subdirectory("themes")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/static" DESTINATION "${PGR_DOCUMENTATION_BUILD_DIR}")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/themes" DESTINATION "${PGR_DOCUMENTATION_BUILD_DIR}")


configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in"
"${PGR_DOCUMENTATION_BUILD_DIR}/conf.py"
@ONLY)

# Add documentation to targets


#if (LATEX)
if (FALSE)
find_package(LATEX)
if (NOT LATEX_COMPILER)
message("Couldn't find Latex, can't build latex docs using Sphinx")
else()
message(STATUS "LATEX_COMPILER = ${LATEX_COMPILER}")
endif()
endif()

set(ENV{SPHINXINTL_LANGUAGE} ${SPHINXINTL_LANGUAGE})

if (LOCALE)
add_custom_target(locale
COMMAND ${SPHINX_EXECUTABLE}
-b gettext
-c "${PGR_DOCUMENTATION_BUILD_DIR}"
"${PGR_DOCUMENTATION_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/locale/pot"

COMMAND sphinx-intl update -p ${CMAKE_SOURCE_DIR}/locale/pot -d ${CMAKE_SOURCE_DIR}/locale --language=${SPHINXINTL_LANGUAGE}

COMMENT "Generating POT & PO files ..."
SOURCES ${PgRouting_DOC_FILES}
)
endif()


# The doc target will build all documentation targets.
add_custom_target(doc
COMMENT "Building documentation with Sphinx")


foreach (target ${PgRouting_DOC_TARGETS})
add_custom_target("${target}"
COMMENT "Building ${target} documentation with Sphinx")

configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/forward.html"
"${PGR_DOCUMENTATION_BUILD_DIR}/${target}/index.html")

foreach (lang ${PgRouting_BUILD_LANGUAGES})
add_custom_target(
"${target}-${lang}"
COMMAND ${SPHINX_EXECUTABLE}
#-q # Enable for quiet mode
#-Q # Enable for even more quiet mode
#-v # increase verbosity
#-E # don't use a saved environment, always read all file
#-a # write all files; default is to only write new and changed files
-b ${target}
-D language='${lang}'
-c "${PGR_DOCUMENTATION_BUILD_DIR}"
"${PGR_DOCUMENTATION_SOURCE_DIR}"
"${PGR_DOCUMENTATION_BUILD_DIR}/${target}/${lang}"

COMMENT "Generating ${target}/${lang} documentation ..."
SOURCES ${PgRouting_DOC_FILES} ${PgRouting_IMG_FILES}
)
add_dependencies(${target} "${target}-${lang}")

endforeach()
add_dependencies(doc "${target}")
endforeach()



if(FALSE)
# AND ${target} MATCHES "latex" AND LATEX_COMPILER)
add_custom_target(pdf-${lang}
COMMENT "Building documentation with Sphinx")

add_custom_command(
TARGET pdf-${lang} POST_BUILD
#fixes: Underfull \hbox (badness 10000) in paragraph
#perl -pi -e 's/warning/warning /' pgRoutingDocumentation.tex
COMMAND pdflatex -interaction=nonstopmode "pgRoutingDocumentation.tex" > /dev/null 2>&1
WORKING_DIRECTORY "${PGR_DOCUMENTATION_BUILD_DIR}/pdf/${lang}"
DEPENDS ${target}-${lang}
COMMENT "Converting Latex to PDF format")

endif()

12 changes: 12 additions & 0 deletions doc/dijkstraTRSP/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

SET(LOCAL_FILES
pgr_dijkstraTRSP.rst
)

foreach (f ${LOCAL_FILES})
configure_file(${f} "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}")
list(APPEND LOCAL_DOC_FILES ${PGR_DOCUMENTATION_SOURCE_DIR}/${f})
endforeach()

set(PgRouting_DOC_FILES ${PgRouting_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE)

Loading