Skip to content

Commit

Permalink
Fix api reference generation (#162)
Browse files Browse the repository at this point in the history
* Fix changelog generation

* Fix

* fix linux

* Update action.yml
  • Loading branch information
nicoloboschi authored Dec 19, 2023
1 parent 0806ecf commit 401e756
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/actions/deploy-api-reference/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ runs:
./scripts/generate-api-reference.sh "${{ inputs.ragstack-version }}"
mv dist/api_reference /tmp/api_reference
git checkout gh-pages
ls -la /tmp/api_reference/${{ inputs.ragstack-version }}/langchain
mkdir -p api_reference/${{ inputs.ragstack-version }}
mv /tmp/api_reference/${{ inputs.ragstack-version }}/langchain api_reference/${{ inputs.ragstack-version }}/langchain
if [ -z "$(git status --porcelain)" ]; then
echo "Git directory is clean, nothing changed"
Expand All @@ -30,4 +32,4 @@ runs:
git add -A
git commit -m "Update api reference"
git pull --rebase origin gh-pages
git push origin gh-pages
git push origin gh-pages
6 changes: 6 additions & 0 deletions scripts/generate-api-reference.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ clone_lc() {
git clone https://github.com/langchain-ai/langchain.git --branch v${langchain_version} --depth 1 /tmp/lc
}
install_requirements() {
# remove experimental up 0.0.350
sed -i '' '/-e libs\/experimental/d' docs/api_reference/requirements.txt || sed -i '/-e libs\/experimental/d' docs/api_reference/requirements.txt
cat docs/api_reference/requirements.txt
sed -i '' '/_build_rst_file(package_name="experimental")/d' docs/api_reference/create_api_rst.py || sed -i '/_build_rst_file(package_name="experimental")/d' docs/api_reference/create_api_rst.py
# remove experimental 0.0.351 onwards
rm -rf libs/experimental
poetry run pip install -r docs/api_reference/requirements.txt
}
build_docs() {
Expand Down

0 comments on commit 401e756

Please sign in to comment.