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

make linkcheck doesn't work properly in current layout #35

Open
connorjbracy opened this issue Dec 16, 2021 · 0 comments
Open

make linkcheck doesn't work properly in current layout #35

connorjbracy opened this issue Dec 16, 2021 · 0 comments

Comments

@connorjbracy
Copy link
Contributor

See Makefile in PR #34

For some reason, the doc directory for our sources is set to ./static_root/doc but Sphinx expects it to be at ./doc and this has yet to be addressed. The effect of this discontinuity is that when Sphinx is running, it looks in the incorrect location with relative paths for static files we are serving up. This ultimately is not an issue for the functionality of the website as the links are indeed consistent in the static files generated, but it causes tests such as linkcheck to fail. For this reason, this make command has been modified to accoun for this discontinuity to preserve the validity of the test, but this change may have impact on future modifications to the website's internal structure and/or a fix for this issue, hence the in-line documentation of the problem (which gets printed to the console upon linkcheck's failure).

Here's what the make command was prior to this modification (and likely should be converted back to after addressing the issue):

$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
      "or in $(BUILDDIR)/linkcheck/output.txt."

Here's an overview of the logic for circumventing the issue:

  1. Attempt to create the symlink to the actual doc directory in the location that Sphinx expects it to be.
    1. Success
      1. Run linkcheck as we've properly configured our local structure to be what Sphinx expects.
      2. Delete the symlink hack/patch, regardless of linkcheck's success as we know we create ./doc as a symlink in (1) (as opposed to it being a directory containing its own data possibly created at a later time without knowledge of this fix).
    2. Failure
      1. Do no proceed and let this message be printed for future debugging/maintainance effors.
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

No branches or pull requests

1 participant