Skip to content

Commit 3c2ee64

Browse files
authored
Merge pull request #1099 from Schronding/GH1091-debian-setup-docs
Add DEBIAN_SETUP.md to support Debian and WSL environments (Fixes #1091)
2 parents 15b6f7a + f22f47f commit 3c2ee64

File tree

1 file changed

+88
-15
lines changed

1 file changed

+88
-15
lines changed

LINUX_SETUP.md

Lines changed: 88 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,138 @@
11
# Developer setup (Linux)
22

3-
To get setup for development, see [this video if you prefer VS Code](https://youtu.be/zddl3n1DCFM), or [this older video if you prefer PyCharm](https://youtu.be/QniQi-Hoo9A), and the instructions below.
3+
## 1. Install Git
4+
5+
Choose the command for your Linux distribution:
6+
7+
**Ubuntu, Debian, and Mint:**
8+
9+
```bash
10+
sudo apt update
11+
sudo apt install -y git
12+
```
13+
14+
**Fedora:**
415

5-
## 1. Fork and clone this repo
616
```bash
7-
git clone git@github.com:[username]/malariagen-data-python.git
17+
sudo dnf install -y git
18+
```
19+
20+
**Arch Linux:**
21+
22+
```bash
23+
sudo pacman -S sudo
24+
sudo pacman -S git
25+
sudo pacman -S openssh
26+
```
27+
28+
If your Arch install does not have `sudo` configured yet, run the commands above as `root`, then configure `sudo` for your user.
29+
30+
## 2. Fork and clone this repo
31+
32+
After forking the repository on GitHub, clone your fork.
33+
34+
Use SSH if your SSH keys are set up:
35+
36+
```bash
37+
git clone git@github.com:[YOUR_GITHUB_USERNAME]/malariagen-data-python.git
838
cd malariagen-data-python
939
```
1040

11-
## 2. Install Python
41+
Use HTTPS if you prefer, or if you do not have SSH keys configured (common on WSL):
42+
43+
```bash
44+
git clone https://github.com/[YOUR_GITHUB_USERNAME]/malariagen-data-python.git
45+
cd malariagen-data-python
46+
```
47+
48+
## 3. Install pipx
49+
50+
Choose the command for your Linux distribution:
51+
52+
**Ubuntu, Debian, and Mint:**
53+
54+
```bash
55+
sudo apt update
56+
sudo apt install -y pipx
57+
pipx ensurepath
58+
```
59+
60+
**Fedora:**
61+
62+
```bash
63+
sudo dnf install -y pipx
64+
pipx ensurepath
65+
```
66+
67+
**Arch Linux:**
68+
1269
```bash
13-
sudo add-apt-repository ppa:deadsnakes/ppa
14-
sudo apt install python3.10 python3.10-venv
70+
sudo pacman -S python-pipx
71+
pipx ensurepath
1572
```
1673

17-
## 3. Install pipx and poetry
74+
Close and reopen your terminal to apply PATH changes.
75+
If you prefer to reload the shell in-place, run:
76+
77+
```bash
78+
exec bash
79+
```
80+
81+
## 4. Install Poetry and Python 3.12
82+
83+
The package requires `>=3.10,<3.13`. We use Poetry's built-in installer to handle the Python version universally across all distributions.
84+
1885
```bash
19-
python3.10 -m pip install --user pipx
20-
python3.10 -m pipx ensurepath
2186
pipx install poetry
87+
poetry python install 3.12
2288
```
2389

24-
## 4. Create and activate development environment
90+
## 5. Create development environment
91+
2592
```bash
26-
poetry install
27-
poetry shell
93+
poetry env use 3.12
94+
poetry install --extras dev
2895
```
2996

30-
## 5. Install pre-commit hooks
97+
## 6. Install pre-commit hooks
98+
3199
```bash
32100
pipx install pre-commit
33101
pre-commit install
34102
```
35103

36104
Run pre-commit checks manually:
105+
37106
```bash
38107
pre-commit run --all-files
39108
```
40109

41-
## 6. Run tests
110+
## 7. Run tests
42111

43112
Run fast unit tests using simulated data:
113+
44114
```bash
45115
poetry run pytest -v tests/anoph
46116
```
47117

48-
## 7. Google Cloud authentication (for legacy tests)
118+
## 8. Google Cloud authentication (for legacy tests)
49119

50120
To run legacy tests which read data from GCS, you'll need to [request access to MalariaGEN data on GCS](https://malariagen.github.io/vector-data/vobs/vobs-data-access.html).
51121

52122
Once access has been granted, [install the Google Cloud CLI](https://cloud.google.com/sdk/docs/install):
123+
53124
```bash
54125
./install_gcloud.sh
55126
```
56127

57128
Then obtain application-default credentials:
129+
58130
```bash
59131
./google-cloud-sdk/bin/gcloud auth application-default login
60132
```
61133

62134
Once authenticated, run legacy tests:
135+
63136
```bash
64137
poetry run pytest --ignore=tests/anoph -v tests
65138
```

0 commit comments

Comments
 (0)