From d3f8de357d05b27254cc9b3e0f7c199d37a8c858 Mon Sep 17 00:00:00 2001 From: Gabriel Stefanini Vicente Date: Thu, 19 Sep 2024 15:43:44 -0400 Subject: [PATCH] Add Hello notebook (#3) * Add Hello notebook * Add Hello implementaiton --- docs/_toc.yml | 20 ++----------- notebooks/hello.ipynb | 64 +++++++++++++++++++++++++++++++++++++++++ src/template/example.py | 2 ++ 3 files changed, 68 insertions(+), 18 deletions(-) create mode 100644 notebooks/hello.ipynb create mode 100644 src/template/example.py diff --git a/docs/_toc.yml b/docs/_toc.yml index 130c2a0..6229bcb 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -2,23 +2,7 @@ format: jb-book root: README parts: - - caption: Examples + - caption: Notebooks numbered: True chapters: - - file: notebooks/world-bank-api.ipynb - - file: notebooks/world-bank-package.ipynb - - file: notebooks/nasa-apod.ipynb - - file: notebooks/bibliography.ipynb - - caption: Gallery - chapters: - - file: docs/gallery - - caption: Additional Resources - chapters: - - url: https://datapartnership.org - title: Development Data Partnership - - url: https://wbdatalab.org - title: World Bank Data Lab - - url: https://www.worldbank.org/en/about/unit/unit-dec - title: World Bank DEC - - url: https://www.worldbank.org/en/research/dime - title: World Bank DIME + - file: notebooks/hello.ipynb diff --git a/notebooks/hello.ipynb b/notebooks/hello.ipynb new file mode 100644 index 0000000..56624c0 --- /dev/null +++ b/notebooks/hello.ipynb @@ -0,0 +1,64 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "dda38dcb-16c3-4d6c-839f-8fe06a52395f", + "metadata": {}, + "source": [ + "# Hello World!" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "327068a2-9e54-46b4-b25e-511168867d81", + "metadata": {}, + "outputs": [], + "source": [ + "from template.example import hello" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "9dcd1e49-f397-4c79-9a4a-593b5c3fe146", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'Hello World!'" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "hello()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.4" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/src/template/example.py b/src/template/example.py new file mode 100644 index 0000000..d0258d6 --- /dev/null +++ b/src/template/example.py @@ -0,0 +1,2 @@ +def hello(): + return "Hello World!"