You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/about/contributing.md
+19-10Lines changed: 19 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,22 +15,22 @@ We use [GitHub Issues](https://github.com/cocoindex-io/cocoindex/issues) to trac
15
15
16
16
We tag issues with the ["good first issue"](https://github.com/cocoindex-io/cocoindex/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label for beginner contributors.
17
17
18
-
## How to Contribute
18
+
## How to Contribute
19
19
- If you decide to work on an issue, unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like **`I'm working on it`** or **`Can I work on this issue?`** to avoid duplicating work.
20
20
- For larger features, we recommend you to discuss with us first in our [Discord server](https://discord.com/invite/zpA9S2DR7s) to coordinate the design and work.
21
21
- Our [Discord server](https://discord.com/invite/zpA9S2DR7s) are constantly open. If you are unsure about anything, it is a good place to discuss! We'd love to collaborate and will always be friendly.
22
22
23
-
## Start hacking! Setting Up Development Environment
23
+
## Start hacking! Setting Up Development Environment
24
24
Following the steps below to get cocoindex build on latest codebase locally - if you are making changes to cocoindex funcionality and want to test it out.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
31
31
```
32
-
Already have Rust? Make sure it's up to date
33
-
```sh
32
+
Already have Rust? Make sure it's up to date
33
+
```sh
34
34
rustup update
35
35
```
36
36
@@ -46,14 +46,19 @@ Following the steps below to get cocoindex build on latest codebase locally - if
46
46
47
47
- Install required tools:
48
48
```sh
49
-
pip install maturin mypy ruff
49
+
pip install maturin mypy pre-commit
50
50
```
51
51
52
52
- Build the library. Run at the root of cocoindex directory:
53
53
```sh
54
54
maturin develop
55
55
```
56
56
57
+
- Install and enable pre-commit hooks. This ensures all checks run automatically before each commit:
58
+
```sh
59
+
pre-commit install
60
+
```
61
+
57
62
- Before running a specific example, set extra environment variables, for exposing extra traces, allowing dev UI, etc.
58
63
```sh
59
64
. ./.env.lib_debug
@@ -67,10 +72,14 @@ To submit your code:
67
72
1. Fork the [CocoIndex repository](https://github.com/cocoindex-io/cocoindex)
68
73
2. [Create a new branch](https://docs.github.com/en/desktop/making-changes-in-a-branch/managing-branches-in-github-desktop) on your fork
69
74
3. Make your changes
70
-
4. Make sure all tests and linting pass by running
71
-
```sh
72
-
./check.sh
73
-
```
75
+
4. Run the pre-commit checks (automatically triggered on `git commit`)
76
+
77
+
:::tip
78
+
To run them manually (same as CI):
79
+
```sh
80
+
pre-commit run --all-files
81
+
```
82
+
:::
74
83
75
84
5. [Open a Pull Request (PR)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) when your work is ready for review
0 commit comments