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

DOC: execute notebooks and ensure they're tested #603

Merged
merged 5 commits into from
Jun 15, 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
5 changes: 4 additions & 1 deletion .github/workflows/test_user_guide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Test User Guide execution
on:
push:
branches: [main]
# pull_request:
# branches:
# - "*"
schedule:
- cron: "0 0 * * 1,4"
workflow_dispatch:
Expand All @@ -27,7 +30,7 @@ jobs:
- name: setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ci/envs/312-dev.yaml
environment-file: ci/envs/312-latest.yaml

- name: Install momepy
run: pip install .
Expand Down
3 changes: 3 additions & 0 deletions ci/envs/312-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ dependencies:
- geopy
- ipywidgets
- Iprogress
- pip
- pip:
- git+https://github.com/geopandas/geopandas.git

13 changes: 3 additions & 10 deletions ci/envs/test_user_guide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,8 @@ python -m ipykernel install --user --name geo_dev

mkdir docs/user_guide/output

jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/user_guide/getting_started.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/user_guide/elements/*.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/user_guide/simple/*.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/user_guide/combined/*.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/user_guide/weights/*.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/user_guide/graph/convert.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/user_guide/graph/network.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/user_guide/graph/coins.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/user_guide/preprocessing/*.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=1000 docs/examples/*.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=-1 docs/user_guide/getting_started.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=-1 docs/user_guide/*/*.ipynb --output-dir docs/user_guide/output
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=-1 docs/examples/*.ipynb --output-dir docs/user_guide/output

rm -rf docs/user_guide/output
1,529 changes: 1,457 additions & 72 deletions docs/examples/clustering.ipynb

Large diffs are not rendered by default.

1,144 changes: 632 additions & 512 deletions docs/user_guide/combined/distribution.ipynb

Large diffs are not rendered by default.

497 changes: 274 additions & 223 deletions docs/user_guide/combined/intensity.ipynb

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions docs/user_guide/elements/blocks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
"ExecuteTime": {
"end_time": "2023-01-09T03:04:20.365731Z",
"start_time": "2023-01-09T03:04:18.395551Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:40.841149Z",
"iopub.status.busy": "2024-06-14T21:54:40.841038Z",
"iopub.status.idle": "2024-06-14T21:54:42.225014Z",
"shell.execute_reply": "2024-06-14T21:54:42.224691Z"
}
},
"outputs": [],
Expand All @@ -39,6 +45,12 @@
"ExecuteTime": {
"end_time": "2023-01-09T03:04:20.510711Z",
"start_time": "2023-01-09T03:04:20.368519Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:42.226913Z",
"iopub.status.busy": "2024-06-14T21:54:42.226744Z",
"iopub.status.idle": "2024-06-14T21:54:42.304459Z",
"shell.execute_reply": "2024-06-14T21:54:42.303941Z"
}
},
"outputs": [],
Expand All @@ -57,6 +69,12 @@
"end_time": "2023-01-09T03:04:20.918189Z",
"start_time": "2023-01-09T03:04:20.514495Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:42.306771Z",
"iopub.status.busy": "2024-06-14T21:54:42.306558Z",
"iopub.status.idle": "2024-06-14T21:54:42.750476Z",
"shell.execute_reply": "2024-06-14T21:54:42.750097Z"
},
"tags": [
"hide_input"
]
Expand Down Expand Up @@ -99,6 +117,12 @@
"end_time": "2023-01-09T03:04:21.152139Z",
"start_time": "2023-01-09T03:04:20.920399Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:42.752870Z",
"iopub.status.busy": "2024-06-14T21:54:42.752603Z",
"iopub.status.idle": "2024-06-14T21:54:42.855072Z",
"shell.execute_reply": "2024-06-14T21:54:42.854242Z"
},
"tags": [
"hide_output"
]
Expand All @@ -124,6 +148,12 @@
"ExecuteTime": {
"end_time": "2023-01-09T03:04:21.158661Z",
"start_time": "2023-01-09T03:04:21.154515Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:42.859539Z",
"iopub.status.busy": "2024-06-14T21:54:42.859361Z",
"iopub.status.idle": "2024-06-14T21:54:42.862441Z",
"shell.execute_reply": "2024-06-14T21:54:42.861749Z"
}
},
"outputs": [],
Expand All @@ -140,6 +170,12 @@
"end_time": "2023-01-09T03:04:21.443993Z",
"start_time": "2023-01-09T03:04:21.161386Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:42.864630Z",
"iopub.status.busy": "2024-06-14T21:54:42.864493Z",
"iopub.status.idle": "2024-06-14T21:54:42.947118Z",
"shell.execute_reply": "2024-06-14T21:54:42.946846Z"
},
"tags": [
"hide_input"
]
Expand Down Expand Up @@ -184,6 +220,12 @@
"end_time": "2023-01-09T03:04:21.810063Z",
"start_time": "2023-01-09T03:04:21.446368Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:42.948896Z",
"iopub.status.busy": "2024-06-14T21:54:42.948764Z",
"iopub.status.idle": "2024-06-14T21:54:43.063020Z",
"shell.execute_reply": "2024-06-14T21:54:43.062593Z"
},
"tags": [
"hide_input"
]
Expand Down Expand Up @@ -231,6 +273,12 @@
"end_time": "2023-01-09T03:04:21.819738Z",
"start_time": "2023-01-09T03:04:21.812137Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:43.065276Z",
"iopub.status.busy": "2024-06-14T21:54:43.065114Z",
"iopub.status.idle": "2024-06-14T21:54:43.067640Z",
"shell.execute_reply": "2024-06-14T21:54:43.067357Z"
},
"tags": [
"remove_cell"
]
Expand All @@ -249,6 +297,12 @@
"end_time": "2023-01-09T03:04:22.031326Z",
"start_time": "2023-01-09T03:04:21.822660Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:43.069210Z",
"iopub.status.busy": "2024-06-14T21:54:43.069099Z",
"iopub.status.idle": "2024-06-14T21:54:43.162924Z",
"shell.execute_reply": "2024-06-14T21:54:43.162591Z"
},
"tags": [
"hide_output"
]
Expand All @@ -268,6 +322,12 @@
"end_time": "2023-01-09T03:04:22.308846Z",
"start_time": "2023-01-09T03:04:22.034348Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:43.164983Z",
"iopub.status.busy": "2024-06-14T21:54:43.164864Z",
"iopub.status.idle": "2024-06-14T21:54:43.241099Z",
"shell.execute_reply": "2024-06-14T21:54:43.240432Z"
},
"tags": [
"hide_input"
]
Expand Down Expand Up @@ -305,6 +365,12 @@
"end_time": "2023-01-09T03:04:22.345948Z",
"start_time": "2023-01-09T03:04:22.314902Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:43.243038Z",
"iopub.status.busy": "2024-06-14T21:54:43.242919Z",
"iopub.status.idle": "2024-06-14T21:54:43.249242Z",
"shell.execute_reply": "2024-06-14T21:54:43.248962Z"
},
"tags": [
"hide_output"
]
Expand All @@ -324,6 +390,12 @@
"end_time": "2023-01-09T03:04:22.718838Z",
"start_time": "2023-01-09T03:04:22.348541Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:43.251167Z",
"iopub.status.busy": "2024-06-14T21:54:43.251038Z",
"iopub.status.idle": "2024-06-14T21:54:43.365566Z",
"shell.execute_reply": "2024-06-14T21:54:43.365270Z"
},
"tags": [
"hide_input"
]
Expand Down Expand Up @@ -364,6 +436,12 @@
"end_time": "2023-01-09T03:04:22.983856Z",
"start_time": "2023-01-09T03:04:22.721169Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:43.367367Z",
"iopub.status.busy": "2024-06-14T21:54:43.367234Z",
"iopub.status.idle": "2024-06-14T21:54:43.436406Z",
"shell.execute_reply": "2024-06-14T21:54:43.436158Z"
},
"tags": [
"hide_output"
]
Expand All @@ -383,6 +461,12 @@
"end_time": "2023-01-09T03:04:23.248623Z",
"start_time": "2023-01-09T03:04:22.986461Z"
},
"execution": {
"iopub.execute_input": "2024-06-14T21:54:43.438032Z",
"iopub.status.busy": "2024-06-14T21:54:43.437946Z",
"iopub.status.idle": "2024-06-14T21:54:43.501412Z",
"shell.execute_reply": "2024-06-14T21:54:43.501149Z"
},
"tags": [
"hide_input"
]
Expand Down
1,375 changes: 778 additions & 597 deletions docs/user_guide/elements/enclosed.ipynb

Large diffs are not rendered by default.

114 changes: 97 additions & 17 deletions docs/user_guide/elements/links.ipynb

Large diffs are not rendered by default.

2,677 changes: 2,138 additions & 539 deletions docs/user_guide/elements/tessellation.ipynb

Large diffs are not rendered by default.

1,803 changes: 1,001 additions & 802 deletions docs/user_guide/getting_started.ipynb

Large diffs are not rendered by default.

Loading