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

docs: fix broken HTML #4720

Merged
merged 1 commit into from
Nov 19, 2024
Merged

docs: fix broken HTML #4720

merged 1 commit into from
Nov 19, 2024

Conversation

neteler
Copy link
Member

@neteler neteler commented Nov 19, 2024

This small PR fixes

  • HTML id attributes
  • a href typo

This small PR fixes

- HTML id attributes
- a `href` typo
@neteler neteler added HTML Related code is in HTML docs backport to 8.4 PR needs to be backported to release branch 8.4 labels Nov 19, 2024
@neteler neteler added this to the 8.5.0 milestone Nov 19, 2024
@neteler neteler self-assigned this Nov 19, 2024
@github-actions github-actions bot added raster Related to raster data processing temporal Related to temporal data processing module labels Nov 19, 2024
@neteler
Copy link
Member Author

neteler commented Nov 19, 2024

TravisCI complains about the following but I'll merge anyway:

make[4]: Entering directory '/home/travis/build/OSGeo/grass/python/grass'
make[5]: Entering directory '/home/travis/build/OSGeo/grass/python/grass/app'
mkdir -p /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/app
/usr/bin/install -c -m 644 data.py /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/app/data.py
/usr/bin/install -c -m 644 runtime.py /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/app/runtime.py
/usr/bin/install -c -m 644 __init__.py /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/app/__init__.py
python3 -m py_compile /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/app/data.py
python3 -m py_compile /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/app/runtime.py
  File "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/app/runtime.py", line 142
    if manpath_executable := shutil.which("manpath"):
                           ^
SyntaxError: invalid syntax
make[5]: *** [../../../include/Make/Python.make:5: /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python/grass/app/runtime.pyc] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/home/travis/build/OSGeo/grass/python/grass/app'

and

if [ "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/scripts/g.extension" != "" ] ; then GISRC=/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/demolocation/.grassrc85 GISBASE=/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu PATH="/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/scripts:$PATH" PYTHONPATH="/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/etc/python:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/gui/wxpython:$PYTHONPATH" LD_LIBRARY_PATH="/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/bin:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/scripts:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/lib:/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/lib:" LC_ALL=C LANG=C LANGUAGE=C /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/scripts/g.extension --html-description < /dev/null | grep -v '</body>\|</html>\|</div> <!-- end container -->' > g.extension.tmp.html ; fi
  File "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/scripts/g.extension", line 474
    codecs.open(python_file, "r", encoding="utf8") as in_file,
                                                    ^
SyntaxError: invalid syntax
make[3]: *** [../../include/Make/Html.make:18: g.extension.tmp.html] Error 1
rm g.extension.tmp.html
make[3]: Leaving directory '/home/travis/build/OSGeo/grass/scripts/g.extension'

and

GISBASE="/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu" ARCH="x86_64-pc-linux-gnu" ARCH_DISTDIR="/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu" VERSION_NUMBER=8.5.0dev VERSION_DATE=2024 python3 ./parser_standard_options.py -t "/home/travis/build/OSGeo/grass/lib/gis/parser_standard_options.c" -f "grass" -o "/home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/parser_standard_options.html" -p 'id="opts_table" class="scroolTable"'
Traceback (most recent call last):
  File "./parser_standard_options.py", line 230, in <module>
    options = OptTable(parse_options(cfile.readlines(), startswith=args.startswith))
  File "./parser_standard_options.py", line 99, in parse_options
    res = parse_glines(glines)
  File "./parser_standard_options.py", line 60, in parse_glines
    key, default = (w.strip() for w in split_opt_line(line[5:]))
  File "./parser_standard_options.py", line 43, in split_opt_line
    default = default.removeprefix("_(")
AttributeError: 'str' object has no attribute 'removeprefix'
make[3]: *** [Makefile:178: /home/travis/build/OSGeo/grass/dist.x86_64-pc-linux-gnu/docs/html/parser_standard_options.html] Error 1
make[3]: *** Waiting for unfinished jobs....

@neteler neteler merged commit 25cf476 into OSGeo:main Nov 19, 2024
23 of 24 checks passed
@neteler neteler deleted the manual_fix_broken_html branch November 19, 2024 23:13
neteler added a commit that referenced this pull request Nov 19, 2024
This small PR fixes

- HTML id attributes
- a `href` typo
@neteler neteler removed the backport to 8.4 PR needs to be backported to release branch 8.4 label Nov 19, 2024
@neteler neteler modified the milestones: 8.5.0, 8.4.1 Nov 19, 2024
@echoix
Copy link
Member

echoix commented Nov 19, 2024

The removeprefix tells me something. Are we sure we are using a supported Python version? It should be at least Python 3.9.

@echoix
Copy link
Member

echoix commented Nov 19, 2024

https://docs.python.org/3/library/stdtypes.html#str.removeprefix

Was added in Python 3.9, and it is the minimum required version. (3.13 is out)

@neteler
Copy link
Member Author

neteler commented Nov 19, 2024

The removeprefix tells me something. Are we sure we are using a supported Python version? It should be at least Python 3.9.

Yes, see this new error:

OSGeo/grass-addons#1241 (comment) (grass.osgeo.org is a Debian box)

@echoix
Copy link
Member

echoix commented Nov 19, 2024

But the Travis stack trace failing on str.removeprefix shouldn't be happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs HTML Related code is in HTML module raster Related to raster data processing temporal Related to temporal data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants