neuroinformatics-unit / movement

Python tools for analysing body movements across space and time
http://movement.neuroinformatics.dev
BSD 3-Clause "New" or "Revised" License
104 stars 8 forks source link

Should `linkcheck` allow redirected URLs or raise these as warnings? #330

Open lochhh opened 2 weeks ago

lochhh commented 2 weeks ago

We currently only have a single redirected URL:

('index', 3295):redirect https://zenodo.org/doi/10.5281/zenodo.12755724 - with Found to https://zenodo.org/records/13711296 Build succeeded (without warnings)

TLDR: Do we want to detect unexpected redirects with linkcheck?

I expected sphinx-build to fail from the above redirect, since we are using the fail-on-warnings mode.
Looking in linkcheck.py, warnings are emitted for unexpected redirects _ONLY IF linkcheck_allowed_redirects is configured_.

In other words, we get the above outputs because linkcheck_allowed_redirects is not configured.

I also just wanted to document this somewhere to avoid going down the same 🐰 🕳️ again 😅

niksirbi commented 2 weeks ago

Thanks for digging this up @lochhh!

I'm unsure tbh. having to keep a "whitelist" of redirects is one more maintenance burden for us, but on the other hand, I'd like to know if a previously valid link now points to something irrelevant/scammy.

Given that there is only one redirect, perhaps slight preference towards having an explicit whiteliest?