weave icon indicating copy to clipboard operation
weave copied to clipboard

docs(weave): Adds GH action to trigger generate_llmstxt.py, testing action

Open J2-D2-3PO opened this issue 1 year ago • 2 comments

Description

Spawned off of https://github.com/wandb/weave/pull/3045. The goal of this PR is to add a GH action to trigger docs/scripts/generate_llmstxt.py created in #3045 and serve as a testing branch for the new action.

What this PR does:

  • [x] Add .github/workflows/generate-llms.yaml to trigger docs/scripts/generate_llmstxt.py
  • [x] In pyproject.toml, add new entry llmspy = ["PyYAML>=6.0"] in [project.optional-dependencies] for use by hatch in creating env to run script
  • [x] Updates docs/scripts/generate_llmstxt.py with logic to get right directory before calling script
  • [x] Removes llms.txt and llms.md so we can test
  • [x] Makes some sort of change to this branch to check that llms.py is properly triggered
  • [ ] Update action logic to work in prod i.e. [on.push.branches]

Testing

  • [x] Locally:
    • [x] In shell, python3 scripts/generate_llmstxt.py -> runs script and generates expected folders in static dir
  • [ ] On branch:
    • [x] Initial commits with GH action + deleted llms.txt and llms.py
    • [x] Make any change to the branch and confirm action triggered
    • [x] Confirm that, upon action triggered, expected files generated

J2-D2-3PO avatar Nov 21 '24 21:11 J2-D2-3PO

@scottire this is about 99% ready to go. Commit history is a little confusing, because I was fumbling around with testing for a bit.

Anyways, confirmed that the llms.txt was autogenerated and pushed to this test branch in https://github.com/wandb/weave/pull/3047/commits/d39df3433edddd6499ee2f2c0cbbdc2bee1a1d83.

So I think the remaining todo here is to update the action logic so that it pushes to main. LMk if you think we should add other logic here.

Once that's done, I was thinking we could just squash and merge into your #3045. LMK if that works

J2-D2-3PO avatar Nov 22 '24 00:11 J2-D2-3PO