diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2038abe --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.* +data diff --git a/.gitmodules b/.gitmodules index 93f1303..4346aa5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "emotion-anew/data"] - path = emotion-anew/data - url = ../data/emotion-anew.git -[submodule "emotion-wnaffect/data"] - path = emotion-wnaffect/data - url = ../data/emotion-wnaffect.git -[submodule "sentiment-basic/data"] - path = sentiment-basic/data - url = ../data/sentiment-basic.git \ No newline at end of file +[submodule "data"] + path = data + url = ../data diff --git a/Dockerfile b/Dockerfile index f272ce2..ad7de37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -from gsiupm/senpy:0.10.5-python2.7 +from gsiupm/senpy:0.10.6-python2.7 RUN python -m nltk.downloader stopwords RUN python -m nltk.downloader punkt diff --git a/Makefile b/Makefile index a0cb61b..64c5094 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ ifdef SENPY_FOLDER all: build run test-%: - docker run $(DOCKER_FLAGS) -v $$PWD/$*:/senpy-plugins/ --rm $(IMAGEWTAG) --only-test $(TEST_FLAGS) + docker run $(DOCKER_FLAGS) -v $$PWD/$*:/senpy-plugins/ -v $$PWD/data:/data/ --rm $(IMAGEWTAG) --only-test $(TEST_FLAGS) test: test-. diff --git a/data b/data new file mode 160000 index 0000000..f34155c --- /dev/null +++ b/data @@ -0,0 +1 @@ +Subproject commit f34155c3891b8919a1d73bae410cb5113f1bf959 diff --git a/emotion-anew/data b/emotion-anew/data deleted file mode 160000 index 76b75e3..0000000 --- a/emotion-anew/data +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 76b75e348a0251a66ff8f6eb44eb1d872d4990c2 diff --git a/emotion-wnaffect/data b/emotion-wnaffect/data deleted file mode 160000 index 0dc601a..0000000 --- a/emotion-wnaffect/data +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0dc601a8713984812666ae6ef5f2d25c065dba17 diff --git a/emotion-wnaffect/emotion-wnaffect.py b/emotion-wnaffect/emotion-wnaffect.py index 0a59b7b..bc7e57a 100644 --- a/emotion-wnaffect/emotion-wnaffect.py +++ b/emotion-wnaffect/emotion-wnaffect.py @@ -219,7 +219,7 @@ class WNAffect(EmotionPlugin, ShelfMixin): matches = 1 for i in feature_set: - feature_set[i] = (feature_set[i] / matches) * 100 + feature_set[i] = (feature_set[i] / matches) return feature_set diff --git a/k8s/senpy-deployment.yaml b/k8s/senpy-deployment.yaml index e8608d0..da3f465 100644 --- a/k8s/senpy-deployment.yaml +++ b/k8s/senpy-deployment.yaml @@ -22,3 +22,15 @@ spec: ports: - name: web containerPort: 5000 + volumeMounts: + # name must match the volume name below + - name: senpy-data + mountPath: "/data" + subPath: data + env: + - name: SENPY_DATA + value: '/data' + volumes: + - name: senpy-data + persistentVolumeClaim: + claimName: senpy-pvc diff --git a/sentiment-basic/data b/sentiment-basic/data deleted file mode 160000 index 7f99680..0000000 --- a/sentiment-basic/data +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7f99680db607fd06dc46009a7dae13ca4fc4e6ce