-
Notifications
You must be signed in to change notification settings - Fork 55
feat: reference docs #640
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
feat: reference docs #640
Conversation
Preview ID generated: preview-hunter-1758679182-cd1c23d |
Preview ID generated: preview-hunter-1758680590-20d9941 |
Preview ID generated: preview-hunter-1758739226-ad8ea45 |
""" | ||
for member in tar.getmembers(): | ||
member_path = path / member.name | ||
if not member_path.is_relative_to(path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any attacks possible via symbolic links? I think the is_relative_to
eliminates them effectively?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah pretty sure. Am less concerned about this since this only becomes an issue if we get MIM'd (github gets hacked) or the ref docs build starts including symlinks (one of us merges a REALLY bad change)
@@ -0,0 +1,14 @@ | |||
"""Main entry point for the Python reference docs build.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol definitely claude generated.
I've only ever seen claude use __main__
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you give a hunter an infinite amount of tokens and time he will eventually rewrite all of python
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start
Preview ID generated: preview-hunter-1758748238-4caa2ef |
Adds a new
reference/
path that centralizes the logic for creating reference documentationFor Python
We can leverage the existing reference docs pipeline thats used within the
langchain
repo, and adapting it to include docs from more sources (see langchain-ai/langchain#33066). More details about how this works are inreference/python/README.md
.For TypeScript
We'll be keeping the existing typedoc library to render references, but we're onshoring the work of consolidating those into one reference site within this repo.
The basic process of how that happens is:
exports
key inpackage.json
New
make
targetsmake build-references
will run scripts to format python + js reference documentation concurrently (which will end up in reference/dist/)make preview-references
will run aforementioned build scripts and start a dev server (this won't work until a vercel project is configured)Vercel Setup
In order for these changes to be reflected on
reference.langchain.com
, a new Vercel project needs to be created (which can happen once this is merged).This was tested against a "test" vercel setup and works as expected, with both reference targets accessible from their respective subpaths