Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
VERSION := $(shell cat VERSION)
REQUIRED_PROTOC_VERSION := 31.1

.PHONY: all python java readme
.PHONY: all python java readme check-protoc-version

all: clean python java readme
all: check-protoc-version clean python java readme

check-protoc-version:
@INSTALLED_VERSION=$$(protoc --version | awk '{print $$2}'); \
if [ "$$INSTALLED_VERSION" != "$(REQUIRED_PROTOC_VERSION)" ]; then \
echo "Error: protoc version $(REQUIRED_PROTOC_VERSION) required, but $$INSTALLED_VERSION is installed."; \
exit 1; \
fi

clean:
rm -f python/visionapi/visionapi/*pb2.py*
rm -f java/visionapi/src/main/java/de/starwit/visionapi/*.java

python:
python: check-protoc-version
protoc -I=. --python_out=python/visionapi/ --pyi_out=python/visionapi/ visionapi/*.proto
(cd python/visionapi && poetry version $(VERSION))

java:
java: check-protoc-version
protoc -I=. --java_out=java/visionapi/src/main/java/ visionapi/*.proto
(cd java/visionapi && mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$(VERSION))

Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ This repo contains the main data model for the Starwit Awareness Engine (SAE). S

### Python / Poetry
- Add the following to your `pyproject.toml` dependencies section\
`visionapi = { git = "https://github.com/starwit/vision-api.git", subdirectory = "python/visionapi", tag = "3.4.0" }`
`visionapi = { git = "https://github.com/starwit/vision-api.git", subdirectory = "python/visionapi", tag = "3.5.0" }`

### Java / Maven
- Add dependency to your project:
```xml
<dependency>
<groupId>de.starwit</groupId>
<artifactId>vision-api</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
</dependency>
```
- Add maven repository to your `~/.m2/settings.xml` (adapt example / your config as necessary):
Expand Down Expand Up @@ -65,7 +65,7 @@ This repo contains the main data model for the Starwit Awareness Engine (SAE). S
sudo apt install pipx
pipx install protoc-wrapper==31.1.0
```
* ! If you change protoc version, you need to change protobuf version in `java\visionapi\pom.xml` and `python\visionapi\pyproject.toml`
* ! If you change protoc version, you need to change protobuf version in `java\visionapi\pom.xml`, `python\visionapi\pyproject.toml` and protoc version in `Makefile`

## How-To Update
1. Make desired changes in `./visionapi`
Expand All @@ -82,6 +82,9 @@ This repo contains the main data model for the Starwit Awareness Engine (SAE). S
```

## Changelog
### 3.5.0
- Add `ModelMetadata` containing `class_names` mapping to `SaeMessage`

### 3.4.0
- Add `MessageType` field `type` to all top-level messages
- Add `TypeMessage` as a dummy to deserialize type field
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.0
3.5.0
2 changes: 1 addition & 1 deletion java/visionapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<artifactId>vision-api</artifactId>

<packaging>jar</packaging>
<version>3.4.0</version>
<version>3.5.0</version>
<name>visionapi</name>
<url>https://github.com/starwit/vision-api</url>

Expand Down
Loading