Repository navigation
Conversation
|
Todo: check if multiline descriptions are allowed, and picked up by translation code, and by the docs generation, new markdown and maybe the old path too I'm not so sure how to check that. |
|
|
||
| # %module | ||
| # % description: Imports raster data into a GRASS raster map using GDAL library and reprojects on the fly. | ||
| # % description: Imports raster data into a GRASS raster map using GDAL library |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| # % description: Imports raster data into a GRASS raster map using GDAL library | |
| # % description: Imports raster data into a GRASS raster map using GDAL library |
| gs.run_command( | ||
| "r.in.gdal", input=GDALdatasource, flags="j", quiet=True | ||
| ) |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| gs.run_command( | |
| "r.in.gdal", input=GDALdatasource, flags="j", quiet=True | |
| ) | |
| gs.run_command("r.in.gdal", input=GDALdatasource, flags="j", quiet=True) |
| if ( | ||
| options["resolution_value"] | ||
| ): |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| if ( | |
| options["resolution_value"] | |
| ): | |
| if options["resolution_value"]: |
| _( | ||
| "To set custom resolution value, select" | ||
| "'value' in resolution option" | ||
| ) |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| _( | |
| "To set custom resolution value, select" | |
| "'value' in resolution option" | |
| ) | |
| _("To set custom resolution value, select'value' in resolution option") |
| gs.fatal( | ||
| _("Resolution value can't be smaller than 0") | ||
| ) |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| gs.fatal( | |
| _("Resolution value can't be smaller than 0") | |
| ) | |
| gs.fatal(_("Resolution value can't be smaller than 0")) |
| _( | ||
| "Estimated target resolution for input band <{out}>: {res}" | ||
| ).format( |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| _( | |
| "Estimated target resolution for input band <{out}>: {res}" | |
| ).format( | |
| _("Estimated target resolution for input band <{out}>: {res}").format( |
| env["GRASS_REGION"] = gs.region_env( | ||
| n=n, s=s, e=e, w=w | ||
| ) |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| env["GRASS_REGION"] = gs.region_env( | |
| n=n, s=s, e=e, w=w | |
| ) | |
| env["GRASS_REGION"] = gs.region_env(n=n, s=s, e=e, w=w) |
| _( | ||
| "Using given resolution for input band <{out}>: {res}" | ||
| ).format( |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| _( | |
| "Using given resolution for input band <{out}>: {res}" | |
| ).format( | |
| _("Using given resolution for input band <{out}>: {res}").format( |
| env["GRASS_REGION"] = gs.region_env( | ||
| res=res, flags="a", env=env | ||
| ) |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| env["GRASS_REGION"] = gs.region_env( | |
| res=res, flags="a", env=env | |
| ) | |
| env["GRASS_REGION"] = gs.region_env(res=res, flags="a", env=env) |
| ).format( | ||
| out=outfile, | ||
| ns=curr_reg["nsres"], | ||
| ew=curr_reg["ewres"] | ||
| ) |
There was a problem hiding this comment.
[ruff] reported by reviewdog 🐶
| ).format( | |
| out=outfile, | |
| ns=curr_reg["nsres"], | |
| ew=curr_reg["ewres"] | |
| ) | |
| ).format(out=outfile, ns=curr_reg["nsres"], ew=curr_reg["ewres"]) |
| n = gs.float_or_dms( | ||
| srcregion["n"][:-1] | ||
| ) * (-1 if srcregion["n"][-1] == "S" else 1) | ||
|
|
There was a problem hiding this comment.
[pre-commit] reported by reviewdog 🐶
| s = gs.float_or_dms( | ||
| srcregion["s"][:-1] | ||
| ) * (-1 if srcregion["s"][-1] == "S" else 1) | ||
|
|
There was a problem hiding this comment.
[pre-commit] reported by reviewdog 🐶
| e = gs.float_or_dms( | ||
| srcregion["e"][:-1] | ||
| ) * (-1 if srcregion["e"][-1] == "W" else 1) | ||
|
|
There was a problem hiding this comment.
[pre-commit] reported by reviewdog 🐶
|
Here is an AI review of this PR, with the analysis and test results behind the decision to close it: the rewrapped AI review: analysis and test resultsWhy the rewrap breaks the tool
TestGRASS was built from this branch and grass --exec g.parser -s scripts/r.import/r.import.py --interface-descriptionOn the PR's version, stderr: On - Imports raster data into a GRASS raster map using GDAL library and reprojects on the fly.
+ Imports raster data into a GRASS raster map using GDAL library
- <description>bicubic interpolation</description>
- <description>lanczos filter</description>
- <description>bilinear interpolation with fallback</description>
- <description>bicubic interpolation with fallback</description>
- <description>lanczos filter with fallback</description>
- Resolution of output raster map (use with option resolution=value)
+ Resolution of output raster map (use with option
- Force Lat/Lon maps to fit into geographic coordinates (90N,S; 180E,W)
+ Force Lat/Lon maps to fit into geographic coordinates
- Assume that the dataset has the same coordinate reference system (CRS) as the current project
+ Assume that the dataset has the same coordinate referenceThe This is a user-visible regression in Other issues in the diff
About the E501 motivationE501 is in the global Could
|
This is a clean rewrite of #7880. Fixed E501 warnings in r.import.py and properly split long metadata lines using multi-line # % blocks to ensure compatibility with g.parser, as suggested by @echoix.