Skip to content

Commit 0ad8cf4

Browse files
committed
separate sidebar for setup docs incl. dev setup
1 parent a195a0b commit 0ad8cf4

5 files changed

Lines changed: 111 additions & 52 deletions

File tree

docs/setup.md

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,25 @@
11
---
2-
title: Setup
2+
title: Setup toolbox
33
---
44

5-
### Install `chkware` toolset with Pipx
5+
### Install *CHKware* toolset with Pipx
66

7-
This section describe the installation process for [`chkware`](https://github.com/chkware/cli). The currently supported python version is **_Python 3.10.x_** You need to have this version of python in your OS to continue.
7+
This section describe the installation process for [*CHKware*](https://github.com/chkware/cli). The currently supported python version is **_Python 3.11.x_**. You need to have this version of python in your OS to continue.
88

99
The best way to setup any python app is manage it via [pipx](https://pypa.github.io/pipx/). Pipx is a standard PyPi python application manager.
1010

1111
First, [Install pipx](https://pypa.github.io/pipx/installation/). Then run
1212

1313
```bash
14-
$ pipx install chk
14+
pipx install chk
1515
```
1616

17-
Then use as following
18-
19-
```bash
20-
$ chk http some_file.chk
21-
```
22-
23-
### `chkware` toolset upgrade
17+
**Update**
2418

2519
If you have installed with _pipx_ then use following to upgrade to latest released version.
2620

2721
```bash
28-
$ pipx upgrade chk
22+
pipx upgrade chk
2923
```
3024

3125
Otherwise, if _pip_ was used to install then same process given above should work for upgrade as well.
32-
33-
---
34-
35-
### Install `chkware` extension for Visual Studio Code
36-
37-
Get started writing `chkware` configurations with VS Code doing following steps:
38-
39-
- Step 1: If you haven't done so already, install [chkware](#install-chkware-toolset-with-pipx)
40-
41-
- Step 2: Install the `chkware` extension for VS Code
42-
43-
New to `chkwere`? Read the `chkware` [quick start](/quick-start) guide here.
44-
45-
### Using `chkware` extension for Visual Studio Code
46-
47-
Using VS Code command palette you can quickly select a snippet from added samples.
48-
49-
- Use `Cmd+Shift+P` on Mac, `Ctrl+Shift+P` on Windows, and `Ctrl+Shift+P` on Linux to bring up command palette.
50-
- Select a sample you desire to use. <br />
51-
52-
![chkware vscode ext](https://user-images.githubusercontent.com/45073703/187077383-7083de1a-affe-4fed-845a-d71d69d03034.gif)
53-
54-
55-
### Setup development environment for `chkware` extension
56-
57-
Make sure you are doing following to develop this extension further in your machine.
58-
59-
- Run `npm install` to install dependencies for the first time
60-
- Run `npm run watch`
61-
- Press `f5`
62-
- Wait for the new window to be opened
63-
- Open command palette by pressing `ctrl` + `shift` + `p`
64-
- Search for `chkware` commands
65-
- After code changes, run `Developer: Reload Window` in the new window from command palette

docs/setup/setup-cli-dev.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Setup for toolbox developer
3+
---
4+
5+
### Local development environment setup for *CHKware* cli toolbox
6+
7+
Make sure you are doing following to develop `chk` cli toolbox in your machine.
8+
9+
- Install [Python 3.11.x](https://www.python.org/downloads/)
10+
- You can use [Pyenv](https://github.com/pyenv/pyenv#installation) or [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html) (using [Miniconda](https://docs.conda.io/en/latest/miniconda.html)) to manage multiple version of Python in your OS.
11+
- Install [Pipenv](https://pipenv.pypa.io/en/latest/install/#installing-pipenv)
12+
- Fork the `https://github.com/chkware/cli` repository
13+
- Clone the repository
14+
```bash
15+
git clone git@github.com:chkware/cli.git chkware-cli
16+
```
17+
- Create a `.venv` directory
18+
```bash
19+
mkdir -p .venv
20+
```
21+
- Run the following command to install all the dependencies (including dev-dependencies)
22+
```bash
23+
pipenv install --dev
24+
```
25+
- Use the following command to run tests
26+
```bash
27+
pipenv run python -m pytest
28+
```
29+
- Use the following command to run a `http` spec file
30+
```bash
31+
pipenv run python -m chk http /path/to/file.chk
32+
```
33+
- Setup your IDE with [Pylint](https://pylint.readthedocs.io/en/latest/user_guide/installation/ide_integration/index.html) and Mypy

docs/setup/setup-ext-dev.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: Setup for extension developer
3+
---
4+
5+
### Local development environment setup for *CHKware* extension
6+
7+
Make sure you are doing following to develop this extension further in your machine.
8+
9+
- Run `npm install` to install dependencies for the first time
10+
- Run `npm run watch`
11+
- Press `f5`
12+
- Wait for the new window to be opened
13+
- Open command palette by pressing `ctrl` + `shift` + `p`
14+
- Search for *CHKware* commands
15+
- After code changes, run `Developer: Reload Window` in the new window from command palette

docs/setup/setup-ext.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Setup VS Code extension
3+
---
4+
5+
### Install *CHKware* extension for Visual Studio Code
6+
7+
Get started writing *CHKware* configurations with VS Code doing following steps:
8+
9+
- Step 1: Install [chkware](/setup), if you haven't done so already.
10+
11+
- Step 2: Install the [*CHKware* extension](https://marketplace.visualstudio.com/items?itemName=chkware.chkware) for VS Code
12+
13+
- Step 3: New to *CHKware*? Read the *CHKware* [quick start](/quick-start) guide here.
14+
15+
---
16+
### Using *CHKware* extension for Visual Studio Code
17+
18+
Using VS Code command palette you can quickly select a snippet from added samples.
19+
20+
- Use `Cmd+Shift+P` on macOS, `Ctrl+Shift+P` on Windows, and `Ctrl+Shift+P` on Linux to bring up command palette.
21+
- Select a sample you desire to use.
22+
<br />
23+
24+
![CHKware visual studio code extension](https://user-images.githubusercontent.com/45073703/187077383-7083de1a-affe-4fed-845a-d71d69d03034.gif)

sidebars.js

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,32 @@
1515
const sidebars = {
1616

1717
docs: [
18-
'home',
19-
'introduction',
20-
'setup',
21-
'quick-start',
18+
{
19+
type: 'doc',
20+
label: '🏡 Home',
21+
id: 'home',
22+
},
23+
{
24+
type: 'doc',
25+
label: '💡 Introduction',
26+
id: 'introduction',
27+
},
28+
{
29+
type: 'category',
30+
label: '⚒️ Setup docs',
31+
items: [
32+
'setup',
33+
'setup/setup-ext',
34+
],
35+
},
36+
{
37+
type: 'doc',
38+
label: '🏃‍♂️ Quick start',
39+
id: 'quick-start',
40+
},
2241
{
2342
type: 'category',
24-
label: 'Examples',
43+
label: '🏊‍♂️ Examples',
2544
items: [
2645
'examples/http-examples',
2746
'examples/testcase-examples',
@@ -30,7 +49,7 @@ const sidebars = {
3049
},
3150
{
3251
type: 'category',
33-
label: 'References',
52+
label: '🗂 References',
3453
items: [
3554
'references/concepts',
3655
'references/version-reference',
@@ -39,6 +58,14 @@ const sidebars = {
3958
'references/testcase-reference',
4059
],
4160
},
61+
{
62+
type: 'category',
63+
label: '👩‍💻 Developers',
64+
items: [
65+
'setup/setup-ext-dev',
66+
'setup/setup-cli-dev',
67+
],
68+
},
4269
],
4370
};
4471

0 commit comments

Comments
 (0)