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

Feature: linkcheck-action #534

Conversation

HunterGerlach
Copy link
Contributor

@HunterGerlach HunterGerlach commented Jan 4, 2023

  • Add support for local build and linkchecking of docs
  • Add GitHub Action to automatically check links before prior to publication
  • Minor reformat of Contributing readme
  • Fix existing broken links

Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

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

yes! love this - thank you so much!!!!

@HunterGerlach
Copy link
Contributor Author

@hwchase17 I am running into an issue with the link re-writes. Since they are rewritten from .rst, .md, and .ipynb, they are unable to be found by linkcheck. I put a brute force example in the conf.py of how we could solve this if necessary, but I would much rather have a clean method. Unfortunately, I'm not too well-versed on Sphinx to know if there's a "right" way to do this or not. Any ideas you have would be appreciated.

@HunterGerlach HunterGerlach force-pushed the feature/linkcheck-action branch from 5ff8b7b to da5076d Compare January 4, 2023 22:50
@hwchase17
Copy link
Contributor

@hwchase17 I am running into an issue with the link re-writes. Since they are rewritten from .rst, .md, and .ipynb, they are unable to be found by linkcheck. I put a brute force example in the conf.py of how we could solve this if necessary, but I would much rather have a clean method. Unfortunately, I'm not too well-versed on Sphinx to know if there's a "right" way to do this or not. Any ideas you have would be appreciated.

ah yeah i think we need to use :doc: references everywhere. its also better practice in general so i guess this is a good forcing function

this is a bit tedious - i can take a stab at it tonight while im watching tv :)

@HunterGerlach
Copy link
Contributor Author

I don't mind doing it to free you up for other more important tasks if you just want to do a few so I can see an example or two (e.g. .md and .ipynb).

@hwchase17
Copy link
Contributor

I don't mind doing it to free you up for other more important tasks if you just want to do a few so I can see an example or two (e.g. .md and .ipynb).

i think (not 100%, need to spend some time to be sure) that ":doc:foo <utils/how_to_guides>:" should work?

@HunterGerlach
Copy link
Contributor Author

We'll see...

@HunterGerlach HunterGerlach force-pushed the feature/linkcheck-action branch from 629395d to eb22c7d Compare January 5, 2023 03:21
@HunterGerlach
Copy link
Contributor Author

I don't mind doing it to free you up for other more important tasks if you just want to do a few so I can see an example or two (e.g. .md and .ipynb).

i think (not 100%, need to spend some time to be sure) that ":doc:foo <utils/how_to_guides>:" should work?

I was unable to get it to work with make linkcheck - I think it's because it's checking the pre-compiled links before their extensions change and it gets confused.

I switched to using a dedicated linkchecker instead.

I have removed all broken links, so running this from now on should prevent any broken links from getting into master.

@HunterGerlach HunterGerlach changed the title WIP: Feature/linkcheck-action Feature: linkcheck-action Jan 5, 2023
@HunterGerlach HunterGerlach marked this pull request as ready for review January 5, 2023 03:57
@hwchase17
Copy link
Contributor

@HunterGerlach .... i dont think it is an overstatement to call you a hero for this

im gonna merge this into a dev branch and build a copy of the docs from that (just to check that the build-the-docs action works as expected with this)

@hwchase17 hwchase17 changed the base branch from master to harrison/lint-check January 5, 2023 05:35
@hwchase17 hwchase17 merged commit 859d908 into langchain-ai:harrison/lint-check Jan 5, 2023
hwchase17 added a commit that referenced this pull request Jan 5, 2023
- Add support for local build and linkchecking of docs
- Add GitHub Action to automatically check links before prior to
publication
- Minor reformat of Contributing readme
- Fix existing broken links

Co-authored-by: Hunter Gerlach <hunter@huntergerlach.com>

Co-authored-by: Hunter Gerlach <HunterGerlach@users.noreply.github.com>
Co-authored-by: Hunter Gerlach <hunter@huntergerlach.com>
@HunterGerlach HunterGerlach deleted the feature/linkcheck-action branch January 5, 2023 16:12
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