forked from RasmussenLab/python_package
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial.py
More file actions
34 lines (26 loc) · 776 Bytes
/
tutorial.py
File metadata and controls
34 lines (26 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# %% [markdown]
# # Python Package tutorial
#
# Run when documentation is build. Building documentation therefore can become
# an minimal integration test for the package.
# %%
from python_package import hello_world
# %% [markdown]
# ## Hello World
# mockup module contains a function which returns a string repeating the 'hello world' string
# n-times.
# %%
ret = hello_world(2)
ret
# %% [markdown]
# Print the string.
# %%
print(ret)
# %% [markdown]
# Inspect the signature. In an interactive session you could also use `hello_world?` to
# display the docstring. See the rendered version
# [of `hello_world` under the Reference](python_package.mockup.hello_world)
# %%
help(hello_world)
# %% [markdown]
# Simple example for a recipe showing what the package can do.