Skip to content

Commit 681bbd9

Browse files
committed
updated instruction for creating a dev environment
1 parent 7f3c0b7 commit 681bbd9

File tree

2 files changed

+56
-25
lines changed

2 files changed

+56
-25
lines changed

CONTRIBUTING.md

Lines changed: 55 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,67 @@ These are especially suitable if you're new to the project, and we recommend sta
2525

2626
## Contributing code
2727

28-
2928
### Creating a development environment
30-
It is recommended to use [conda](conda:)
31-
or [mamba](mamba:) to create a
32-
development environment for `movement`. In the following we assume you have
33-
`conda` installed, but the same commands will also work with `mamba`/`micromamba`.
3429

35-
First, create and activate a `conda` environment with some prerequisites:
30+
In order to make changes to `movement`, you will need to fork the [repository](movement-github:).
31+
If you are not familiar with `git`, we recommend reading up on [this guide](https://docs.github.com/en/get-started/using-git/about-git#basic-git-commands).
3632

37-
```sh
38-
conda create -n movement-dev -c conda-forge python=3.13 pytables
39-
conda activate movement-dev
40-
```
33+
1. Clone the forked repository to your local machine and change directories:
4134

42-
To install `movement` for development, clone the [GitHub repository](movement-github:),
43-
and then run from within the repository:
35+
```sh
36+
git clone https://github.com/neuroinformatics-unit/movement.git
37+
cd movement
38+
```
4439

45-
```sh
46-
pip install -e .[dev] # works on most shells
47-
pip install -e '.[dev]' # works on zsh (the default shell on macOS)
48-
```
40+
2. Set the upstream remote to the base `movement` repository:
4941

50-
This will install the package in editable mode, including all dependencies
51-
required for development.
42+
```sh
43+
git remote add upstream https://github.com/neuroinformatics-unit/movement.git
44+
```
5245

53-
Finally, initialise the [pre-commit hooks](#formatting-and-pre-commit-hooks):
46+
3. Create an environment using [conda](conda:) or [uv](uv:) and install `movement` in editable mode, including development dependencies.
5447

55-
```bash
56-
pre-commit install
57-
```
48+
::::{tab-set}
49+
50+
:::{tab-item} conda
51+
First, create and activate a `conda` environment:
52+
53+
```sh
54+
conda create -n movement-dev -c conda-forge python=3.13
55+
conda activate movement-dev
56+
```
57+
58+
Then, install the package in editable mode with development dependencies:
59+
60+
```sh
61+
pip install -e ".[dev]"
62+
```
63+
:::
64+
65+
:::{tab-item} uv
66+
67+
First, create and activate a [virtual environment](uv:pip/environments/):
68+
69+
```sh
70+
uv venv --python=3.13
71+
source .venv/bin/activate # On macOS and Linux
72+
.venv\Scripts\activate # On Windows PowerShell
73+
```
74+
75+
Then, install the package in editable mode with development dependencies:
76+
77+
```sh
78+
uv pip install -e ".[dev]"
79+
```
80+
:::
81+
82+
::::
83+
84+
4. Finally, initialise the [pre-commit hooks](#formatting-and-pre-commit-hooks):
85+
86+
```sh
87+
pre-commit install
88+
```
5889

5990
### Pull requests
6091
In all cases, please submit code to the main repository via a pull request (PR).
@@ -218,6 +249,8 @@ To edit the documentation, first clone the repository, and install `movement` in
218249
Then, install a few additional dependencies in your development environment to be able to build the documentation locally. To do this, run the following command from the root of the repository:
219250
```sh
220251
pip install -r ./docs/requirements.txt
252+
# or, for uv users:
253+
uv pip install -r ./docs/requirements.txt
221254
```
222255

223256
Now create a new branch, edit the documentation source files (`.md` or `.rst` in the `docs` folder),

docs/source/user_guide/installation.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ uv venv --python=3.13
2929
```
3030

3131
Activate the virtual environment:
32-
```bash
32+
```sh
3333
source .venv/bin/activate # On macOS and Linux
34-
```
35-
```powershell
3634
.venv\Scripts\activate # On Windows PowerShell
3735
```
3836
:::

0 commit comments

Comments
 (0)