Skip to content

Commit

Permalink
Update how notebooks are used in docs since they are removed from the…
Browse files Browse the repository at this point in the history
… repository
  • Loading branch information
Diviloper committed Mar 30, 2024
1 parent 4c63833 commit b1a71a6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
20 changes: 20 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,23 @@

html_theme = 'sphinx_book_theme'
html_static_path = ['_static']

import requests


def download_file(url, dest_path):
response = requests.get(url, stream=True)
response.raise_for_status() # Ensure we got a successful response

with open(dest_path, 'wb') as file:
for chunk in response.iter_content(chunk_size=8192):
file.write(chunk)


prefix = "https://raw.githubusercontent.com/MobilityDB/PyMEOS-Examples/main/"
download_file(
f"{prefix}PyMEOS_Examples/AIS.ipynb",
"src/examples/AIS.ipynb")
download_file(
f"{prefix}PyMEOS_Examples/BerlinMOD.ipynb",
"src/examples/BerlinMOD.ipynb")
1 change: 0 additions & 1 deletion docs/src/examples

This file was deleted.

2 changes: 1 addition & 1 deletion docs/src/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Examples
====================

Section under construction. However, you can check the existing examples available in the
`PyMEOS repository <https://github.com/MobilityDB/PyMEOS>`__ and the
`PyMEOS Examples repository <https://github.com/MobilityDB/PyMEOS_Examples>`__ and the
`PyMEOS-Demo repository <https://github.com/Diviloper/PyMEOS-demo>`__.

.. toctree::
Expand Down

0 comments on commit b1a71a6

Please sign in to comment.