Skip to content

Commit 2216c0a

Browse files
committed
docs: use tabs to show platform specific options
1 parent 6ab6ea7 commit 2216c0a

File tree

2 files changed

+39
-17
lines changed

2 files changed

+39
-17
lines changed

documentation/docs/contribute/development-guide/01-setup.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Setup
22

3+
```mdx-code-block
4+
import TabItem from '@theme/TabItem';
5+
import Tabs from '@theme/Tabs';
6+
```
7+
38
## Prerequisites
49

510
To work with the template monorepo you'll need to install [these tools](../../about/running/01-prerequisites.md).
@@ -42,31 +47,31 @@ From inside the /api folder.
4247

4348
### Create virtualenv
4449

50+
Virtual environment is used for running unit tests with pre-commit and upgrade packages. It also can be used to run the application if you not are using Docker.
51+
4552
```shell
4653
python3 -m venv .venv
4754
```
4855

49-
Virtual environment is used for running unit tests with pre-commit and upgrade packages. It also can be used to run the application if you not are using Docker.
50-
5156
### Activate virtualenv
5257

53-
<details>
54-
<summary>Linux</summary>
58+
<Tabs groupId="operating-system">
59+
<TabItem value="linux" label="Linux">
5560

56-
```shell
57-
$ source .venv/bin/activate
61+
```bash
62+
source .venv/bin/activate
5863
```
59-
</details>
6064

61-
<details>
62-
<summary>Windows</summary>
65+
</TabItem>
66+
<TabItem value="windows" label="Windows">
6367

64-
```shell
65-
$ .\venv\Scripts\Activate.ps1
66-
$ pip install --upgrade pip
68+
```powershell
69+
.\venv\Scripts\Activate.ps1
70+
pip install --upgrade pip
6771
```
6872

69-
</details>
73+
</TabItem>
74+
</Tabs>
7075

7176
### Install Poetry
7277

documentation/docs/contribute/development-guide/03-testing.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,36 @@
22

33
## API
44

5+
```mdx-code-block
6+
import TabItem from '@theme/TabItem';
7+
import Tabs from '@theme/Tabs';
8+
```
9+
510
The application has two types of API tests: unit tests and integration tests.
611

712
### Unit tests
813

914
You will find unit tests under `src/tests/unit`.
1015

11-
Using docker:
16+
<Tabs groupId="api-testing">
17+
<TabItem value="using-docker" label="Using docker">
1218

1319
```shell
1420
docker-compose run --rm api pytest
1521
```
1622

17-
Without using docker:
23+
</TabItem>
24+
<TabItem value="without-using-docker" label="Without using docker">
1825

1926
```shell
27+
cd api/
2028
pytest
2129
```
2230

31+
</TabItem>
32+
</Tabs>
33+
34+
2335
As a general rule, unit tests should not have any external dependencies - especially on the file system.
2436

2537
### Integration tests
@@ -34,15 +46,20 @@ These tests depends on mongodb and that it's running.
3446

3547
### Unit tests
3648

37-
Without using docker:
49+
<Tabs groupId="web-testing">
50+
<TabItem value="using-docker" label="Using docker">
3851

3952
```shell
4053
docker-compose run --rm web yarn test
4154
```
4255

43-
Not using docker:
56+
</TabItem>
57+
<TabItem value="without-using-docker" label="Without using docker">
4458

4559
```shell
4660
cd web/
4761
yarn test
4862
```
63+
64+
</TabItem>
65+
</Tabs>

0 commit comments

Comments
 (0)