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
+12-11Lines changed: 12 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,12 @@
1
1
### Setup
2
2
3
-
We recommend that you use a virtual environment to contribute to the client.
4
-
5
-
To create a virtual environment, activate it, and install dependencies, run the following shell code:
3
+
The development requirements are listed in the `requirements-devel.txt` file. Install them to your virtual environment with:
6
4
7
5
```shell
8
-
python3 -m venv .venv
9
-
source .venv/bin/activate
10
6
pip install -r requirements-devel.txt
11
7
```
12
8
13
-
To activate your virtual environment, run `source .venv/bin/activate`.
14
-
15
-
The newest client versions sometimes require upcoming Weaviate core features. We recommend using Docker (see https://weaviate.io/developers/weaviate/installation/docker-compose) to run a local instance of the `latest Weaviate core <https://hub.docker.com/r/semitechnologies/weaviate/tags>`_ for client development.
9
+
The newest client versions sometimes require upcoming Weaviate core features. We recommend using Docker (see https://docs.weaviate.io/deploy/installation-guides/docker-installation) to run a local instance of the `latest Weaviate core <https://hub.docker.com/r/semitechnologies/weaviate/tags>`_ for client development.
16
10
17
11
#### Installation
18
12
@@ -34,10 +28,16 @@ You can install a particular branch directly from GitHub with:
> Note: We use [pytest](https://docs.pytest.org) to write tests for new client code. However, many older tests use [unittest](https://docs.python.org/3/library/unittest.html). These commands run the `pytest` and `unittest` tests.
36
+
To set up the testing environment, install the test requirements with:
37
+
38
+
```shell
39
+
pip install -r requirements-test.txt
40
+
```
41
41
42
42
There are three kinds of tests:
43
43
- Unit tests test individual client components.
@@ -67,9 +67,10 @@ pytest test
67
67
> We strongly recommend using [pre-commit](https://pre-commit.com/) to automatically run all linters locally on each commit. Install `pre-commit` on your system, and then enable it with `pre-commit install`.
68
68
69
69
We use the following tools to ensure a high code quality:
70
-
-black (formatter), run with `black $FOLDER_WITH_CHANGES`
71
-
- flake8 with plugins. Run with `flake8 $FOLDER_WITH_CHANGES`. Note that all plugins are listed in the `requirements.txt` file and are installed in the first step.
70
+
-ruff (formatter), run with `ruff format $FOLDER_WITH_CHANGES`
71
+
- flake8 with plugins. Run with `flake8 $FOLDER_WITH_CHANGES`.
72
72
73
+
Note that all plugins are listed in the `requirements-devel.txt` file and are installed in the first step.
3. Create a release [from the GH repo](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository?tool=webui#creating-a-release)
24
+
25
+
### Step 3: Monitor pipeline
26
+
1. Monitor the CICD pipeline
27
+
1. When all tests pass, the release will be pushed to PyPI automatically
28
+
29
+
### Notes:
30
+
- The package version is updated automatically (see setup.cfg)
0 commit comments