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: CONTRIBUTING.md
+7-9Lines changed: 7 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Contribute to Chainlit
2
2
3
-
To contribute to Chainlit, you first need to setup the project on your local machine.
3
+
To contribute to Chainlit, you first need to set up the project on your local machine.
4
4
5
5
## Table of Contents
6
6
@@ -33,7 +33,7 @@ I've copy/pasted the whole document there, and then formatted it with prettier.
33
33
> **Note**
34
34
> If you are on windows, some pnpm commands like `pnpm run formatPython` won't work. You can fix this by changing the pnpm script-shell to bash: `pnpm config set script-shell "C:\\Program Files\\git\\bin\\bash.exe"` (default x64 install location, [Info](https://pnpm.io/cli/run#script-shell))
35
35
36
-
### Setup the repo
36
+
### Set up the repo
37
37
38
38
With this setup you can easily code in your fork and fetch updates from the main repository.
39
39
@@ -74,7 +74,7 @@ The following command will install Python dependencies, Node (pnpm) dependencies
74
74
75
75
```sh
76
76
cd backend
77
-
poetry install --with tests --with mypy --with dev
77
+
poetry install --with tests --with mypy --with dev --with custom-data
78
78
```
79
79
80
80
## Start the Chainlit server from source
@@ -83,8 +83,7 @@ Start by running `backend/hello.py` as an example.
83
83
84
84
```sh
85
85
cd backend
86
-
poetry self add poetry-plugin-shell
87
-
poetry shell
86
+
poetry env activate
88
87
chainlit run chainlit/hello.py
89
88
```
90
89
@@ -113,12 +112,12 @@ This will run the backend's unit tests.
113
112
114
113
```sh
115
114
cd backend
116
-
pytest
115
+
poetry run pytest --cov=chainlit
117
116
```
118
117
119
118
### E2E tests
120
119
121
-
This will run end to end tests, assessing both the frontend, the backend and their interaction:
120
+
This will run end to end tests, assessing both the frontend, the backend and their interaction. First install cypress with `pnpm exec cypress install`, and then run:
122
121
123
122
```sh
124
123
pnpm test
@@ -142,5 +141,4 @@ Extremely useful for debugging!
142
141
143
142
```sh
144
143
SINGLE_TEST=password_auth CYPRESS_OPTIONS='--headed --no-exit' pnpm test
0 commit comments