Skip to content

Pull request for the developer setup guide #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -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 .


4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
65 changes: 64 additions & 1 deletion nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down