From ff921a9531973677e428bb8101cb74bb1dbf0d53 Mon Sep 17 00:00:00 2001 From: Daniel Leicht Date: Tue, 8 Nov 2022 11:58:58 +0200 Subject: [PATCH 1/2] Fixed issues with the Dockerfile The Dockerfile image could not be built: 1. The apt command prompted for a confirmation on installation, this makes the image build fail, so -y was added to suppress the confirmation. 2. The certificate of the GIT repository seems to not match anymore (due to outdated os or go version perphaps?), so added a flag to ignore certificate errors. --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d3009de..8973c50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM golang:1.12-buster -RUN apt update && apt install bzip2 +RUN apt update && apt install -y bzip2 RUN mkdir -p /yap/src COPY . /yap/src/yap @@ -9,6 +9,8 @@ ENV GOPATH=/yap WORKDIR /yap/src/yap RUN bunzip2 data/*.bz2 + +ENV GIT_SSL_NO_VERIFY=1 RUN go get . RUN go build . From 4a2083364c49a30a8a968d9ae9dea5108317c994 Mon Sep 17 00:00:00 2001 From: Daniel Leicht Date: Tue, 8 Nov 2022 12:01:18 +0200 Subject: [PATCH 2/2] Updated Python example in the README file - Fixed the typo in the import statement. - Added printing of the result. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 77f8776..a2d5e46 100644 --- a/README.md +++ b/README.md @@ -245,8 +245,9 @@ $ When sending the request from a Python client, try using this code: ```python + from pprint import pprint import requests - impot json + import json text = 'גנן גידל דגן בגן' localhost_yap = "http://localhost:8000/yap/heb/joint" @@ -254,6 +255,7 @@ $ headers = {'content-type': 'application/json'} response = requests.get(url=localhost_yap, data=data, headers=headers) json_response = response.json() + pprint(json_response) ``` ## Joint vs Pipeline