Skip to content

Fix two broken documentation links - #187

Merged
caglarpir merged 1 commit into
mapillary:mainfrom
caglarpir:fix-broken-doc-links
Sep 8, 2026
Merged

Fix two broken documentation links#187
caglarpir merged 1 commit into
mapillary:mainfrom
caglarpir:fix-broken-doc-links

Conversation

@caglarpir

Copy link
Copy Markdown
Contributor

Found by crawling every external URL in the built docs site and the repo — 139 distinct URLs checked. Docusaurus only validates internal links, so neither of these was caught by the build.

1. README license badge → 404

https://github.com/mapillary/mapillary-python-sdk/blob/master/LICENSE.txt   404
https://github.com/mapillary/mapillary-python-sdk/blob/main/LICENSE        200

Two problems: the default branch is main, not master, and the file is LICENSE with no extension. This is the target of the MIT License badge at the top of the README, so it is fairly visible.

2. sylvana.net/jpegcrop/exif_orientation.html is gone

Not a 404 — the host does not resolve at all (connection failure). It is cited for the exif_orientation field in three source docstrings and the two generated docs pages built from them.

Replaced with the Wayback snapshot rather than substituting a different source, so the reference still points at the page the docstring was actually written about.

https://web.archive.org/web/2026/https://sylvana.net/jpegcrop/exif_orientation.html   200

The URL sits on its own line in the Python docstrings so no new E501 violations are introduced against the configured max-line-length = 100 — the count stays at the pre-existing 1.

The generated .md files are edited alongside the docstrings they derive from, so the committed docs stay consistent until the next scripts/documentation.py run.

Checked and deliberately not changed

Three things looked broken and are not:

  • /stargazers → 404. GitHub returns 404 to unauthenticated clients for every repo — I confirmed facebook/react/stargazers and mapillary/mapillary_tools/stargazers behave identically. The link is fine.
  • graph.mapillary.com/:image_id, /image_ids?sequence_id=XXX, etc. These are API endpoint examples with placeholders, auto-linkified because they appear as bare URLs in docstrings. The 400/500 responses are the API rejecting :image_id as an ID, which is expected.
  • .../docs/docs/Table Of Contents.md edit link. Resolves 200 once URL-encoded, which is how Docusaurus emits it; my extractor split it on the space.

Test plan

  • flake8 src/mapillary --select=E9,F63,F7,F82 — 0
  • flake8 --select=E501 — 1, unchanged from main
  • pytest — 17 passed
  • Both replacement URLs verified 200

Independent of #186; touches no dependency.

Found by crawling every external URL in the built docs site and the repo;
Docusaurus only validates internal links, so neither of these was caught
by the build.

1. README license badge pointed at
   blob/master/LICENSE.txt -> 404. The default branch is main, and the
   file is LICENSE with no extension. Now blob/main/LICENSE (verified 200).

2. sylvana.net/jpegcrop/exif_orientation.html no longer resolves at all
   (connection failure, not a 404 - the host is gone). It is cited for
   the exif_orientation field in three source docstrings and the two
   generated docs pages built from them. Replaced with the Wayback
   snapshot, which preserves the original page rather than substituting
   a different source.

The archive URL uses the /web/2026/ short form and sits on its own line
in the Python docstrings, so no new E501 violations are introduced
against the project's configured max-line-length of 100 (count stays at
the pre-existing 1).

The generated .md files are edited alongside the docstrings they come
from, so the committed docs match until the next scripts/documentation.py
run regenerates them.

Not changed, having been checked and found to be false positives:
- /stargazers returns 404 to unauthenticated clients for every repo,
  including facebook/react - GitHub blocks it, the link is fine
- graph.mapillary.com/:image_id and similar are API endpoint examples
  containing placeholders, auto-linkified because they appear as bare
  URLs in docstrings
- the 'Table Of Contents.md' edit link resolves once URL-encoded, which
  is how Docusaurus emits it
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 8, 2026
@caglarpir
caglarpir merged commit 0e8e2db into mapillary:main Sep 8, 2026
4 checks passed
@caglarpir caglarpir mentioned this pull request Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant