You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Otherwise, you can follow [these instructions](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
92
88
to [fork](https://github.com/czbiohub-sf/iohub/fork) the repository.
93
89
94
-
Then install the package in editable mode with the development dependencies.
95
-
Remove acquire-zarr if you do not have glibc version 2.35 or later,
96
-
for example on the Bruno cluster (Rocky Linux 8).
90
+
#### Install dependencies
91
+
92
+
First, create a virtual environment with a supported Python version (3.11-3.13):
93
+
94
+
```sh
95
+
cd iohub/
96
+
uv venv -p 3.13 # or 3.11, 3.12
97
+
```
98
+
99
+
This makes a virtual environment in the `.venv` where the dependencies for `iohub` will be installed.
100
+
101
+
Then sync dependencies:
97
102
98
103
```sh
99
-
cd iohub/ # or the renamed project root directory
100
-
pip install -e ".[dev,acquire-zarr]"
104
+
uv sync
101
105
```
102
106
107
+
> **Note**: `uv sync` installs the [`dev` group by default](https://docs.astral.sh/uv/concepts/projects/sync/#syncing-development-dependencies), which includes all development dependencies. iohub currently supports Python 3.11-3.13—if `uv sync` fails to resolve dependencies, ensure you've created a venv with a supported version as shown above. See [dependency groups](https://docs.astral.sh/uv/concepts/projects/dependencies/#dependency-groups) for more details.
108
+
109
+
#### Dependency groups
110
+
111
+
The project uses [dependency groups](https://docs.astral.sh/uv/concepts/projects/dependencies/#dependency-groups) for development tools and [optional dependencies](https://docs.astral.sh/uv/concepts/projects/dependencies/#optional-dependencies) for user-facing extras.
|`dev`| Includes test, acquire-zarr, doc, pre-commit (installed by default via `uv sync`) |
120
+
121
+
> **Note**: On older glibc systems (e.g., Rocky Linux 8), `acquire-zarr` won't work. Use `uv sync --no-group acquire-zarr` instead.
122
+
103
123
Then make the changes and [track them with Git](https://docs.github.com/en/get-started/using-git/about-git#example-contribute-to-an-existing-repository).
104
124
105
125
### Developing documentation
106
126
107
127
#### Prerequisites
108
128
109
-
Install a forked version of `sphinx-polyversion` due to an incompatibility with `setuptools_scm`.
129
+
Install the [forked version of `sphinx-polyversion`](https://github.com/ziw-liu/sphinx-polyversion/tree/iohub-staging) (temporary fix for compatibility):
@@ -158,12 +174,21 @@ for how this can reveal more bugs.
158
174
159
175
### Code style
160
176
161
-
We use [pre-commit](https://pre-commit.com/) to sort imports with [isort](https://github.com/PyCQA/isort), format code with [black](https://black.readthedocs.io/en/stable/), and lint with [flake8](https://github.com/PyCQA/flake8) automatically prior to each commit. To minimize test errors when submitting pull requests, please install pre-commit in your environment as follows:
177
+
We use [prek](https://github.com/j178/prek) (a faster [pre-commit](https://pre-commit.com/) runner) to automatically format and lint code prior to each commit. To minimize test errors when submitting pull requests, install the hooks:
178
+
179
+
```bash
180
+
uvx prek install
181
+
```
182
+
183
+
> `uvx` runs tools in isolated, cached environments, no binaries added to your PATH and no dependencies installed in your project venv.
184
+
185
+
To run manually:
162
186
163
187
```bash
164
-
pre-commit install
188
+
uvx prek run # run on staged files only
189
+
uvx prek run --all-files # run on all files
165
190
```
166
191
167
-
When these packages are executed within the project root directory, they should automatically use the [project settings](./pyproject.toml).
192
+
When these tools are executed within the project root directory, they should automatically use the [project settings](./pyproject.toml).
168
193
169
194
[NumPy style docstrings](https://numpydoc.readthedocs.io/en/latest/format.html) are used for API documentation.
0 commit comments