Skip to content

Commit 543f903

Browse files
committed
docs: add peotry instruction + restructure docs
This commits adds the peotry instruction for windows, macos, and linus to the backend dev environment setup page. It also restructures the backend dev environment setup page. [SCSE-22]
1 parent 4d4eced commit 543f903

File tree

8 files changed

+96
-29
lines changed

8 files changed

+96
-29
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
### Step 1. Install Peotry
2+
3+
Run the following with bash
4+
5+
```bash
6+
curl -sSL https://install.python-poetry.org | python3 -
7+
```
8+
9+
### Step 2. Add Peotry to your `PATH`
10+
11+
The installer creates a `poetry` wrapper in
12+
13+
- `$HOME/.local/bin` on Unix
14+
- `$POETRY_HOME/bin` if `$POETRY_HOME` is set.
15+
16+
If this directory is not present in your `$PATH`, you can add it in order to invoke Poetry as `poetry`.
17+
18+
### Step 3. Use Poetry
19+
20+
Once Poetry is installed and in your $PATH, you can execute the following
21+
22+
```bash
23+
poetry --version
24+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### Step 1. Install Poetry
2+
3+
Run the following with PowerShell
4+
5+
```powershell
6+
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
7+
```
8+
9+
:::info
10+
If you have installed Python through the Microsoft Store, replace py with python in the command above.
11+
:::
12+
13+
### Step 2. Add Peotry to your `PATH`
14+
15+
The installer creates a `poetry` wrapper in `%APPDATA%\Python\Scripts` on Windows.
16+
17+
If this directory is not present in your `$PATH`, you can add it in order to invoke Poetry as `poetry`.
18+
19+
### Step 3. Use Poetry
20+
21+
Once Poetry is installed and in your $PATH, you can execute the following
22+
23+
```bash
24+
poetry --version
25+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
```mdx-code-block
2+
import OsTabs from "@site/src/components/DocsFeatures/OsTabs.tsx"
3+
```
4+
5+
## Install `poetry`
6+
7+
The installer script is available directly at [install.python-poetry.org](https://install.python-poetry.org/). The script can be executed directly (i.e. `curl python`) or downloaded and then executed from disk (e.g. in a CI environment).
8+
9+
```mdx-code-block
10+
import PeotryWindows from "./_poetry-windows.mdx"
11+
import PeotryMacOSLinux from "./_poetry-macos-linux.mdx"
12+
13+
<OsTabs
14+
windows={<PeotryWindows />}
15+
macos={<PeotryMacOSLinux />}
16+
linux={<PeotryMacOSLinux />}
17+
/>
18+
```

docs/backend/_python-linux.mdx docs/backend/env-setup/_python-setup/_python-linux.mdx

-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,4 @@ To check if it is installed correctly:
3030
```bash
3131
python --version
3232
# Python 3.10.7
33-
# OR
34-
py --version
35-
#Python 3.10.7
3633
```
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
1. Download the `Python` installer package from the [official Python website](https://www.python.org/downloads/)
2-
1. It should detect your operating system and show a yellow download button. If it doesn’t, click the `windows` link and choose the latest Python release.
2+
1. It should detect your operating system and show a yellow download button. If it doesn’t, click the `macos` link and choose the latest Python release.
33
1. Once the download is complete, double-click the package to start installing `Python`. Follow the installation steps with the default settings.
44
1. Once installation is complete, you have python installed on your system!
55

@@ -8,7 +8,4 @@ To check if it is installed correctly:
88
```bash
99
python --version
1010
# Python 3.10.7
11-
# OR
12-
py --version
13-
#Python 3.10.7
1411
```

docs/backend/_python-windows.mdx docs/backend/env-setup/_python-setup/_python-windows.mdx

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
To check if it is installed correctly:
77

88
```bash
9-
python --version
10-
# Python 3.10.7
11-
# OR
129
py --version
13-
#Python 3.10.7
10+
# Python 3.10.7
1411
```
12+
13+
:::info
14+
If you have installed Python through the Microsoft Store, replace py with python in the command above.
15+
:::
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
---
2-
sidebar_position: 1
3-
---
4-
5-
# Environment Setup
6-
71
```mdx-code-block
82
import OsTabs from "@site/src/components/DocsFeatures/OsTabs.tsx"
93
```
104

11-
Backend devs should have the following installed and configured as described below:
12-
135
## Install `Python 3.x`
146

157
```mdx-code-block
@@ -23,13 +15,3 @@ import PythonLinux from "./_python-linux.mdx"
2315
linux={<PythonLinux />}
2416
/>
2517
```
26-
27-
## Install `poetry`
28-
29-
## Install `nvm` & `node.js`
30-
31-
Follow the instructions to install `nvm` & `node.js` [here](/docs/getting-started/node-nvm)
32-
33-
## Install serverless cli
34-
35-
## Install dynamodb offline

docs/backend/env-setup/index.mdx

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Environment Setup
6+
7+
Backend devs should have the following installed and configured as described below:
8+
9+
```mdx-code-block
10+
import PythonSetup from './_python-setup/index.mdx'
11+
import PeotrySetup from './_peotry-setup/index.mdx'
12+
13+
<PythonSetup />
14+
<PeotrySetup />
15+
```
16+
17+
## Install `nvm` & `node.js`
18+
19+
Follow the instructions to install `nvm` & `node.js` [here](/docs/getting-started/node-nvm)
20+
21+
## Install serverless cli
22+
23+
## Install dynamodb offline

0 commit comments

Comments
 (0)