diff --git a/README.md b/README.md index 4b2b5c9..334b443 100644 --- a/README.md +++ b/README.md @@ -1 +1,26 @@ -This file will be overwritten by `index.ipynb` +# Sugar SDK + + + + +## Getting started + +### Set up and acivate python virtual env + +``` bash +python3 -m venv env +source env/bin/activate +``` + +### Install dependencies + +``` bash +pip install nbdev pre-commit +pip install -e '.[dev]' +``` + +### Install pre-commit hooks for nbdev prep and cleanup + +``` bash +pre-commit install +``` diff --git a/index.ipynb b/index.ipynb deleted file mode 100644 index 67fb056..0000000 --- a/index.ipynb +++ /dev/null @@ -1,192 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#| hide\n", - "from {{lib_path}}.core import *" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# {{repo}}\n", - "\n", - "> {{description}}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "This file will become your README and also the index of your documentation." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Developer Guide" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "If you are new to using `nbdev` here are some useful pointers to get you started." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Install {{lib_path}} in Development mode" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "```sh\n", - "# make sure {{lib_path}} package is installed in development mode\n", - "$ pip install -e .\n", - "\n", - "# make changes under nbs/ directory\n", - "# ...\n", - "\n", - "# compile to have changes apply to {{lib_path}}\n", - "$ nbdev_prepare\n", - "```" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Usage" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Installation" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Install latest from the GitHub [repository][repo]:\n", - "\n", - "```sh\n", - "$ pip install git+https://github.com/{{user}}/{{lib_name}}.git\n", - "```\n", - "\n", - "or from [conda][conda]\n", - "\n", - "```sh\n", - "$ conda install -c {{user}} {{lib_path}}\n", - "```\n", - "\n", - "or from [pypi][pypi]\n", - "\n", - "\n", - "```sh\n", - "$ pip install {{lib_path}}\n", - "```\n", - "\n", - "\n", - "[repo]: {{git_url}}\n", - "[docs]: https://{{user}}.github.io/{{lib_name}}/\n", - "[pypi]: https://pypi.org/project/{{lib_name}}/\n", - "[conda]: https://anaconda.org/{{user}}/{{lib_name}}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Documentation" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Documentation can be found hosted on this GitHub [repository][repo]'s [pages][docs]. Additionally you can find package manager specific guidelines on [conda][conda] and [pypi][pypi] respectively.\n", - "\n", - "[repo]: {{git_url}}\n", - "[docs]: https://{{user}}.github.io/{{lib_name}}/\n", - "[pypi]: https://pypi.org/project/{{lib_name}}/\n", - "[conda]: https://anaconda.org/{{user}}/{{lib_name}}" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## How to use" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Fill me in please! Don't forget code examples:" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "2" - ] - }, - "execution_count": null, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "1+1" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "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.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/settings.ini b/settings.ini index 2d12e3d..379ca56 100644 --- a/settings.ini +++ b/settings.ini @@ -9,7 +9,7 @@ version = 0.0.1 ### OPTIONAL ### -requirements = python-dotenv fastcore +requirements = python-dotenv # dev_requirements = # console_scripts = diff --git a/src/index.ipynb b/src/index.ipynb new file mode 100644 index 0000000..befec01 --- /dev/null +++ b/src/index.ipynb @@ -0,0 +1,49 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Sugar SDK\n", + "\n", + "> Python SDK for sugar" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Getting started\n", + "\n", + "### Set up and acivate python virtual env\n", + "\n", + "```bash\n", + "python3 -m venv env\n", + "source env/bin/activate\n", + "```\n", + "\n", + "### Install dependencies \n", + "\n", + "```bash\n", + "pip install nbdev pre-commit\n", + "pip install -e '.[dev]'\n", + "```\n", + "\n", + "### Install pre-commit hooks for nbdev prep and cleanup\n", + "\n", + "```bash\n", + "pre-commit install\n", + "```" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "python3", + "language": "python", + "name": "python3" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}