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

GRASS GIS Updates and Improvements #24

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

GRASS GIS Updates and Improvements #24

wants to merge 106 commits into from

Conversation

a0x8o
Copy link
Owner

@a0x8o a0x8o commented Dec 2, 2024

Pull Request: GRASS GIS Updates and Improvements

This pull request includes various updates, bug fixes, and improvements to the GRASS GIS project. The changes span across multiple areas, including CI dependencies, documentation, code refactoring, and bug fixes.

CI and Dependency Updates

  • Updated docker/dockerfile Docker tag to v1.12
  • Updated dependency bandit to v1.8.0
  • Updated ruff to v0.8.1

Performance Improvements

  • Implemented faster export with many attributes in v.out.ogr

Documentation Updates

  • Fixed broken HTML tags in manual pages
  • Added RFC 10 on C++17 minimum standard support
  • Made minor edits to v.surf.bspline.html, v.to.3d.html, and v.kernel.html
  • Enabled btree2/kdtree lib doxygen file for Programmer's manual

Code Refactoring and Cleanup

  • Fixed PEP8 issues in various files
  • Removed unused variables in location_wizard/dialogs.py and mapdisp/statusbar.py
  • Refactored va_list usage in debug module

Bug Fixes

  • Fixed Resource Leak issues in link.c, walk.c, and main.c
  • Fixed Copy into buffer size issue in r.water.outlet
  • Used different variable name in r.in.pdal to avoid confusion
  • Replaced HAVE_PDAL_NOFILENAMEWRITER configure definition in r.in.pdal

Other Improvements

  • Added suppression file for false positives and pending fixes

renovate bot and others added 24 commits November 26, 2024 23:42
* v.out.ogr: faster export with many attributes

---------

Co-authored-by: Edouard Choinière <[email protected]>
In order to obtain a good result when converting the HTML manual pages files to markdown, ideally clean HTML code is used.

This PR fixes numerous broken HTML tags identified during a test run of [adding HTML validation with super-linter](echoix#303).

For reference, see logs showing the errors at
https://github.com/echoix/grass/actions/runs/12001379426/job/33451802353?pr=303#step:4:8310

Fixes:
- incomplete tag pairs
- tabs replaced with white space
- fix missing .html extension in URLs
* db/MySQL: fix HTML manual nested `<ul></ul>` element position

Fix `HTMLParser()` class instance find nested `<ul>` end element `</ul>`
error during compilation GRASS GIS source code:

```
Error (IndexError('pop from empty list'))
```

Problematic is nested `<ul></ul>` HTML element inside parent `<ul></ul>`
element:

```
 <ul>
     <li></li>
     <li></li>
      <ul>
          <li></li>
          <li></li>
          <li></li>
      </ul>
 </ul>
```

Expected nested `<ul></ul>` HTML element inside parent `<ul></ul>` is
nested position inside `<li></li>` element.

```
<ul>
    <li></li>
    <li>
        <ul>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </li>
</ul>
```

* Fix typo of key word
* manual: fix more broken HTML tags

In order to obtain a good result when converting the HTML manual pages files to markdown, ideally clean HTML code is used (continuation of #4765).

This PR fixes numerous broken HTML tags identified during a test run of [adding HTML validation with super-linter](echoix#303).

For reference, see logs showing the errors at
https://github.com/echoix/grass/actions/runs/12067630007/job/33651008404?pr=303

Fixes include:
- complete selected ncomplete tag pairs (esp. `<li>`)
- tabs replaced with white space
- `<`, `>`, `&` replaced with their HTML representations

* Apply suggestions from code review

---------

Co-authored-by: Edouard Choinière <[email protected]>
…4783)

with a simple version check in the code to speed up configure process
va_list() macro initializes va_list structure before it's usage,
and each va_list() call has to be accompanied by corresponding
va_end() macro call on the same va_list structure.

By having these macros directly before and after the va_list
structure usage, reduces the number of places we need to keep
track of whether the va_list structure was properly inintialized
or closed.

Signed-off-by: Mohan Yelugoti <[email protected]>
* CI(deps): Update ruff to v0.8.1

* style: Fix RUF055 [*] Plain string pattern passed to `re` function

* style: Fix or ignore os-listdir (PTH208)
Use `pathlib.Path.iterdir()` instead.
Ruff rule: https://docs.astral.sh/ruff/rules/os-listdir/

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edouard Choinière <[email protected]>
…4786)

Enable btree2/kdtree library doxygen documentation for Programmer's manual.

(fixes b5a8683)
@github-actions github-actions bot added the macOS label Dec 17, 2024
renovate bot and others added 21 commits December 19, 2024 16:47
…ring()` (#4840)

`grass.temporal.datetime_math.datetime_to_grass_datetime_string()` checks for `None`, and handles the case where it is `None`, so the `dt` argument can safely be `None`.

This fixes some pylance type checking errors in `_pretifyTimeLabels()`  of gui/wxpython/animation/temporal_manager.py, which rightfully detected that the result of `tgis.string_to_datetime(start)` can be either `datetime` or `None` and that `None` wouldn't be accepted into `datetime_to_grass_datetime_string()`.
…ebra.py (#4842)

Fixes the following Pylance error: Method declaration "test_temporal_select" is obscured by a declaration of the same name
* updated 841

* updated as per review

* update

* unassigned key variable fixed
* Fix Resource Leak issue

* Formatting

* Fix
* style: Fix raw-string-in-exception (EM101)

Exception must not use a string literal, assign to variable first

Produces a clearer stack trace, without duplicating the text of the error message

Ruff rule: https://docs.astral.sh/ruff/rules/raw-string-in-exception/

* style: Fix f-string-in-exception (EM102)
Exception must not use an f-string literal, assign to variable first

Produces a clearer stack trace, without duplicating the text of the error message

Ruff rule: https://docs.astral.sh/ruff/rules/f-string-in-exception/

* style: Fix dot-format-in-exception (EM103)
Exception must not use a `.format()` string directly, assign to variable first

Produces a clearer stack trace, without duplicating the text of the error message

Ruff rule: https://docs.astral.sh/ruff/rules/dot-format-in-exception/

* checks(ruff): Enable checking for EM101, EM102 and EM103 rules

* Fix doctest typo according to current error message
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* style: Fix pointless-string-statement / W0105

Change useless string statement with a comment

Pylint rule: https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/pointless-string-statement.html

* Update plots.py
…4873)

Current code didn't handle the case where angle is 0, nor if out of range (more than 360 degrees). For example, calling with an angle of 375.7 will try to compute the width and height on variables not set yet. This handles these two cases, and short-circuits for an angle of 0 degrees.

Angles greater than 360 degrees can be supported by this, but range documented is kept as is.
Fully type check and annotate convertRGB() and the grass.script.core.parse_color() functions
* Add testsuite files for r.distance

* Added function descriptions

* Stripped Carriage Returns for windows-2019 build and tests

* Changed maps and tuned asserts to rectify earlier build fails

* Corrected maps in 3rd test

* fix for windows build issues and doc correction
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.