diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..6fba074 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,10 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) +# and commit this file to your remote git repository to share the goodness with others. + +# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart + +tasks: + - init: pip install . + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b23a5e..988c225 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,7 +26,9 @@ pip install -e '.[dev]' And install quarto too: ``` -nbdev_install_quarto +sudo apt update +sudo apt install tmux -y + ``` Then, after you make subsequent changes to `nbs/index.ipynb`, run the following from the repo's root directory to (re)build `README.md`: diff --git a/README.md b/README.md index 3c9313e..18fe870 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,60 @@ ssage --provider openai --model gpt-4o-mini "explain this error" ssage --history-lines 50 "what commands did I just run?" ``` +# Developer Setup Guide + +## Prerequisites + +- Python 3.9+ +- pip +- nbdev (latest version) +- Quarto (for documentation generation) + +## Installation + +1. Install the development dependencies: + +``` sh +# installing all dependencies +pip install -e '.[dev]' +nbdev_install_quarto +``` + +2. Set up the tmux environment for development: + +**Ubuntu/Debian** + +``` sh +sudo apt update +sudo apt install tmux -y +``` + +3. Start tmux: + +``` sh +tmux +``` + +## nbdev Development Workflow + +### Initialize Project + +``` sh +nbdev_install_quarto +``` + +### Update README from `index.ipynb` + +``` sh +nbdev_readme +``` + +### Export Python Modules from Notebooks + +``` sh +nbdev_export +``` + ### Advanced Use Cases #### Git Workflow Enhancement diff --git a/nbs/index.ipynb b/nbs/index.ipynb index 31802d8..39bc3a7 100644 --- a/nbs/index.ipynb +++ b/nbs/index.ipynb @@ -203,6 +203,65 @@ "```" ] }, + { + "cell_type": "markdown", + "id": "edc29a9e", + "metadata": { + "notebookRunGroups": { + "groupValue": "2" + } + }, + "source": [ + "# Developer Setup Guide\n", + "\n", + "## Prerequisites\n", + "\n", + "- Python 3.9+\n", + "- pip\n", + "- nbdev (latest version)\n", + "- Quarto (for documentation generation)\n", + "\n", + "## Installation\n", + "\n", + "1. Install the development dependencies:\n", + "\n", + "```sh\n", + "# installing all dependencies\n", + "pip install -e '.[dev]'\n", + "nbdev_install_quarto\n", + "```\n", + "\n", + "2. Set up the tmux environment for development:\n", + "\n", + "**Ubuntu/Debian**\n", + "```sh\n", + "sudo apt update\n", + "sudo apt install tmux -y\n", + "```\n", + "\n", + "3. Start tmux:\n", + "```sh\n", + "tmux\n", + "```\n", + "\n", + "## nbdev Development Workflow\n", + "\n", + "### Initialize Project\n", + "```sh\n", + "nbdev_install_quarto\n", + "```\n", + "\n", + "### Update README from `index.ipynb`\n", + "```sh\n", + "nbdev_readme\n", + "```\n", + "\n", + "### Export Python Modules from Notebooks\n", + "```sh\n", + "nbdev_export\n", + "```\n" + ] + }, { "cell_type": "markdown", "id": "47d6bfb8", @@ -316,9 +375,13 @@ ], "metadata": { "kernelspec": { - "display_name": "python3", + "display_name": "Python 3", "language": "python", "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.12.9" } }, "nbformat": 4,