Skip to content

make link checker less strict + fix docs#1008

Merged
Aurashk merged 8 commits intomainfrom
hotfix-ci-multilingual-param
Nov 19, 2025
Merged

make link checker less strict + fix docs#1008
Aurashk merged 8 commits intomainfrom
hotfix-ci-multilingual-param

Conversation

@Aurashk
Copy link
Copy Markdown
Collaborator

@Aurashk Aurashk commented Nov 19, 2025

Description

removes an unrecognised parameter from book.toml so the CI will stop failing.
Also change lychee so it accepts 503 and 203 status codes, currently zenodo is slow for some reason but the link does work

Type of change

  • Bug fix (non-breaking change to fix an issue)
  • New feature (non-breaking change to add functionality)
  • Refactoring (non-breaking, non-functional change to improve maintainability)
  • Optimization (non-breaking change to speed up the code)
  • Breaking change (whatever its nature)
  • Documentation (improve or add documentation)

Key checklist

  • All tests pass: $ cargo test
  • The documentation builds and looks OK: $ cargo doc

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.26%. Comparing base (d58c2f4) to head (0f832f0).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1008   +/-   ##
=======================================
  Coverage   84.26%   84.26%           
=======================================
  Files          52       52           
  Lines        5974     5974           
  Branches     5974     5974           
=======================================
  Hits         5034     5034           
  Misses        695      695           
  Partials      245      245           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Aurashk Aurashk marked this pull request as ready for review November 19, 2025 10:41
@Aurashk Aurashk changed the title remove unrecognised parameter make link checker less strict + fix docs Nov 19, 2025
@Aurashk Aurashk requested review from dalonsoa and tsmbland November 19, 2025 10:41
Copy link
Copy Markdown
Collaborator

@tsmbland tsmbland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Aurashk. Looks like you're cleaning up some of my mess here - I didn't realise the square brackets would be picked up as links in #1004, because the link checker was failing due to the multilingual problem

}

// Enforce transitivity to avoid 3-cycles: x[i][j] + x[j][k] + x[k][i] ≤ 2.
// Enforce transitivity to avoid 3-cycles: `x[i][j]` + x[j][k] + x[k][i] ≤ 2.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the first one to be in backticks and not the other ones?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was overly liberal with the backticks actually, you only need them in the triple slash docs. I think they are fine in the double slash comments

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh makes sense

[book]
authors = ["Alex Dewar"]
language = "en"
multilingual = false
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know what this was for and why it's no longer supported?

Copy link
Copy Markdown
Collaborator Author

@Aurashk Aurashk Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a look at the mdbook docs but can't find a trace of it https://rust-lang.github.io/mdBook/format/configuration/general.html

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feels like it's not really designed for multilingual support since you are meant to specify a main language by doing language = "en" so don't really understand

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange. Oh well, maybe @alexdewar can answer this when he's back since he set this up in the first place

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#05-migration-guide Looks like it was dropped with v0.5 which was released a couple of days ago, although apparently it was never used in the first place

uses: lycheeverse/lychee-action@v2
with:
args: "--verbose --no-progress --exclude-path ^target './**/*.md' './**/*.html'"
args: "--verbose --no-progress --accept 200,203,503 --exclude-path ^target './**/*.md' './**/*.html'"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do these codes mean?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

200: Everything is ok and normal lychee only accepts this one by default

503 Service Unavailable: The server is temporarily overloaded, under maintenance, or otherwise unable to handle the request. The Zenodo link in an md file was returning this and being slow, which was causing a CI failure, but I think should be a pass since it's generally only temporary

203 Non-Authoritative Information: The request succeeded, but the response came from a cache or proxy rather than the origin server. Some CDNs or caching layers return this instead of 200.

}

// Enforce antisymmetry: for each pair (i, j), exactly one of x[i][j] and x[j][i] is 1.
// Enforce antisymmetry: for each pair (i, j), exactly one of x[i][j] and `x[j][i]`` is 1.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Enforce antisymmetry: for each pair (i, j), exactly one of x[i][j] and `x[j][i]`` is 1.
// Enforce antisymmetry: for each pair (i, j), exactly one of x[i][j] and `x[j][i]` is 1.

Copy link
Copy Markdown
Collaborator

@tsmbland tsmbland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!!

@Aurashk Aurashk merged commit 8c8509f into main Nov 19, 2025
8 checks passed
@Aurashk Aurashk deleted the hotfix-ci-multilingual-param branch November 19, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants