docs(weave): Adds GH action to trigger generate_llmstxt.py, testing action
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.yamlto triggerdocs/scripts/generate_llmstxt.py - [x] In
pyproject.toml, add new entryllmspy = ["PyYAML>=6.0"]in[project.optional-dependencies]for use by hatch in creating env to run script - [x] Updates
docs/scripts/generate_llmstxt.pywith 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 instaticdir
- [x] In shell,
- [ ] 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
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=1d1a1c2fe19899c71a378e043857290820a94afd
@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