[GRASS-dev] GRASS GIS 8.2.1 released

2023-01-26 Thread Markus Neteler
We are pleased to announce that GRASS GIS 8.2.1 was released!

The GRASS GIS 8.2.1 release offers over 80 improvements and bug fixes
compared to the previous release, 8.2.0. The update includes a range
of enhancements to the software’s modules. The graphical user
interface has also seen improvements, with issues being resolved for
the database manager, the image group dialog, the import of PostGIS
and SQLite geometry data, the Postscript-based mapping tool, and the
Single-Window GUI toolbar. For mobile devices, viewport support and
hamburger menu-style table of content have been added to the manual
pages. The PROJ library support received important fixes for area
bounding boxes and longitude estimation. Compatibility fixes for PDAL
2.5.0 have been added as well.

Special thanks to all contributors!

For all changes, see our detailed announcement with the full
contributors and list of features and bugs fixed at GitHub:
https://github.com/OSGeo/grass/releases/tag/8.2.1
Packages and installers are now available for Windows, macOS, Debian,
and Fedora, with more coming soon.

See more at our release announcement:
https://grass.osgeo.org/news/2023_01_21_grass_gis_8_2_1_released/
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] Proposal for using ClangFormat, replacing GNU indent, for C/C++ code formatting

2023-01-26 Thread Nicklas Larsson via grass-dev
Even,
Thanks for the pointer to pre-commit!


All,

The complete GRASS source is now formatted with ClangFormat using the settings 
of the added ‘.clang-format’ file.

I have also added a '.pre-commit-config.yaml’, which facilitates the convenient 
use of ‘pre-commit’ [1].

The pre-commit hooks now supported are:
-  clang-format (for C, C++, JavaScript, JSON, Objective-C)
-  trailing-whitespace
-  end-of-file-fixer
-  markdownlint
-  black
-  flake8


For all developers, I **strongly recommend** installing and using pre-commit. 
It makes life so much easier and unloads considerable amount of unnecessary 
work on the CI runners (oh, Black failed, now ClangFormat too, push again…).

The submitting guides on the wiki has been converted to markdown and are 
awaiting the final destination in source repo [2]. After merge they need to be 
updated accordingly to latest developments.

The question now is, are there any objections to do the same treatment to 
grass-addons)?
There are three PRs in-store [3-5] to make that happen.


Cheers,
Nicklas



[1] https://pre-commit.com
[2] https://github.com/OSGeo/grass/pull/2765
[3] https://github.com/OSGeo/grass-addons/pull/852
[4] https://github.com/OSGeo/grass-addons/pull/853
[5] https://github.com/OSGeo/grass-addons/pull/854




> On 2 Jan 2023, at 19:44, Even Rouault  wrote:
> 
> I'd suggest you use pre-commit so that clang-format is automatically run on 
> git commit operations like we have done with GDAL. Then it is a no-brainer to 
> do changes.
> 
> You need to add a .pre-commit-config.yaml at the root of the repository (only 
> the part referencing clang-format 
> athttps://github.com/OSGeo/gdal/blob/master/.pre-commit-config.yaml#L30 
>  is 
> relevant for you):
> 
> https://github.com/OSGeo/gdal/blob/master/.pre-commit-config.yaml 
> 
> Once that file is in place:
> 
> -  "pip install pre-commit" : just once
> 
> - "pre-commit install": just once per repository
> 
> Cf https://gdal.org/development/dev_practices.html#commit-hooks 
> 
> Even
> 
> Le 02/01/2023 à 19:20, Nicklas Larsson via grass-dev a écrit :
>> Markus,
>> 
>> 
>>> On 2 Jan 2023, at 13:48, Markus Neteler >> > wrote:
>>> 
>>> Hi Nicklas,
>>> 
>>> On Wed, Dec 21, 2022 at 9:25 PM Nicklas Larsson via grass-dev
>>> mailto:grass-dev@lists.osgeo.org>> wrote:
 
 I understand there is agreement on using the .clang-format formatting 
 rules suggested with [1], which I just merged.
 
 I have formatted the whole source base with clang-format v.15.0.6, in 7 
 different PRs [2-8]. I will start merging them tomorrow if there are no 
 objections.
 
 I have also filed a PR [9] which adds a CI check for clang-format errors.
>>> 
>>> Thanks for your efforts on the code reformatting!
>> 
>> :-)
>> 
>>> 
 Installing clang-format is perhaps most easily done with:
 python -m pip install 'clang-format==15.0.6'
 
 Formatting may be done with something like (following works on Mac):
 find -E . -regex '.*\.(cpp|hpp|c|h)' -exec clang-format -i {} \+
>>> 
>>> ... it fails on Linux, though
>>> 
>>> find: unknown predicate `-E')
>> 
>> 
>> I was pretty sure this would deviate from Mac/BSD on Linux systems:
>> 
>> 
>> Try something like (untested):
>> 
>> find . -regex '.*\.(cpp|hpp|c|h)' -exec clang-format -i {} \;
>> 
>> or manually with:
>> clang-format -I 
>> 
>> 
>>> 
 Contribution rules must be updated, I will start putting up a draft ASAP.
>>> 
>>> I am trying to fix the conflicts in
>>> https://github.com/OSGeo/grass/pull/2684 
>>> 
>>> 
>>> Conflicting files:
>>> 
>>> include/grass/iostream/mm.h
>>> lib/db/dbmi_base/dbmscap.c
>>> lib/external/ccmath/ccmath.h
>>> lib/gis/spawn.c
>>> lib/gis/user_config.c
>>> lib/iostream/rtimer.cpp
>>> lib/pngdriver/graph_set.c
>>> lib/rst/interp_float/point2d.c
>>> raster/r.terraflow/filldepr.cpp
>>> raster/r.terraflow/flow.cpp
>>> raster/r.terraflow/main.cpp
>>> raster/r.viewshed/statusstructure.cpp
>>> 
>>> The reason will be the missing clang-format update which I don't know
>>> how to apply on Linux.
>> 
>> Not quite sure what you mean. Did you try:
>> 
>> python -m pip install 'clang-format==15.0.6’
>> 
>> But I suspect any version 15 will do, perhaps even v. 14.
>> 
>> 
>> A tip to use the .clang-format file from main for branches without it:
>> 
>> 1. git checkout main
>> 2. cp .clang-forrmat ../.clang-format
>> 3. check out branch
>> 4. clang-format searches upwards in dir hierarchy  for next ‘.clang-format’ 
>> file
>> 5. run clang-format from grass source dir
>> 
>> 
>> 
>> 
>> ___
>> grass-dev mailing list
>> grass-dev@lists.osgeo.org 
>>