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

CI/CD updates #9

Merged
merged 66 commits into from
Jul 10, 2024
Merged

CI/CD updates #9

merged 66 commits into from
Jul 10, 2024

Conversation

a0x8o
Copy link
Owner

@a0x8o a0x8o commented Jul 1, 2024

CI: add nix package build test (https://github.com/OSGeo/grass/pull/3906[)](https://github.com/a0x8o/grass/commit/3986103fdf2c94fd1a6a1b34c06f24b2fb059abf)

imincik and echoix committed 4 days ago
CI(deps): Pin dependencies (https://github.com/OSGeo/grass/pull/3932[)](https://github.com/a0x8o/grass/commit/ab79e435cc6b1348d1d8a48d0eb12b5dc3e0ece1)

CI: Initial code coverage configuration with Codecov (https://github.com/OSGeo/grass/pull/3905[)](https://github.com/a0x8o/grass/commit/6748067af1479c914a512084e6f5f412fe4fde3c)

r.horizon: change JSON format (https://github.com/OSGeo/grass/pull/3888[)](https://github.com/a0x8o/grass/commit/cb0e431f06ed982adb75d0408eec9c5e03b3330c)

d.histogram: Initialize range_dmin and range_dmax to fix uninitialize…

CI(deps): Update github/codeql-action action to v3.25.11 (https://github.com/OSGeo/grass/pull/3938[)](https://github.com/a0x8o/grass/commit/fb52c5b3924e143e10282ed71eb6cc3508a9e664)

CI(deps): Update dependency PDAL/PDAL to v2.7.2 (https://github.com/OSGeo/grass/pull/3937[)](https://github.com/a0x8o/grass/commit/9e87f51dd7efaae0d4f45ab6238ca7f1ecfe41bf)

Checks: fix flake8 E741 in gui/wxpython directory (https://github.com/OSGeo/grass/pull/3926[)](https://github.com/a0x8o/grass/commit/b5bfcd576541c1b4d43187c4d66ff0024167bab1)

d.histogram: Fix dead store warnings in bar.c (https://github.com/OSGeo/grass/pull/3927[)](https://github.com/a0x8o/grass/commit/373800152d4f3b70639e2a7b1942f03b06c2c51b)

style: Fixes unnecessary-collection-call (C408) for remaining code (OSGeo#3948

style: Fixes manual-from-import (PLR0402) (https://github.com/OSGeo/grass/pull/3949[)](https://github.com/a0x8o/grass/commit/85b047f439be2b573e96104fb43f3141fa49bd69)

style: Fixes unnecessary-collection-call (C408) for testsuite (OSGeo#3947

style: Fixes if-stmt-min-max (PLR1730) (https://github.com/OSGeo/grass/pull/3950[)](https://github.com/a0x8o/grass/commit/ce1a43cb8b45e70f41540887a8a073e32227a517)

style(gui): Fixes literal-membership (PLR6201) (https://github.com/OSGeo/grass/pull/3952[)](https://github.com/a0x8o/grass/commit/2ae07bc17e275949c7963eac3659f883bffb70da)

style(temporal): Fixes literal-membership (PLR6201) (https://github.com/OSGeo/grass/pull/3953[)](https://github.com/a0x8o/grass/commit/614e1e78339adb5bdf3576d36c80623c497340fe)

style: Fixes literal-membership (PLR6201) for other code (https://github.com/OSGeo/grass/pull/3954[)](https://github.com/a0x8o/grass/commit/ffa270b5aba362b3d6526b33d10e313863f333ad)

style: Fixes sys-exit-alias (PLR1722) (https://github.com/OSGeo/grass/pull/3951[)](https://github.com/a0x8o/grass/commit/a9d9dc48965b6715d5650f6c1de851a8d64b2744)

docker: Downgrade PDAL to 2.7.1 in ubuntu_wxgui (https://github.com/OSGeo/grass/pull/3946[)](https://github.com/a0x8o/grass/commit/7a1c8d97bac286865bbb92fe22a18afd8345667c)

style: Manual fixes for single-line-implicit-string-concatenation vio…

style: Fixes useless-return (PLR1711) (https://github.com/OSGeo/grass/pull/3955[)](https://github.com/a0x8o/grass/commit/a9f81f412e41ece8e8f2be51b1842672fade49d1)

style: Fixes useless-exception-statement (PLW0133) (https://github.com/OSGeo/grass/pull/3957[)](https://github.com/a0x8o/grass/commit/734c93d0b22c2cdc72e98dffa5fa18ba22492823)

style(temporal): Sort and group imports (https://github.com/OSGeo/grass/pull/3959[)](https://github.com/a0x8o/grass/commit/4f1b89778884a93b160d89019a5993cee94033a8)

style: Fixes unnecessary-collection-call (C408) for empty collections (OSGeo#3945

echoix and ninsbl committed 16 hours ago
style: Fix single-line-implicit-string-concatenation violations (ISC0…

i.landsat.acca: Fix uninitialized variable issue (https://github.com/OSGeo/grass/pull/3958[)](https://github.com/a0x8o/grass/commit/939ed83731a767b3c596d8f7d7c659dd847c6cfc)

style: fix missing whitespace between operators (https://github.com/OSGeo/grass/pull/3967[)](https://github.com/a0x8o/grass/commit/7cf68ef7092cc272c683d3d51a1bd766f0bc514f)

imincik and others added 26 commits June 27, 2024 17:33
* CI: add nix package and dev environment test

* nix: exclude more files from package source

---------

Co-authored-by: Edouard Choinière <[email protected]>
… value warnings in bar.c (#3923)

The change satisfies the warning and does not change the behavior. The initial values (garbage or 0) are actually not used. `is_fp` conditions are used to set the values and drive their use (so that the initial values are not used).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Rename self.l to self.item_attr when using self.l as an argument to wx.ItemAttr().

* Rename l to layer when using l for loop through layer list.

* Rename l to new_layer_lst when using l as an argument to self._tree.AddLayer().

* Rename l to rli_conf when looping through the configuration files in self.rlipath.

* Rename l to layer when looping through the self.map_.GetListOfLayers().

* Rename l to dataset_info when sorting `allDatasets` with the lambda function.

* Rename l to layer_num when looping through `catsDict.items()`.

* Rename l to layer when retrieving layer information in a function.

* Rename l to curr when looping through the `curr_sel_ls`.

* Remove E741 for files in gui/wxpython directory.
* d.histogram: Remove unnecessary assignment of draw variable in bar.c
…3948)

* style: Fixes unnecessary-collection-call (C408) for remaining code

Only applies fixes to non-empty collections by  `ruff check --select "C408" --unsafe-fixes --output-format=concise --fix` in order to limit the review scope.

* style: Apply black formatting

Separated in another commit for easier review of only the original changes without formatting

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

Only applies fixes to non-empty collections by  `ruff check --select "C408" --unsafe-fixes --output-format=concise --fix` in order to limit the review scope.

* style: Fixes unnecessary-collection-call (C408) for gui/wxpython/psmap/instructions

* style: Adjust comment in gui/wxpython/psmap/instructions

* style: Remove comment in gui/wxpython/psmap/instructions
Concerns Pylint rule "consider-using-from-import / R0402"

Using `ruff check --output-format=concise --select PLR0402 --fix`.
* style: Fixes unnecessary-collection-call (C408) for testsuite

Only applies fixes to non-empty collections by  `ruff check --select "C408" --unsafe-fixes --output-format=concise --fix --config 'include = ["*/testsuite/**.py"]'` in order to limit the review scope.

* style: Apply black formatting

Separated in another commit for easier review of only the original changes without formatting
Concerns Pylint rules "consider-using-min-builtin / R1730" and "consider-using-max-builtin / R1731"

Using `ruff check --output-format=concise --select PLR1730 --preview --fix`.
* style(gui/wxpython): Fixes literal-membership (PLR6201)

Concerns Pylint rule "use-set-for-membership / R6201"

Using `ruff check --output-format=concise --select PLR6201 --preview --unsafe-fixes --fix gui/`.

* style: Apply single element in set formatting
Concerns Pylint rule "use-set-for-membership / R6201"

Using `ruff check --output-format=concise --select PLR6201 --preview --unsafe-fixes --fix 'temporal/' 'python/grass/temporal'`.
Concerns Pylint rule "use-set-for-membership / R6201"

Using `ruff check --output-format=concise --select PLR6201 --preview --unsafe-fixes --fix`, but reverting some changes where it wasn't clear if it was safe.
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) (#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
…#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 <[email protected]>
…01) (#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
renovate bot and others added 29 commits July 4, 2024 11:48
Reduce scope of 'bg_w' variable in d.legend.vect/draw.c

Co-authored-by: Shubham Vasudeo Desai <[email protected]>
Fix uninitialized variable 'encoding' in parser_interface.c

Co-authored-by: Shubham Vasudeo Desai <[email protected]>
* 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`) (#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
…ft.c (#3973)

imagery: Fix uninitialized struct member 'ngbr_rc.next' in mean_shift.c

Co-authored-by: Shubham Vasudeo Desai <[email protected]>
…3974)

* Fix uninitialized struct member error in region_growing.c

Co-authored-by: Shubham Vasudeo Desai <[email protected]>
Co-authored-by: Shubham Vasudeo Desai <[email protected]>
…p, dp_max, dm, and dm_max to 0.0 (#3995)

Fixed uninitialized variable warning in dmax.c by initializing dp, dp_max, dm, and dm_max to 0.0.
* temporal: Actually call dbif.close() to fix pylint pointless-statement (W0104)

* g.extension: Fix pylint pointless-statement (W0104)

* temporal: Fix pointless-statement (W0104) in temporal_granularity

* temporal: Fix pointless-statement (W0104) in c_libraries_interface.py, _read_vector_history() function

* i.atcorr: Remove useless and non-working print statements in create_iwave.py

* python(grass.imaging): Use PIL.__version__ call to fix pylint pointless-statement

* style: Ignore ruff useless-expression (B018) for a gunittest data file. Equivalent to pylint pointless-statement / W010

* style: Enable ruff useless-expression (B018) (equivalent to pylint pointless-statement / W010)
Using `ruff check --output-format=concise --preview --select UP022 --unsafe-fixes --fix`
…ue (SIM211) (#3999)

Relates to pylint rule simplifiable-if-expression / R1719
* python(grass.temporal): Fix pylint try-except-raise (W0706)

Do not catch exception only to raise it again

* gui/wxpython/core/utils: Fix pylint try-except-raise (W0706)

* python: Fix pylint try-except-raise (W0706)

* style: Enable ruff useless-try-except (TRY302) as fixed
When iterating over a dictionary with dict.items() but discarding either the values or the keys, dict.values() or dict.keys() should be used instead
* style: Fix not-is-test (E714)

* style: Fix not-in-test (E713)
Fix uninitialized variable issue in o_var.c

Co-authored-by: Shubham Vasudeo Desai <[email protected]>
@a0x8o a0x8o merged commit 87b6ac0 into a0x8o:main Jul 10, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants