Skip to content

Commit 51ad0e0

Browse files
authored
Merge branch 'master' into fix/version-switcher-dropdown-overflow
2 parents 728599e + 27e4283 commit 51ad0e0

Some content is hidden

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

86 files changed

+4939
-1204
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.idea
22
.vscode
33
__pycache__
4+
.mypy_cache
45
*.pyc
56
dist
67
.venv/

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
```

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ To get setup for development, see [this video if you prefer VS Code](https://you
4949
For detailed setup instructions, see:
5050
- [Linux setup guide](LINUX_SETUP.md)
5151
- [macOS setup guide](MACOS_SETUP.md)
52+
- [Windows setup guide](WINDOWS_SETUP.md)
5253
- [Google Colab (TPU) setup guide](docs/source/colab_tpu_runtime.rst)
5354
Detailed instructions can be found in the [Contributors guide](https://github.com/malariagen/malariagen-data-python/blob/master/CONTRIBUTING.md).
5455

WINDOWS_SETUP.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Windows Setup Guide
2+
3+
To get setup for development on Windows, see
4+
[this video if you prefer VS Code](https://youtu.be/zddl3n1DCFM),
5+
or [this older video if you prefer PyCharm](https://youtu.be/QniQi-Hoo9A),
6+
and the instructions below.
7+
8+
## 1. Fork and clone this repo
9+
```bash
10+
git clone https://github.com/[username]/malariagen-data-python.git
11+
cd malariagen-data-python
12+
```
13+
14+
## 2. Install Python
15+
16+
Download and install Python 3.10 from the official website:
17+
https://www.python.org/downloads/windows/
18+
19+
During installation, check the box that says Add Python to PATH
20+
before clicking Install.
21+
22+
Verify the installation worked:
23+
```bash
24+
python --version
25+
```
26+
27+
## 3. Install pipx and poetry
28+
```bash
29+
python -m pip install --user pipx
30+
python -m pipx ensurepath
31+
pipx install poetry
32+
```
33+
34+
After running ensurepath, close and reopen PowerShell before continuing.
35+
36+
## 4. Create and activate development environment
37+
```bash
38+
poetry install
39+
poetry shell
40+
```
41+
42+
## 5. Install pre-commit hooks
43+
```bash
44+
pipx install pre-commit
45+
pre-commit install
46+
```
47+
48+
## 6. Add upstream remote and get latest code
49+
```bash
50+
git remote add upstream https://github.com/malariagen/malariagen-data-python
51+
git pull upstream master
52+
```
53+
54+
Note: On Windows the default branch is called master, not main.
55+
56+
## 7. Verify everything works
57+
```bash
58+
python -c "import malariagen_data; print('Setup successful!')"
59+
```
60+
61+
## Common Issues on Windows
62+
63+
**poetry not found after install**
64+
65+
Close and reopen PowerShell, then try again.
66+
67+
**git not recognized**
68+
69+
Install Git from https://git-scm.com/download/win
70+
and restart PowerShell.
71+
72+
**python not recognized**
73+
74+
Reinstall Python and make sure to check
75+
Add Python to PATH during installation.
76+
77+
**fatal: not a git repository**
78+
79+
Make sure you are inside the malariagen-data-python
80+
folder before running any git commands.
81+
```bash
82+
cd malariagen-data-python
83+
```
84+
85+
**error: pathspec main did not match**
86+
87+
On Windows use master instead of main.
88+
```bash
89+
git checkout master
90+
```
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/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from .anopheles import AnophelesDataResource, Region
88
from .pf7 import Pf7
99
from .pf8 import Pf8
10+
from .pf9 import Pf9
1011
from .pv4 import Pv4
1112
from .util import SiteClass
1213

0 commit comments

Comments
 (0)