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