https://github.com/henryiii/writing-python
Tutorial on writing Python
https://github.com/henryiii/writing-python
Last synced: 2 months ago
JSON representation
Tutorial on writing Python
- Host: GitHub
- URL: https://github.com/henryiii/writing-python
- Owner: henryiii
- Created: 2024-07-30T05:51:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-14T18:49:45.000Z (12 months ago)
- Last Synced: 2025-04-14T06:07:35.033Z (9 months ago)
- Language: Jupyter Notebook
- Size: 57.6 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Writing Software in Python
## Outline
The focus today: learning how to go from research code to something reusable with structure.
We are also trying not to overlap with the packaging session tomorrow! Be sure to visit that one too.
- Scripts instead of notebooks
- Writing a CLI (built-in)
- Scripts with dependencies
- Writing a CLI (using a dependency)
- Tools for packaging
- Making a reproducible environment
- Task runners
## Installation
I recommend doing this on your computer, so you'll have something to take home. Let's install:
- uv: Brew (macOS), pipx, command line:
- pixi: Brew (macOS), command line:
- nox: Brew (macOS), pipx
Optional:
- pipx: Brew (macOS), pip, etc:
- Python launcher for Unix: Brew, command line:
## Running the slides
```bash
uv tool install jupyterlab --with jupyterlab_rise --with jupyterlab_code_formatter
jupyter-lab .
```