-
-
Notifications
You must be signed in to change notification settings - Fork 38
Fix typos docs #285
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
base: develop
Are you sure you want to change the base?
Fix typos docs #285
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -221,7 +221,7 @@ Count the number of rows that need to be filled up. | |||||||
| Exercise 3: Use QGIS to view the work | ||||||||
| ------------------------------------------------------------------------------- | ||||||||
|
|
||||||||
| QGIS is a powerfull tool | ||||||||
| QGIS is a powerful tool | ||||||||
|
|
||||||||
| If you are using OSGeoLive, then you can find QGIS here: | ||||||||
|
|
||||||||
|
|
@@ -645,7 +645,7 @@ Exercise 9: Testing the views | |||||||
|
|
||||||||
| In particular: | ||||||||
|
|
||||||||
| * Get a traveling cost matrix in seconds from the all follwoing ``id`` to all | ||||||||
| * Get a traveling cost matrix in seconds from the all following ``id`` to all | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Correct the remaining grammar in this sentence. The phrase `the all following ``id``` is not grammatical. State the source and destination ID sets explicitly. Suggested wording- * Get a traveling cost matrix in seconds from the all following ``id`` to all
- the ``id``
+ * Get a traveling cost matrix in seconds from all the following ``id`` values to
+ all the ``id`` values.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| the ``id`` | ||||||||
|
|
||||||||
| * |id_1|, |id_2|, |id_3|, |id_4| and |id_5|. | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -39,13 +39,13 @@ locate the nearest vertex to a lat/lon location. | |||||
| .. image:: images/chap_QGIS/qgis2.png | ||||||
| :height: 50pt | ||||||
|
|
||||||
| #. Close the broswer pannel | ||||||
| #. Close the browser panel | ||||||
|
|
||||||
| .. image:: images/chap_QGIS/qgis3.png | ||||||
| :height: 50pt | ||||||
| :width: 300pt | ||||||
|
|
||||||
| #. Connect to a posgGIS enabeled potsgreSQL database clicking on :menuselection:`Add postGIS layer` | ||||||
| #. Connect to a posgGIS enabled potsgreSQL database clicking on :menuselection:`Add postGIS layer` | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Correct the remaining product-name typos. The changed line still contains Suggested wording-#. Connect to a posgGIS enabled potsgreSQL database clicking on :menuselection:`Add postGIS layer`
+#. Connect to a PostGIS-enabled PostgreSQL database by clicking on :menuselection:`Add PostGIS layer`📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| .. image:: images/chap_QGIS/qgis4.png | ||||||
| :height: 50pt | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,5 +15,5 @@ add_custom_command( | |
| file_end.txt | ||
| warnings.txt | ||
|
|
||
| COMMAND psql -d city_routing -f withPoints.sql 2> warnings.txt | ||
| COMMAND cmake -E echo "dummy psql" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -eu
for f in \
docs/scripts/basic/withPoints/CMakeLists.txt \
docs/scripts/configuration/CMakeLists.txt \
docs/scripts/un_sdg/sdg11/CMakeLists.txt \
docs/scripts/un_sdg/sdg3/CMakeLists.txt \
docs/scripts/un_sdg/sdg7/CMakeLists.txt
do
echo "===== $f ====="
cat -n "$f"
doneRepository: pgRouting/workshop Length of output: 4525 🌐 Web query:
💡 Result: In CMake, add_custom_command and execute_process serve distinct purposes based on when the command is executed [1]. 1. execute_process: This command runs immediately while CMake is configuring the project (during the generation phase) [1]. It is typically used to perform tasks like checking system information, running a version control command, or generating small files needed for the configuration itself. It does not run at build time [1]. 2. add_custom_command: This command is used to generate rules that execute at build time [1][2]. It defines commands to be run by the underlying build tool (like Make or Ninja) whenever a target is built or a file needs regeneration [2][3]. Regarding the specific components mentioned in your query: - COMMAND: Both commands use a COMMAND argument to specify the program to run [1][2]. - CMAKE_COMMAND: This variable contains the full path to the currently running CMake executable [4]. It is frequently used in add_custom_command to invoke CMake in script mode (using cmake -E) to perform portable operations (e.g., copying files, making directories) at build time [4]. - Executable/PATH: When using add_custom_command, if the command name is an executable target created within the same project (via add_executable), CMake will automatically replace it with the path to the built executable [5][6]. If it is not a target, CMake assumes the command is a program located on the system PATH at build time [6]. In summary, use execute_process if you need a result during the CMake configuration step, and use add_custom_command if the action must be part of the actual build process [1]. If you need to run a portable CMake-provided utility at build time, it is common practice to use ${CMAKE_COMMAND} -E within an add_custom_command [4]. Citations:
Use Replace 📍 Affects 5 files
🤖 Prompt for AI AgentsSource: MCP tools |
||
| COMMENT "running chapter withPoints scripts") | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,15 +27,15 @@ Problem: City getting affected by rain or not | |||||||||
|
|
||||||||||
| **Problem Statement** | ||||||||||
|
|
||||||||||
| To determine the areas where if it rains will affect a city/town | ||||||||||
| To determine the areas where rainfall would affect a city/town | ||||||||||
|
|
||||||||||
| .. image:: images/sdg11/sdg11_output.png | ||||||||||
| :align: center | ||||||||||
| :scale: 50% | ||||||||||
|
|
||||||||||
| **Core Idea** | ||||||||||
|
|
||||||||||
| If it rains in vicinity of a river connecting the city, the city will get | ||||||||||
| If it rains in the vicinity of a river connecting the city, the city will get | ||||||||||
| affected by the rains. | ||||||||||
|
|
||||||||||
| **Approach** | ||||||||||
|
|
@@ -44,8 +44,8 @@ affected by the rains. | |||||||||
| * Get the Rivers (Edges) | ||||||||||
| * Create river components | ||||||||||
| * Create a Buffer around the city | ||||||||||
| * Finding the components intersecting the buffer | ||||||||||
| * Finding the rain zones | ||||||||||
| * Find the components intersecting the buffer | ||||||||||
| * Find the rain zones | ||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
@@ -194,7 +194,7 @@ Exercise 5: Remove waterways not for the problem | |||||||||
| :alt: Waterways to be removed | ||||||||||
|
|
||||||||||
| This exercise focusses only the areas in the mainland, where if it rains the city is | ||||||||||
| affected. Hence, the rivers which are there in the swamp area wich is in a lower | ||||||||||
| affected. Hence, the rivers which are there in the swamp area which is in a lower | ||||||||||
| altitude of the city, are to be removed from the ``waterways.ways`` table. | ||||||||||
|
|
||||||||||
| .. rubric:: Remove swamp rivers | ||||||||||
|
|
@@ -234,7 +234,7 @@ a river. First, the connected components are found and then stored in a new colu | |||||||||
| named ``component``. | ||||||||||
|
|
||||||||||
| The pgRouting function ``pgr_connectedComponents`` is used to complete this task | ||||||||||
| and its explaind with more detail in :doc:`../basic/graphs`. | ||||||||||
| and its explained with more detail in :doc:`../basic/graphs`. | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Fix the remaining grammar error. Line 237 reads 🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| A sub-query is created to find out all the connected components. After that, | ||||||||||
| the ``component`` column is updated using the results obtained from the sub-query. | ||||||||||
|
|
@@ -335,8 +335,8 @@ That is, the rivers that lie within the city. | |||||||||
| Exercise 9: Get the rain zones | ||||||||||
| ================================================================================ | ||||||||||
|
|
||||||||||
| In this excercise the area , where if it rains, the | ||||||||||
| city would be affected, is calculated. This area is called ``rain zone`` in the excercise | ||||||||||
| In this exercise the area , where if it rains, the | ||||||||||
| city would be affected, is calculated. This area is called ``rain zone`` in the exercise | ||||||||||
|
Comment on lines
+338
to
+339
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Fix the remaining punctuation and article errors. Line 338 still has a space before the comma. Line 339 should use Proposed wording-In this exercise the area , where if it rains, the
-city would be affected, is calculated. This area is called ``rain zone`` in the exercise
+In this exercise, the area where rain would affect the
+city is calculated. This area is called the ``rain zone``.📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| Create a Buffer around the river components. | ||||||||||
|
|
||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
Repository: pgRouting/workshop
Length of output: 200
🏁 Script executed:
Repository: pgRouting/workshop
Length of output: 11677
🌐 Web query:
CMake execute_process RESULT_VARIABLE OUTPUT_VARIABLE ERROR_VARIABLE documentation failed command empty output💡 Result:
In CMake, the
execute_processcommand is used to run one or more child processes during the configuration phase [1][2]. The behavior regardingRESULT_VARIABLE,OUTPUT_VARIABLE, andERROR_VARIABLEwhen a command fails or produces no output is as follows: RESULT_VARIABLE This variable is set to the result of the process execution [1][3]. If the command succeeds, it typically contains an integer return code (0 is commonly success) [1][4]. If an error occurs (such as a failure to execute or a timeout), it will contain a string describing the error condition [1][5]. OUTPUT_VARIABLE and ERROR_VARIABLE These variables are populated with the content from the standard output and standard error pipes, respectively [1][2]. If the process produces no output, or if the command fails to execute and does not generate output, these variables will be empty (or not modified if they were previously unset) [1][6]. Common Reasons for Empty Output or Failed Execution: 1. Command Failure: If a command fails,execute_processdoes not automatically halt unlessCOMMAND_ERROR_IS_FATALis set toANYorLAST(available in newer CMake versions) [1][3]. CheckRESULT_VARIABLEto verify if the process returned a non-zero exit code [1][4]. 2. Environment and Pathing: CMake runs these commands in a specific working directory [1]. If a command relies on shell features (like wildcards, pipes, or environment variables) that are not available in the direct execution environment, it may fail silently or produce empty output [7]. Using shell-specific syntax directly in theCOMMANDargument without invoking a shell (e.g.,sh -c "...") often leads to this issue [7]. 3. Variable Expansion: Ifexecute_processis used inside generated code (likeinstall(CODE ...)), ensure that variables are properly escaped (e.g.,\${variable_name}) so they are expanded at the correct time (execution time vs. configuration time) rather than being evaluated prematurely as empty strings [6]. To debug, you can use theCOMMAND_ECHOoption to print the command being executed orECHO_OUTPUT_VARIABLE/ECHO_ERROR_VARIABLEto verify the output stream content during the CMake run [1][5].Citations:
Check the command status before using
stderror a fallback version.execute_process()omitsRESULT_VARIABLE, so a failedosm2pgrouting --versioncall with empty output leavesOsm2pgrouting_Vempty. The fallback then sets version3.0.0, allowingfind_package(Osm2pgrouting 2.3.1 REQUIRED ...)to accept an unusable executable. Capture the result and use the fallback only for a documented versionless build.🤖 Prompt for AI Agents