qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.59k stars 3.01k forks source link

QGIS loads out-of-date GRASS docs from the web #53105

Closed AlisterH closed 1 year ago

AlisterH commented 1 year ago

What is the bug or the crash?

A set of html docs is bundled with GRASS, however QGIS does not load them, at least on Windows.

Steps to reproduce the issue

  1. When a QGIS profile is initially created, the Configuration\GRASS_HELP_PATH setting is created, with its value based on this line of code in Grass7Utils.py:
            # GRASS not available!
            return 'https://grass.osgeo.org/grass78/manuals/'
  2. Current versions of QGIS bundle GRASS 82, so this causes QGIS to load out-of-date docs from the GRASS website when clicking the help button in a processing algorithm.
  3. Manually updating the setting in QGIS3.ini makes QGIS load the currently up-to-date docs.
  4. Updating the code to this means newly created profiles load the currently up-to-date docs:
            # GRASS not available!
            return 'https://grass.osgeo.org/grass82/manuals/'
  5. But updating Grass7Utils.py does not affect existing profiles.

It would of course be better if QGIS could load the docs installed with whatever version of GRASS it is using.

Versions

QGIS version 3.30.2-'s-Hertogenbosch QGIS code revision 0992b533 Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.6.4 PROJ version 9.2.0 EPSG Registry database version v10.082 (2023-02-06) GEOS version 3.11.2-CAPI-1.17.2 SQLite version 3.41.1 PDAL version 2.5.2 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.13.1 OS version Windows 10 Version 2009

Active Python plugins annotationManager 0.5 annotation_labels 1.0.1 AnotherDXF2Shape 1.2.7 changeDataSource 3.1 civilplan 1.0 coveragebuilder version 0.5.0 Equal_area_slope_QGIS_Plugin 0.1 file_management 0.1 geometry_paster 0.2 joinmultiplelines Version 0.4.1 layout_panel-main 0.3 MemoryLayerSaver 4.0.4 nominatim 1.4.5 pathfinder version 0.4.2 plugin_reloader 0.9.3 precisioncursor4qgis-main 0.2E QCopycanvas 0.7 qgis_resource_sharing 1.0.0 quick_map_services 0.19.33 valuetool 3.0.15 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99

Supported QGIS version

New profile

Additional context

No response

AlisterH commented 1 year ago

FWIW I also note this code for *nix in Grass7Utils.py, which looks out of date as it does not include grass 8.2. Perhaps it could even be future-proofed by adding future grass versions:

            cmdList = [
                "grass80", "grass78", "grass76", "grass74", "grass72", "grass70", "grass",
                "grass80.sh", "grass78.sh", "grass76.sh", "grass74.sh", "grass72.sh", "grass70.sh", "grass.sh"
            ]

And this for Mac: for version in ['', '8', '7', '80', '78', '76', '74', '72', '71', '70']:

neteler commented 1 year ago

Two remarks:

Startup of GRASS GIS:

Manual pages:

AlisterH commented 1 year ago

Two remarks:

Startup of GRASS GIS:

  • the GRASS GIS start script has been renamed to grass (versionless) some time ago. This will simplify the code cited above.

It hasn't been renamed on windows.