Skip to content

doc: Fix libpython getting-started links#7581

Open
nkgotcode wants to merge 1 commit into
OSGeo:mainfrom
nkgotcode:fix/libpython-getting-started-links
Open

doc: Fix libpython getting-started links#7581
nkgotcode wants to merge 1 commit into
OSGeo:mainfrom
nkgotcode:fix/libpython-getting-started-links

Conversation

@nkgotcode

Copy link
Copy Markdown

Description

Fixes #7451.

This updates the links to the Python introduction and Jupyter introduction from the libpython getting-started page. The linked generated manual pages are one directory above the libpython page, so the links need to use ../.

Motivation and context

The current links resolve under manuals/libpython/, where those generated manual pages do not exist. The target pages exist at manuals/python_intro.html and manuals/jupyter_intro.html.

How has this been tested?

Validated the relative URL resolution and confirmed that both manual source files exist:

$ python3 - <<'PY'
from pathlib import Path
from urllib.parse import urljoin

base = 'https://grass.osgeo.org/grass-stable/manuals/libpython/'
checks = {
    '../python_intro.html': Path('doc/python_intro.md'),
    '../jupyter_intro.html': Path('doc/jupyter_intro.md'),
}
for href, source in checks.items():
    resolved = urljoin(base, href)
    print(f'{href} -> {resolved}')
    print(f'{source}: exists={source.exists()}')
    if not source.exists():
        raise SystemExit(f'missing source: {source}')
print('OK: libpython getting-started links resolve to existing manual sources')
PY
../python_intro.html -> https://grass.osgeo.org/grass-stable/manuals/python_intro.html
doc/python_intro.md: exists=True
../jupyter_intro.html -> https://grass.osgeo.org/grass-stable/manuals/jupyter_intro.html
doc/jupyter_intro.md: exists=True
OK: libpython getting-started links resolve to existing manual sources

Confirmed the published target pages are available:

$ curl -fsSI https://grass.osgeo.org/grass-stable/manuals/python_intro.html
HTTP/2 200

$ curl -fsSI https://grass.osgeo.org/grass-stable/manuals/jupyter_intro.html
HTTP/2 200

Checked the patch formatting:

$ git diff --check

The full Sphinx documentation build was not run locally because this checkout does not have the generated build configuration file required by make -C python/grass/docs checksphinx.

Screenshots (if appropriate)

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • N/A: New feature (non-breaking change which adds functionality)
  • N/A: Breaking change (fix or feature that would cause existing
    functionality to not work as before)

Checklist

  • PR title provides summary of the changes and starts with one of the
    pre-defined prefixes
  • My code follows the code style
    of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • N/A: I have added tests to cover my changes.

@echoix

echoix commented Jun 17, 2026

Copy link
Copy Markdown
Member

Also see #7526

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.

[Bug] manual: GRASS Python Docs > Getting Started lacks two important pages (404)

2 participants