Skip to content
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

Image group dict #10

Open
wants to merge 935 commits into
base: main
Choose a base branch
from
Open

Image group dict #10

wants to merge 935 commits into from

Conversation

ninsbl
Copy link
Owner

@ninsbl ninsbl commented May 31, 2024

PR to run tests in my fork...

echoix and others added 30 commits June 30, 2024 20:44
Using  `ruff check --select "PLR1722" --unsafe-fixes --output-format=concise --fix`.
When building the image, only PROJ 8.2.1 is available, and PDAL 2.7.2 checks for PROJ 9.0+. Reverting until the Dockerfile is modified to include PROJ 9.0+
…lations (ISC001) (OSGeo#3944)

* style: Manual fixes for single-line-implicit-string-concatenation violations (ISC001)

Applies the remaining fixes that weren't picked up by `ruff check --select "ISC001" --fix` in order to limit the review scope.

* style: Manual fixes for single-line-implicit-string-concatenation violations (ISC001) in ctypesgen code

Applies the remaining fixes that weren't picked up by `ruff check --select "ISC001" --fix` in order to limit the review scope.
Concerns Pylint rule "useless-return / R1711"

Using `ruff check --output-format=concise --select PLR1711 --fix`.
Concerns Pylint rule "pointless-exception-statement / W0133"

Using `ruff check --output-format=concise --select PLW0133 --unsafe-fixes --fix`.
* style(temporal): Sort and group imports

Uses a combination of `ruff check --output-format=concise --select I --fix 'temporal/' 'python/grass/temporal'`, `isort --profile=black temporal python/grass/temporal` and `black .`

* style(temporal): Sort and group imports for __init__.py
…OSGeo#3945)

* style: Fixes unnecessary-collection-call (C408) for empty collections

Only applies fixes to empty collections by  `ruff check --select "C408" --unsafe-fixes --fix --config "lint.flake8-comprehensions.allow-dict-calls-with-keyword-arguments = true"` in order to limit the review scope.

* style: apply black

* Apply suggestions from code review

---------

Co-authored-by: Stefan Blumentrath <stefan.blumentrath@gmx.de>
…01) (OSGeo#3943)

* style: Fix single-line-implicit-string-concatenation violations (ISC001)

Only applies safe fixes with `ruff check --select "ISC001" --fix` in order to limit the review scope.

* style: Apply black formatting

Separated in another commit for easier review of the changes of the first commit
Co-authored-by: Shubham Vasudeo Desai <sdesai8@vclvm179-48.vcl.ncsu.edu>
Concerns Pylint rule "unnecessary-lambda / W0108"

Using `ruff check --output-format=concise --select PLW0108 --preview --fix --unsafe-fixes`.

Didn't apply to cases where it wasn't clear if it was safe
…ep.cpp (OSGeo#3966)

Fix uninitialized variable 'flowpq' in raster/r.terraflow/sweep.cpp

Co-authored-by: Shubham Vasudeo Desai <sdesai8@vclvm177-241.vcl.ncsu.edu>
Use parson to add json output format support to the r.profile module.
* Rename l to line when using `f.readlines()`.

* Remove "l"s from parameters since they aren't used.

* Rename "l" to "lx" to assign a lexer object.

* Add "# noqa: E741" as renaming parameters won't be applicable in this case.

* Rename "l" to "ln" as line number.

* Rename "l" to "layer" when looping through the layer list.

* Remove E741 for files in the 'locale', `python`, and `scripts` directory.

* Rename "ln" to "line_number".
* Add JSON support to r.univar

Use parson to add json output format support to the r.univar module.

* Apply suggestions from code review

---------

Co-authored-by: Nicklas Larsson <n_larsson@yahoo.com>
* Add JSON support to v.univar

Use parson to add json output format support to the v.univar module.

* update percentile format

* rename test file
…o#3979)

Reduce scope of minreg and maxreg variables in d.labels/main.c

Co-authored-by: Shubham Vasudeo Desai <sdesai8@vclvm178-253.vcl.ncsu.edu>
Reduce scope of 'bg_w' variable in d.legend.vect/draw.c

Co-authored-by: Shubham Vasudeo Desai <sdesai8@vclvm178-253.vcl.ncsu.edu>
…eo#3975)

Fix uninitialized variable 'encoding' in parser_interface.c

Co-authored-by: Shubham Vasudeo Desai <sdesai8@vclvm178-253.vcl.ncsu.edu>
* CI(ruff): Fix typo in ruff suggestions

* CI(ruff): Upload suggestions even if not all linting errors were fixed

* CI(ruff): Try suggesting more changes

* CI(ruff): Upload suggestions even if not all linting errors were fixed but do not run when cancelled
…grass.script as gs`) (OSGeo#3981)

* style: Unignore unconventional-import-alias (ICN001) ruff rule

* style: Use convention `import matplotlib as mpl`

* style: Use convention `import numpy as np`

* style: Use convention `import grass.script as gs`

* test: Remove unused grass.script in test file

* style: Add missing alias to `import grass.script as gs`

* style: Alias `import grass.script as gs` when already imported at file-level

* Remove duplicated grass.script lazy import in wxpython/gui_core/ghelp.py
renovate bot and others added 30 commits August 28, 2024 15:42
…SGeo#4245)

r3.showdspf: fix null pointer dereference

In the current execution, when we face an error while trying
to open a database file, as part of error log we are dereferencing
a NULL file pointer (which is returend when we try to open a file).
Ideally we should be printing the name of the database file rather
than the file pointer. This fixes the problem of null pointer
dereference. Found via cppcheck tool.

Signed-off-by: Mohan Yelugoti <ymdatta.work@gmail.com>
color2 pointer is not initialized and it is assigned a value
depending on a conditional. Potentially, in an execution path
if conditional fails, we would be accessing an uninitialized
pointer, whose behavior is undefined. Initialize the pointer
to NULL to avoid this.

Signed-off-by: Mohan Yelugoti <ymdatta.work@gmail.com>
Clarify using different backends
Fix icons
…eo#4251)

Currently, if 'HAVE_OGR' macro is defined, as part of execution, we sort all formats by name using qsort. But, array containing all formats is assigned based on a conditional and if the conditional fails, it can be NULL.

Behavior of qsort when a NULL array is provided is undefined. To avoid getting into that situation, check if the array is NULL before performing qsort on it.

Signed-off-by: Mohan Yelugoti <ymdatta.work@gmail.com>
Co-authored-by: Vaclav Petras <wenzeslaus@gmail.com>
…e smaller than 0.0 (OSGeo#4263)

Display pixels or raster region rows,cols are likely be on the order of 500, while projected map units are often in the millions, so pixels/meter factor can end up as a very small number. This patch edits an unused in the production code debug helper function to not round that division into a confusing 0.0, as well as some whitespace tweaks to make it more readable.
* docker: fix missing library in ubuntu wxgui Dockerfile

Add `libgtk-3-dev` to fix

```
...
checking for GTK+ - version >= 3.0.0... Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
```

* also install 'python3-wxgtk4.0'
* lib: deprecate G_snprintf() and replace with C99 snprintf()

Beginning with UCRT in Visual Studio 2015 and Windows 10, the behaviour of snprintf (and vsnprintf) is now C99 standard conformant.

Thus, the output is now always null-terminated. The justification for a internal fix for that is no longer needed.

* r3.out.bin: fix -Werror=sizeof-pointer-memaccess GCC warning

* cast explicitly

* add missing #include
* add support for Int8 from GDAL >= 3.7

* add int8 test (skiped if GDAL < 3.7)
* Fix F841 problems in `scripts` directory

* Update `.flake8` with fixes for F841

* Remove unused lines based on reviewed suggestions
Path setup for ISIS was lost in GIS variable setup. This moves it to the library, where other paths and integrations are initialized.

The variables are left as is, without further testing.
This patch continues the work from 917ba58. It's a good
practice to immediately reset the file pointer once we
do fclose on it, as it prevents using/closing descriptor
allocated to another file in the future execution paths.

Signed-off-by: Mohan Yelugoti <ymdatta.work@gmail.com>
This reverts commit 3635ea8.
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.