Skip to content

Commit 1602635

Browse files
authored
docs: setup dev env should happen first, also clarify pre-commit etc. (#1097)
1 parent 1eac6b1 commit 1602635

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

docs/docs/contributing/guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To submit your code:
2424
1. Fork the [CocoIndex repository](https://github.com/cocoindex-io/cocoindex)
2525
2. [Create a new branch](https://docs.github.com/en/desktop/making-changes-in-a-branch/managing-branches-in-github-desktop) on your fork
2626
3. Make your changes
27-
4. Run the pre-commit checks (automatically triggered on `git commit`)
27+
4. Run the pre-commit checks. It will be automatically triggered on `git commit` after you install the pre-commit hooks by `pre-commit install` (see [Setup Development Environment](setup_dev_environment.md)).
2828

2929
:::tip
3030
To run them manually (same as CI):

docs/docs/contributing/setup_dev_environment.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ Follow the steps below to get CocoIndex built on the latest codebase locally - i
2020
```sh
2121
python3 -m venv .venv
2222
```
23-
Activate the virtual environment, before any installing / building / running:
23+
24+
Activate the virtual environment, before any installing / building / running below:
2425
2526
```sh
2627
. .venv/bin/activate
2728
```
2829
29-
- Install required tools:
30+
- Install required tools under the virtual environment:
3031
```sh
3132
pip install maturin
3233
```
@@ -36,6 +37,8 @@ Follow the steps below to get CocoIndex built on the latest codebase locally - i
3637
maturin develop -E all,dev
3738
```
3839
40+
This step needs to be repeated whenever you make changes to the Rust code.
41+
3942
- Install and enable pre-commit hooks. This ensures all checks run automatically before each commit:
4043
```sh
4144
pre-commit install

docs/sidebars.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ const sidebars: SidebarsConfig = {
7171
label: 'Contributing',
7272
collapsed: false,
7373
items: [
74-
'contributing/guide',
7574
'contributing/setup_dev_environment',
75+
'contributing/guide',
7676
'contributing/new_built_in_target',
7777
],
7878
},
@@ -90,7 +90,7 @@ const sidebars: SidebarsConfig = {
9090
type: 'category',
9191
label: 'Examples',
9292
collapsed: false,
93-
link: {type: 'doc', id: 'examples/index'},
93+
link: { type: 'doc', id: 'examples/index' },
9494
items: [
9595
{
9696
type: 'autogenerated',

0 commit comments

Comments
 (0)