Skip to content

Commit

Permalink
Merge pull request #65 from PolicyEngine/docs-check
Browse files Browse the repository at this point in the history
Check for docs errors
  • Loading branch information
nikhilwoodruff authored Dec 19, 2024
2 parents 8b5af39 + 48e72af commit d7fe3cc
Show file tree
Hide file tree
Showing 7 changed files with 7,759 additions and 7,742 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ jobs:
- name: Generate documentation
run: make documentation
env:
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}

- name: Check documentation build
run: |
if [ -d "docs/_build/html" ]; then
echo "Documentation built successfully"
else
echo "Documentation build failed"
exit 1
fi
for notebook in $(find docs/_build/jupyter_execute -name "*.ipynb"); do
if grep -q '"output_type": "error"' "$notebook"; then
echo "Error found in $notebook"
cat "$notebook"
exit 1
fi
done
2 changes: 2 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
- name: Generate documentation
run: make documentation
env:
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}

- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@releases/v3
Expand Down
5 changes: 3 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ copyright: "2025"
logo: logo.png

execute:
execute_notebooks: cache
allow_errors: false
execute_notebooks: force
stderr_output: error
timeout: 600

repository:
url: https://github.com/policyengine/policyengine.py
Expand Down
6 changes: 3 additions & 3 deletions docs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"130.71499538568372"
"130.69994101206225"
]
},
"execution_count": 4,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
Loading

0 comments on commit d7fe3cc

Please sign in to comment.