From 4bed9f36700a9cd0b7038db0df137e7902a0d955 Mon Sep 17 00:00:00 2001 From: seem Date: Tue, 16 Aug 2022 12:46:07 +1000 Subject: [PATCH] add frontmatter to `core`; add templated vars to `index`; use quarto directive convention --- 00_core.ipynb | 28 ++++++++++++++++++++-------- index.ipynb | 12 ++++++------ 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/00_core.ipynb b/00_core.ipynb index 7f31d3f..d24dd9c 100644 --- a/00_core.ipynb +++ b/00_core.ipynb @@ -1,5 +1,16 @@ { "cells": [ + { + "cell_type": "raw", + "metadata": {}, + "source": [ + "---\n", + "title: core\n", + "output-file: core.html\n", + "description: Fill in a module description here\n", + "---" + ] + }, { "cell_type": "code", "execution_count": null, @@ -10,12 +21,13 @@ ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ - "# module name here\n", - "\n", - "> API details." + "#| hide\n", + "from nbdev.showdoc import *" ] }, { @@ -24,8 +36,8 @@ "metadata": {}, "outputs": [], "source": [ - "#|hide\n", - "from nbdev.showdoc import *" + "#| export\n", + "def foo(): pass" ] }, { @@ -34,8 +46,8 @@ "metadata": {}, "outputs": [], "source": [ - "#|export\n", - "def foo(): pass" + "#| hide\n", + "import nbdev; nbdev.nbdev_export()" ] } ], diff --git a/index.ipynb b/index.ipynb index 0421304..3f07fcf 100644 --- a/index.ipynb +++ b/index.ipynb @@ -6,17 +6,17 @@ "metadata": {}, "outputs": [], "source": [ - "#|hide\n", - "from your_lib.core import *" + "#| hide\n", + "from {{lib_path}}.core import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "# Project name here\n", + "# {{repo}}\n", "\n", - "> Summary description here." + "> {{description}}" ] }, { @@ -38,7 +38,7 @@ "metadata": {}, "source": [ "```sh\n", - "pip install your_project_name\n", + "pip install {{lib_path}}\n", "```" ] }, @@ -86,7 +86,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3.9.7 ('base')", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }