Skip to content

Commit 2e178d5

Browse files
committed
new data structures nb
1 parent 307cd44 commit 2e178d5

File tree

8 files changed

+797
-6
lines changed

8 files changed

+797
-6
lines changed

ElitePython/_modidx.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@
55
'doc_host': 'https://BrunodsLilly.github.io',
66
'git_url': 'https://github.com/BrunodsLilly/ElitePython',
77
'lib_path': 'ElitePython'},
8-
'syms': {'ElitePython.core': {'ElitePython.core.foo': ('core.html#foo', 'ElitePython/core.py')}}}
8+
'syms': { 'ElitePython.core': { 'ElitePython.core.foo': ('core.html#foo', 'ElitePython/core.py'),
9+
'ElitePython.core.say_hello': ('core.html#say_hello', 'ElitePython/core.py')},
10+
'ElitePython.data_structures': { 'ElitePython.data_structures.foo': ( 'data_structures.html#foo',
11+
'ElitePython/data_structures.py'),
12+
'ElitePython.data_structures.say_hello': ( 'data_structures.html#say_hello',
13+
'ElitePython/data_structures.py')}}}

ElitePython/core.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@
33
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/00_core.ipynb.
44

55
# %% auto 0
6-
__all__ = ['foo']
6+
__all__ = ['foo', 'say_hello']
77

88
# %% ../nbs/00_core.ipynb 3
9-
def foo(): pass
9+
def foo():
10+
"""A sample function"""
11+
pass
12+
13+
# %% ../nbs/00_core.ipynb 4
14+
def say_hello(to: str) -> str:
15+
"""
16+
Args:
17+
18+
to (str): Name to say hi to.
19+
"""
20+
return f"Hello {to}!"

ElitePython/data_structures.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""Fill in a module description here"""
2+
3+
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/01_data_structures.ipynb.
4+
5+
# %% auto 0
6+
__all__ = ['foo', 'say_hello']
7+
8+
# %% ../nbs/01_data_structures.ipynb 9
9+
def foo():
10+
"""A sample function"""
11+
pass
12+
13+
# %% ../nbs/01_data_structures.ipynb 10
14+
def say_hello(to: str) -> str:
15+
"""
16+
Args:
17+
18+
to (str): Name to say hi to.
19+
"""
20+
return f"Hello {to}!"

nbs/00_core.ipynb

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"outputs": [],
2626
"source": [
2727
"#| hide\n",
28-
"from nbdev.showdoc import *"
28+
"from nbdev.showdoc import *\n",
29+
"from fastcore.test import *"
2930
]
3031
},
3132
{
@@ -35,7 +36,35 @@
3536
"outputs": [],
3637
"source": [
3738
"#| export\n",
38-
"def foo(): pass"
39+
"def foo():\n",
40+
" \"\"\"A sample function\"\"\"\n",
41+
" pass"
42+
]
43+
},
44+
{
45+
"cell_type": "code",
46+
"execution_count": null,
47+
"metadata": {},
48+
"outputs": [],
49+
"source": [
50+
"#| export\n",
51+
"def say_hello(to: str) -> str:\n",
52+
" \"\"\"\n",
53+
" Args:\n",
54+
" \n",
55+
" to (str): Name to say hi to.\n",
56+
" \"\"\"\n",
57+
" return f\"Hello {to}!\""
58+
]
59+
},
60+
{
61+
"cell_type": "code",
62+
"execution_count": null,
63+
"metadata": {},
64+
"outputs": [],
65+
"source": [
66+
"#| hide\n",
67+
"test_eq(say_hello(\"Hamel\"), \"Hello Hamel!\")"
3968
]
4069
},
4170
{

0 commit comments

Comments
 (0)