Skip to content

Commit a804e5c

Browse files
authored
Merge branch 'master' into pf8-remove-s3-url
2 parents a84bec5 + 3c2ee64 commit a804e5c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2339
-624
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
```
68.1 KB
Loading
1.76 MB
Loading
60.9 KB
Loading
1.98 MB
Loading

docs/source/index.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,43 @@ API documentation
1717

1818
*Anopheles gambiae* complex.
1919

20-
.. image:: https://upload.wikimedia.org/wikipedia/commons/0/0a/AnophelesGambiaemosquito.jpg
20+
.. image:: ./_static/images/anopheles_gambiae.jpg
21+
:alt: Anopheles gambiae mosquito
22+
:align: center
23+
:width: 100%
2124

2225
.. grid-item-card:: ``Af1``
2326
:link: Af1
2427
:link-type: doc
2528

2629
*Anopheles funestus* subgroup.
2730

28-
.. image:: https://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Anopheles_Funetus.jpg/640px-Anopheles_Funetus.jpg
31+
.. image:: ./_static/images/anopheles_funestus.jpg
32+
:alt: Anopheles funestus mosquito
33+
:align: center
34+
:width: 100%
2935

3036
.. grid-item-card:: ``Amin1``
3137
:link: Amin1
3238
:link-type: doc
3339

3440
*Anopheles minimus*.
3541

36-
.. image:: https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Anopheles_minimus_1.jpg/640px-Anopheles_minimus_1.jpg
42+
.. image:: ./_static/images/anopheles_minimus.jpg
43+
:alt: Anopheles minimus mosquito
44+
:align: center
45+
:width: 100%
3746

3847
.. grid-item-card:: ``Adir1``
3948
:link: Adir1
4049
:link-type: doc
4150

4251
*Anopheles dirus* complex.
4352

44-
.. image:: https://phil.cdc.gov//PHIL_Images/8777/8777_lores.jpg
53+
.. image:: ./_static/images/anopheles_dirus.jpg
54+
:alt: Anopheles dirus mosquito
55+
:align: center
56+
:width: 100%
4557

4658
Documentation for the `Pf7 <https://malariagen.github.io/parasite-data/pf7/api.html>`_ (*Plasmodium falciparum*)
4759
and `Pv4 <https://malariagen.github.io/parasite-data/pv4/api.html>`_ (*Plasmodium vivax*) APIs is also available,

malariagen_data/adar1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def _repr_html_(self):
181181
<th style="text-align: left">
182182
Data releases available
183183
</th>
184-
<td>{', '.join(self._available_releases)}</td>
184+
<td>{", ".join(self._available_releases)}</td>
185185
</tr>
186186
<tr>
187187
<th style="text-align: left">
@@ -229,7 +229,7 @@ def _repr_html_(self):
229229
<th style="text-align: left">
230230
Relevant data releases
231231
</th>
232-
<td>{', '.join(self.releases)}</td>
232+
<td>{", ".join(self.releases)}</td>
233233
</tr>
234234
</tbody>
235235
</table>

malariagen_data/adir1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def _repr_html_(self):
181181
<th style="text-align: left">
182182
Data releases available
183183
</th>
184-
<td>{', '.join(self._available_releases)}</td>
184+
<td>{", ".join(self._available_releases)}</td>
185185
</tr>
186186
<tr>
187187
<th style="text-align: left">
@@ -229,7 +229,7 @@ def _repr_html_(self):
229229
<th style="text-align: left">
230230
Relevant data releases
231231
</th>
232-
<td>{', '.join(self.releases)}</td>
232+
<td>{", ".join(self.releases)}</td>
233233
</tr>
234234
</tbody>
235235
</table>

malariagen_data/af1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def _repr_html_(self):
183183
<th style="text-align: left">
184184
Data releases available
185185
</th>
186-
<td>{', '.join(self._available_releases)}</td>
186+
<td>{", ".join(self._available_releases)}</td>
187187
</tr>
188188
<tr>
189189
<th style="text-align: left">
@@ -231,7 +231,7 @@ def _repr_html_(self):
231231
<th style="text-align: left">
232232
Relevant data releases
233233
</th>
234-
<td>{', '.join(self.releases)}</td>
234+
<td>{", ".join(self.releases)}</td>
235235
</tr>
236236
</tbody>
237237
</table>

malariagen_data/ag3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def _repr_html_(self):
278278
<th style="text-align: left">
279279
Data releases available
280280
</th>
281-
<td>{', '.join(self._available_releases)}</td>
281+
<td>{", ".join(self._available_releases)}</td>
282282
</tr>
283283
<tr>
284284
<th style="text-align: left">
@@ -332,7 +332,7 @@ def _repr_html_(self):
332332
<th style="text-align: left">
333333
Relevant data releases
334334
</th>
335-
<td>{', '.join(self.releases)}</td>
335+
<td>{", ".join(self.releases)}</td>
336336
</tr>
337337
</tbody>
338338
</table>

0 commit comments

Comments
 (0)