Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for docs errors #65

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading