Skip to content

Commit

Permalink
Add say_hello; update index
Browse files Browse the repository at this point in the history
  • Loading branch information
simveit committed Jun 24, 2024
1 parent 902fc58 commit 5b79fcf
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 11 deletions.
3 changes: 2 additions & 1 deletion hello_world_nbdev/_modidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
'doc_host': 'https://simveit.github.io',
'git_url': 'https://github.com/simveit/hello-world-nbdev',
'lib_path': 'hello_world_nbdev'},
'syms': {'hello_world_nbdev.core': {'hello_world_nbdev.core.foo': ('core.html#foo', 'hello_world_nbdev/core.py')}}}
'syms': { 'hello_world_nbdev.core': { 'hello_world_nbdev.core.foo': ('core.html#foo', 'hello_world_nbdev/core.py'),
'hello_world_nbdev.core.say_hello': ('core.html#say_hello', 'hello_world_nbdev/core.py')}}}
7 changes: 6 additions & 1 deletion hello_world_nbdev/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/00_core.ipynb.

# %% auto 0
__all__ = ['foo']
__all__ = ['foo', 'say_hello']

# %% ../nbs/00_core.ipynb 3
def foo(): pass

# %% ../nbs/00_core.ipynb 4
def say_hello(to):
"Say hello to somebody"
return f'Hello {to}!'
45 changes: 39 additions & 6 deletions nbs/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# core\n",
"# Hello world from nbdev\n",
"\n",
"> Fill in a module description here"
"> Hello, world :)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -20,7 +20,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -30,14 +30,35 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"#| export\n",
"def foo(): pass"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"#| export\n",
"def say_hello(to):\n",
" \"Say hello to somebody\"\n",
" return f'Hello {to}!'"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"assert say_hello(\"World\") == \"Hello World!\""
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -51,9 +72,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "python3",
"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,
Expand Down
18 changes: 15 additions & 3 deletions nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -16,7 +16,7 @@
"source": [
"# hello-world-nbdev\n",
"\n",
"> Hello world repo for nbdev"
"> This is a page build with nbdev :)"
]
},
{
Expand Down Expand Up @@ -86,9 +86,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "python3",
"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,
Expand Down
5 changes: 5 additions & 0 deletions nbs/sidebar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
website:
sidebar:
contents:
- index.ipynb
- 00_core.ipynb

0 comments on commit 5b79fcf

Please sign in to comment.