-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add homepage and example notebook
- Loading branch information
Showing
2 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Mudkip | ||
|
||
A friendly Sphinx wrapper for the rest of us. | ||
|
||
```{toctree} | ||
:hidden: | ||
notebook_example | ||
``` | ||
|
||
```{toctree} | ||
:caption: Project links | ||
:hidden: | ||
GitHub Repository <https://github.com/vberlier/mudkip> | ||
PyPI Package <https://pypi.org/project/mudkip> | ||
``` | ||
|
||
--- | ||
|
||
```{eval-rst} | ||
.. mdinclude:: ../README.md | ||
:start-line: 9 | ||
:end-line: -3 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "scenic-marathon", | ||
"metadata": {}, | ||
"source": [ | ||
"# Notebook example\n", | ||
"\n", | ||
"This page shows that Mudkip handles Jupyter Notebooks out of the box." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"id": "median-penalty", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"8.366600265340756" | ||
] | ||
}, | ||
"execution_count": 3, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"import math\n", | ||
"\n", | ||
"math.sqrt(7 + 63)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "coordinate-resolution", | ||
"metadata": {}, | ||
"source": [ | ||
"You can use the `mudkip develop` command to open the jupyter notebook in the docs directory.\n", | ||
"\n", | ||
"```bash\n", | ||
"$ mudkip develop --notebook\n", | ||
"Watching \"docs\"...\n", | ||
"Server running on http://localhost:5500\n", | ||
"Notebook running on http://localhost:8888/?token=8549b18d...\n", | ||
"```\n", | ||
"\n", | ||
"For more information about how notebooks are handled you can check out the documentation for the [`myst-nb`](https://myst-nb.readthedocs.io/en/latest/) extension. \n", | ||
"\n", | ||
"## A few demos" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"id": "oriented-stevens", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"'Hello'\n", | ||
"'Hello'\n" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"'Hello'" | ||
] | ||
}, | ||
"execution_count": 5, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"print(repr(\"Hello\"))\n", | ||
"print(repr(\"Hello\"))\n", | ||
"\"Hello\"" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"id": "manual-straight", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"i = 0\n", | ||
"i = 1\n", | ||
"i = 2\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"for i in range(3):\n", | ||
" print(f\"{i = }\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"id": "extensive-header", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/plain": [ | ||
"Point(x=1, y=2)" | ||
] | ||
}, | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"output_type": "execute_result" | ||
} | ||
], | ||
"source": [ | ||
"from dataclasses import dataclass\n", | ||
"\n", | ||
"@dataclass\n", | ||
"class Point:\n", | ||
" x: float\n", | ||
" y: float\n", | ||
"\n", | ||
"Point(1, 2)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"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.8.5" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |