Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Aug 15, 2024
1 parent ba34cfe commit bf4466e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/validate_new_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ jobs:
notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '^docs/core_docs/.*\.ipynb$' || true)
if [ -n "$notebooks" ]; then
for notebook in $notebooks; do
yarn notebook:validate "$notebook"
absolute_path="$GITHUB_WORKSPACE/$notebook"
echo "Validating $absolute_path"
yarn notebook:validate "$absolute_path"
done
else
echo "No notebooks in docs/core_docs to validate."
Expand Down
4 changes: 4 additions & 0 deletions libs/langchain-scripts/src/validate_notebook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ if (!pathname) {
}

const run = async () => {
console.log({
pathname,
processCwd: process.cwd(),
});
if (!pathname.endsWith(".ipynb")) {
throw new Error("Only .ipynb files are supported.");
}
Expand Down

0 comments on commit bf4466e

Please sign in to comment.