Skip to content

Fix missing quotes on Python parameters in remote sensing tutorials#127

Merged
echoix merged 1 commit into
OSGeo:mainfrom
Valyrian-Code:fix/remote-sensing-python-quoting
Jun 3, 2026
Merged

Fix missing quotes on Python parameters in remote sensing tutorials#127
echoix merged 1 commit into
OSGeo:mainfrom
Valyrian-Code:fix/remote-sensing-python-quoting

Conversation

@Valyrian-Code

@Valyrian-Code Valyrian-Code commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

The remote sensing tutorials (EN and PT) had 16 unquoted string parameters in two Python code blocks : r.colors and i.vi, that would raise NameError when executed.

r.colors block (×6 calls in each file):

  • map=landsat8_2024_B2map="landsat8_2024_B2"
  • color=greycolor="grey"

i.vi block:

  • output=Flagstaff_NDVIoutput="Flagstaff_NDVI"
  • viname=ndviviname="ndvi"
  • red=landsat8_2024_B4red="landsat8_2024_B4"
  • nir=landsat8_2024_B5nir="landsat8_2024_B5"

Applied to both GRASS_remotesensing.qmd and GRASS_remotesensing_pt.qmd. The i.pca quoting fix in the same files is covered separately in PR #125.

Copilot AI review requested due to automatic review settings June 3, 2026 05:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates GRASS GIS tutorial Python snippets to pass raster names and color rules as proper string arguments, aligning the examples with grass.script run_command expectations.

Changes:

  • Quote map and color arguments in gs.run_command("r.colors", ...) examples.
  • Quote output, viname, red, and nir arguments in gs.run_command("i.vi", ...) examples.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
content/tutorials/remote_sensing_visualization/GRASS_remotesensing_pt.qmd Fixes Python example arguments by converting unquoted identifiers to strings.
content/tutorials/remote_sensing_visualization/GRASS_remotesensing.qmd Applies the same string-quoting fixes to the English tutorial version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@echoix echoix merged commit 85b80bb into OSGeo:main Jun 3, 2026
1 check passed
@Valyrian-Code Valyrian-Code deleted the fix/remote-sensing-python-quoting branch June 3, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants