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 90 commits into
base: main
Choose a base branch
from
Open

GRASS GIS Updates and Improvements #24

wants to merge 90 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 <27212526+echoix@users.noreply.github.com>
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 <27212526+echoix@users.noreply.github.com>
…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 <ymdatta.work@gmail.com>
* 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 <27212526+echoix@users.noreply.github.com>
…4786)

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

(fixes b5a8683)
renovate bot and others added 11 commits December 12, 2024 23:41
* CI(deps): Update ruff to v0.8.3

* style: Fix if-key-in-dict-del (RUF051)

Ruff rule: https://docs.astral.sh/ruff/rules/if-key-in-dict-del/

When a dictionary's pop() method is used with the second argument (default value), and the second parameter is None, it removes the key from the dict, but doesn't raise a `KeyError` if it didn't exist. The value returned is None.

---------

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

* pytest: Allow default test file naming patterns inside tests folders

* tests: Patch environment variables in xy_session fixture for grassTask test

* Update test_script_task.py

Co-authored-by: Markus Neteler <markus@neteler.org>

* Extract expected value to variable

---------

Co-authored-by: Markus Neteler <markus@neteler.org>
* patch from https://github.com/jef-n/OSGeo4W/blob/master/src/grass/osgeo4w/patch applied

* attempt to fix osgeo4w CI

* re-introduce mingw-w64-x86_64-libpng

* sync with osgeo4w patch

* add NumPy into deps in order to fix some tests

* CI(OSGeo4W): Sort OSGeo4W packages in a multiline list

* Add back matplotlib package

* style: Sort packages and configure flags in mswindows build scripts

* packaging: Removed changes from patch that was removed upstream

jef-n/OSGeo4W@c678c71

* packaging: Apply upstream patch update

jef-n/OSGeo4W@4bd721f

* packaging: Keep --with-libpng with libpng-config from repo

* CI: Split msys2 packages on multiple lines, using pacboy for environment-specific packages

* Remove DLL list as unused after applying latest patch

The dll files are copied with the following line, which doesn't need to use that list anymore

# copy dependencies
cp -uv $(/usr/bin/find apps/grass/grass$POSTFIX -iname "*.dll" -o -iname "*.exe" | PATH=$PWD/apps/grass/grass$POSTFIX/lib:$PWD/bin:/mingw64/bin:/usr/bin /usr/bin/xargs /usr/bin/ldd | /usr/bin/sed -ne 's#^.* => \(/mingw64/bin/.*\) (.*)$#\1#p' | /usr/bin/sort -u) apps/grass/grass$POSTFIX/bin

---------

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
Co-authored-by: Jürgen Fischer <jef@norbit.de>
* Added tests for r.coin module

* Added config file for pytest

---------

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
renovate bot and others added 4 commits December 16, 2024 06:06
This PR contains various HTML updates and textual fixes in preparation for the planned markdown conversion (see also #4748).

For this PR, I have (briefly) reviewed all ~600 GRASS GIS manual pages by converting them to MD for a quality check, and then updated the original HTML files accordingly. Thus it is also a backport candidate for G84.

Changes in detail:

- adding missing intro sentences
- added module name in the first sentence where missing
- http -> https
- selected URL updates for broken URLs
- selected additions in "SEE ALSO" sections
- fix suboptimal HTML formatting (flags, special names, ...)
- add missing keywords on metapages
- remove leftover `Last changed: $Date$` entries from CVS/SVN days
- simplify selected `-<dl><dt>...` to `<ul><li>...` for improved MD conversion
- replaced `<tt>...</tt>` with `<code>...</code>` 

For an easier review, the changes have been submitted in separate commits:

- [x] **db**: 473b95b
- [x] **display**: fca42da
- [x] **doc**: e473bc8
- [x] **general**: 00930f5
- [x] **gui**: e9259cf
- [x] **imagery**: e700a7c, c888dba
- [x] **lib**: 6da27ca
- [x] **misc**: bfa7c0d
- [x] **raster**: 0c5ca83
- [x] **raster3d**: 0c44c95
- [x] **scripts**: e5bd683, 7b70b03
- [x] **temporal**: a173a8f
- [x] **vector**: b5167fa
- [x] **visualization**: 81e9756

Extra changes:
- [x] replaced `<tt>...</tt>` with `<code>...</code>` in 14841b2
- [x] dot product: replaced `.` with `&middot;` f8ea200
- [x] review by @echoix: 1645685 and 6fd0a66
- [x] `utils/g.html2man/htmltags.txt`: dropped outdated file (see instead `utils/g.html2man/ggroff.py`) in 92597b2

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
@github-actions github-actions bot added the macOS label Dec 17, 2024
renovate bot and others added 7 commits December 18, 2024 08:01
… Explicit Imports in __init__.py (#4736)

* update

* Apply suggestions from code review

* renamed temoral to temporal in init

---------

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
Fix wrong message translation in `v.distance`:

"distancia máxima --> distancia mínima"

Fixes #4855
* r.resamo.filter: update manual
renovate bot and others added 5 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
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.