Skip to content

Commit de28b41

Browse files
authored
Bump up sleap-nn version for v0.0.2 (#341)
This PR bumps up version to 0.0.2 to get ready for next release and updates installation guides.
1 parent 958fd3c commit de28b41

File tree

4 files changed

+46
-20
lines changed

4 files changed

+46
-20
lines changed

docs/inference.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@ SLEAP-NN provides powerful inference capabilities for pose estimation with suppo
88
!!! info "Using uv workflow"
99
This section assumes you have `sleap-nn` installed. If not, refer to the [installation guide](installation.md).
1010

11-
- If you're using the `uvx` workflow, you do **not** need to install anything; just run:
12-
13-
`uvx sleap-nn[torch-cpu] track ...`
14-
15-
(See [installation using uvx](installation.md#installation-using-uvx) for more details.)
11+
- If you're using the `uvx` workflow, you do **not** need to install anything. (See [installation using uvx](installation.md#installation-using-uvx) for more details.)
1612

17-
- If you are using `uv sync`, add `uv run` as a prefix to all CLI commands shown below, for example:
13+
- If you are using `uv sync` or `uv pip` installation methods, add `uv run` as a prefix to all CLI commands shown below, for example:
1814

1915
`uv run sleap-nn track ...`
2016

docs/installation.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
**Prerequisites:** Python 3.11+ (required for all installation methods)
44

55
!!! tip "Choose Your Installation Method"
6-
- **[Installation as a system-wide tool with uv](#installation-as-a-system-wide-tool-with-uv)**: Use `uv tool install` to install sleap-nn globally as a CLI tool
6+
- **[Installation as a system-wide tool with uv](#installation-as-a-system-wide-tool-with-uv)**: **(Recommended)** Use `uv tool install` to install sleap-nn globally as a CLI tool
77
- **[Installation with uvx](#installation-with-uvx)**: Use `uvx` for one-off commands (no installation needed)
88
- **[Installation with uv pip](#installation-with-uv-pip)**: Use `uv pip` to install from pypi in a uv virtual env.
99
- **[Installation with pip](#installation-with-pip)**: Use `pip` to install from pypi in a conda env. (Recommended to use with a conda env)
10-
- **[Installation from source](#development-setup-with-uv)**: Use `uv sync` to install from source (for developmental purposes)
10+
- **[Installation from source](#installation-from-source)**: Use `uv sync` to install from source (for developmental purposes)
1111

1212
---
1313

@@ -43,14 +43,21 @@
4343

4444
=== "macOS"
4545
```bash
46-
uv tool install sleap-nn[torch]
46+
uv tool install "sleap-nn[torch]"
4747
```
4848

4949
!!! info
5050
- For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
5151
The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
5252
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
5353

54+
### Verify installation
55+
56+
```bash
57+
# Test the installation
58+
sleap-nn --help
59+
```
60+
5461
---
5562

5663
## Installation with uvx
@@ -105,7 +112,7 @@
105112

106113
## Installation with uv pip
107114

108-
This method creates a dedicated project environment using uv's modern Python project management. It initializes a new project with `uv init`, creates an isolated virtual environment with `uv venv`, and installs sleap-nn using `uv pip`.
115+
This method creates a dedicated project environment using uv's modern Python project management. It initializes a new project with `uv init`, creates an isolated virtual environment with `uv venv`, and installs sleap-nn using `uv pip`. To use all installed packages, you must run commands with `uv run` (e.g., `uv run sleap-nn train ...` or `uv run pytest ...`).
109116

110117
!!! note "Install and set-up uv"
111118
Step-1: Install [`uv`](https://github.com/astral-sh/uv) - a fast Python package manager:
@@ -141,20 +148,45 @@ This method creates a dedicated project environment using uv's modern Python pro
141148

142149
=== "macOS"
143150
```bash
144-
uv pip install sleap-nn[torch]
151+
uv pip install "sleap-nn[torch]"
145152
```
146153

147154
!!! info
148155
- For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
149156
The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
150157
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
151158

159+
### Verify Installation
160+
161+
```bash
162+
# Test the installation
163+
uv run sleap-nn --help
164+
```
165+
166+
!!! warning "sleap-nn not recognized after installation?"
167+
168+
If running the verification step above gives an error like `sleap-nn: command not found` or `'sleap-nn' is not recognized as an internal or external command`, try the following workarounds:
169+
170+
- Activate your virtual environment (the venv name should be the same as your current working dir name). If you used `uv`, activate it and then run:
171+
```bash
172+
uv run --active sleap-nn --help
173+
```
174+
This ensures the command runs in the correct environment.
175+
176+
- **Another workaround (not recommended):**
177+
Check if you have any *empty* `pyproject.toml` or `uv.lock` files in `Users/<your-user-name>`. If you find empty files with these names, delete them and try again. (Empty files here can sometimes interfere with uv's environment resolution.)
178+
152179
---
153180

154181
## Installation with pip
155182

156183
We recommend creating a dedicated environment with [conda](https://docs.conda.io/en/latest/miniconda.html) or [mamba/miniforge](https://github.com/conda-forge/miniforge) before installing `sleap-nn` with pip. This helps avoid dependency conflicts and keeps your Python setup clean. After installing Miniconda or Miniforge, create and activate an environment, then run the pip install commands below inside the activated environment.
157184

185+
To create a conda environment, run:
186+
```bash
187+
conda create -n sleap-nn-env python=3.12
188+
conda activate sleap-nn-env
189+
```
158190

159191
### Platform-Specific Installation
160192

@@ -174,7 +206,7 @@ We recommend creating a dedicated environment with [conda](https://docs.conda.io
174206

175207
=== "macOS"
176208
```bash
177-
pip install sleap-nn[torch]
209+
pip install "sleap-nn[torch]"
178210
```
179211

180212
!!! info
@@ -238,7 +270,9 @@ cd sleap-nn
238270
uv sync --extra dev --extra torch-cpu
239271
```
240272

241-
#### 4. Verify Development Setup
273+
### Verify Installation
274+
275+
In your working dir (where you ran `uv sync`):
242276

243277
```bash
244278
# Run tests

docs/training.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,9 @@
77
!!! info "Using uv workflow"
88
This section assumes you have `sleap-nn` installed. If not, refer to the [installation guide](installation.md).
99

10-
- If you're using the `uvx` workflow, you do **not** need to install anything; just run:
11-
12-
`uvx sleap-nn[torch-cpu] train ...`
13-
14-
(See [installation using uvx](installation.md#installation-using-uvx) for more details.)
10+
- If you're using the `uvx` workflow, you do **not** need to install anything. (See [installation using uvx](installation.md#installation-using-uvx) for more details.)
1511

16-
- If you are using `uv sync`, add `uv run` as a prefix to all CLI commands shown below, for example:
12+
- If you are using `uv sync` or `uv pip` installation methods, add `uv run` as a prefix to all CLI commands shown below, for example:
1713

1814
`uv run sleap-nn train ...`
1915

sleap_nn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ def _should_log(record):
3232
format="{time:YYYY-MM-DD HH:mm:ss} | {level} | {name}:{function}:{line} | {message}",
3333
)
3434

35-
__version__ = "0.0.1"
35+
__version__ = "0.0.2"

0 commit comments

Comments
 (0)