Skip to content

Commit d1bbebb

Browse files
committed
Unify contributing guides
The Linux, Mac, and Windows specific guides are out of date. Combine them into the main guide so we don't duplicate any information and can keep everything in one place. Also: - update the pre-commit hook version to avoid a warning - update the gcloud install script to latest Google instructions
1 parent 417acdc commit d1bbebb

7 files changed

Lines changed: 37 additions & 328 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# https://pre-commit.com/
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.5.0
4+
rev: v6.0.0
55
hooks:
66
- id: trailing-whitespace
77
- id: end-of-file-fixer

CONTRIBUTING.md

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,35 @@ You'll need:
1515
- [pipx](https://pipx.pypa.io/) for installing Python tools
1616
- [git](https://git-scm.com/) for version control
1717

18-
Both of these can be installed using your distribution's package manager or [Homebrew](https://brew.sh/) on Mac.
18+
Both of these can be installed using your distribution's package manager or [Homebrew](https://brew.sh/) on Mac. On Windows we recommend development on Linux using [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install). For example,
19+
20+
**Ubuntu, Debian, and Mint:**
21+
22+
```bash
23+
sudo apt install -y git pipx
24+
pipx ensurepath
25+
```
26+
27+
**Fedora:**
28+
29+
```bash
30+
sudo dnf install -y git pipx
31+
pipx ensurepath
32+
```
33+
34+
**Arch Linux:**
35+
36+
```bash
37+
sudo pacman -S git pipx
38+
pipx ensurepath
39+
```
40+
41+
**Mac**
42+
43+
```bash
44+
brew install git pipx
45+
pipx ensurepath
46+
```
1947

2048
### Initial setup
2149

@@ -55,27 +83,20 @@ Both of these can be installed using your distribution's package manager or [Hom
5583
poetry install --with dev,test,docs
5684
```
5785

58-
This installs the runtime dependencies along with the `dev`, `test`, and `docs`
59-
[dependency groups](https://python-poetry.org/docs/managing-dependencies/#dependency-groups).
86+
This installs the runtime dependencies along with the `dev`, `test`, and `docs` [dependency groups](https://python-poetry.org/docs/managing-dependencies/#dependency-groups).
6087
If you only need to run tests, `poetry install --with test` is sufficient.
6188

62-
**Recommended**: Use `poetry run` to run commands inside the virtual environment:
89+
You can use `poetry run` to run commands inside the virtual environment:
6390

6491
```bash
6592
poetry run pytest
6693
poetry run python script.py
6794
```
6895

69-
**Optional**: If you prefer an interactive shell session, install the shell plugin first:
70-
71-
```bash
72-
poetry self add poetry-plugin-shell
73-
```
74-
75-
Then activate the environment with:
96+
Alternatively, if you prefer an interactive shell session, activate the environment using:
7697

7798
```bash
78-
poetry shell
99+
eval $(poetry env activate)
79100
```
80101

81102
After activation, commands run directly inside the virtual environment:
@@ -147,7 +168,7 @@ Both of these can be installed using your distribution's package manager or [Hom
147168
poetry run pytest -v tests/integration
148169
```
149170

150-
Tests will run slowly the first time, as data required for testing will be read from GCS. Subsequent runs will be faster as data will be cached locally in the "gcs_cache" folder.
171+
Tests will run slowly the first time, as data required for testing will be read from GCS. Subsequent runs will be faster as data will be cached locally in the `gcs_cache` folder.
151172

152173
6. **Run typechecking**
153174

LINUX_SETUP.md

Lines changed: 0 additions & 140 deletions
This file was deleted.

MACOS_SETUP.md

Lines changed: 0 additions & 77 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ for release notes.
4646

4747
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).
4848

49-
For detailed setup instructions, see:
50-
- [Linux setup guide](LINUX_SETUP.md)
51-
- [macOS setup guide](MACOS_SETUP.md)
52-
- [Windows setup guide](WINDOWS_SETUP.md)
53-
- [Google Colab (TPU) setup guide](docs/source/colab_tpu_runtime.rst)
5449
Detailed instructions can be found in the [Contributors guide](https://github.com/malariagen/malariagen-data-python/blob/master/CONTRIBUTING.md).
5550

5651
## AI use policy and guidelines

0 commit comments

Comments
 (0)