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
+51-40Lines changed: 51 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,73 +52,84 @@ If you are modifying code, make sure it has no warnings when building.
52
52
53
53
By contributing, you agree that your contributions will be licensed under its Apache License 2.0.
54
54
55
-
#Building the solution
55
+
## Preparing for a New Release
56
56
57
-
The solution uses several open source software tools:
57
+
The client uses generated stubs from upstream Qdrant proto definitions, which are downloaded from [qdrant/qdrant](https://github.com/qdrant/qdrant/tree/master/lib/api/src/grpc/proto).
58
58
59
-
## Docker
59
+
The generated files do not form part of the checked-in source code. Instead, they are generated
60
+
and emitted into the `build/generated/source directory`, and included in compilation.
60
61
61
-
Qdrant docker image is used to run integration tests. Be sure to
62
-
[install docker](https://docs.docker.com/engine/install/) and have it running when running tests.
62
+
### Pre-requisites
63
63
64
-
## Gradle
64
+
Ensure the following are installed and available in the `PATH`.
65
65
66
-
[Gradle](https://docs.gradle.org/current/userguide/userguide.html) is used as the build automation tool for the solution.
67
-
To get started after cloning the solution, it's best to run the gradlew wrapper script in the root
-[Docker](https://docs.docker.com/engine/install/) for tests.
68
69
69
-
for Windows
70
+
If you're using IntelliJ IDEA, see [this section](#intellij-idea)for steps to handle an IntelliSense issue.
70
71
71
-
```
72
+
### Steps
73
+
74
+
1. Update the values in [gradle.properties](https://github.com/qdrant/java-client/blob/master/gradle.properties) as follows:
75
+
76
+
-`packageVersion` - Bump it to the next minor version to be released.
77
+
-`qdrantVersion` - Set it to `dev` to use the `dev` Docker image for testing.
78
+
-`qdrantProtosVersion` - Set it to `dev` to use the `dev` branch for fetching the proto files.
79
+
80
+
2. Download and generate the latest client stubs by running the following command from the project root:
81
+
82
+
For Windows
83
+
84
+
```bash
72
85
.\gradlew.bat build
73
86
```
74
87
75
-
for OSX/Linux
88
+
For OSX/Linux
76
89
77
-
```
90
+
```bash
78
91
./gradlew build
79
92
```
80
93
81
94
This will
82
95
83
-
- Pull down all the dependencies for the build process as well as the solution
84
-
- Run the default build task for the solution
96
+
- Pull down all the dependencies for the build process and the project.
97
+
- Run the default build task.
98
+
- Run the integration tests. Ensure Docker running.
85
99
86
-
You can also compile the solution within IntelliJ or other IDEs if you prefer.
100
+
If a Qdrant image with static tags like `dev` or `latest` already exists on your system, the tests will use it. You can remove these images before running the tests to fetch the most up-to-date versions.
87
101
88
-
## Tests
102
+
3. Implement new Qdrant methods in [`QdrantClient.java`](https://github.com/qdrant/java-client/blob/master/src/main/java/io/qdrant/client/QdrantClient.java) with associated tests in [src/test](https://github.com/qdrant/java-client/tree/master/src/test/java/io/qdrant/client).
89
103
90
-
jUnit5 tests are run as part of the default build task. These can also be run with
104
+
Since the API reference is published at <https://qdrant.github.io/java-client>, the docstrings have to be appropriate.
91
105
92
-
```
93
-
./gradlew test
94
-
```
106
+
4. If there are any new complex/frequently used properties in the proto definitions, add factory classes in [`src/main`](https://github.com/qdrant/java-client/tree/master/src/main/java/io/qdrant/client) following the existing patterns.
95
107
96
-
## Updating the client
108
+
5. Submit your pull request and get those approvals.
97
109
98
-
A large portion of the client is generated from the upstream qdrant proto definitions, which are
99
-
downloaded locally as needed, based on the version defined by `qdrantProtosVersion` in gradle.properties
100
-
in the root directory.
110
+
### Releasing a New Version
101
111
102
-
When a new qdrant version is released upstream, update the `qdrantProtosVersion` value to the new version,
103
-
then run the build script
112
+
Once the new Qdrant version is live:
104
113
105
-
for Windows
114
+
1. Update the values in [gradle.properties](https://github.com/qdrant/java-client/blob/master/gradle.properties) as follows and build as mentioned above:
106
115
107
-
```
108
-
.\gradlew.bat build
109
-
```
116
+
-`qdrantVersion` - Set it to the released Docker image version for testing.
117
+
-`qdrantProtosVersion` - Set it to the released version of the Qdrant source for fetching the proto files.
110
118
111
-
for OSX/Linux
119
+
2. Merge the pull request.
112
120
113
-
```
114
-
./gradlew build
115
-
```
121
+
3. Publish a new release at <https://github.com/qdrant/java-client/releases>. The CI will then publish the library to [mvnrepository.com/artifact/io.qdrant/client](https://mvnrepository.com/artifact/io.qdrant/client) and the docs to <https://qdrant.github.io/java-client>.
122
+
123
+
### IntelliJ IDEA
124
+
125
+
If you're using [IntelliJ IDEA](https://www.jetbrains.com/idea/), IntelliSense may fail to work correctly due to large source files generated from proto-definitions.
126
+
127
+
To resolve this, you can increase the file size limit by configuring IntelliJ IDEA as follows:
128
+
129
+
1. In the top menu, navigate to `Help` -> `Edit Custom Properties`.
116
130
117
-
A specific version of the qdrant docker image can be targeted by modifying the `qdrantVersion`
118
-
in gradle.properties.
131
+
2. Set the `idea.max.intellisense.filesize` properly to a higher value.
119
132
120
-
The generated files do not form part of the checked in source code. Instead, they are generated
121
-
and emitted into the build/generated/source directory, and included in compilation.
133
+

122
134
123
-
If upstream changes to proto definitions change the API of generated code, you may need
124
-
to fix compilation errors in code that relies on that generated code.
135
+
3. After saving the changes, restart the IDE to apply the new file size limit.
0 commit comments