Skip to content

Commit

Permalink
Merge pull request #130 from tattle-made/hotfix
Browse files Browse the repository at this point in the history
Hotfix
  • Loading branch information
duggalsu authored Mar 6, 2024
2 parents ead206d + 4903a49 commit b74f0c7
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 60 deletions.
112 changes: 57 additions & 55 deletions .ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,61 @@ services:
context: ./../src
dockerfile: Dockerfile.test
target: test
env_file: ./../src/test.env
command: bash -c "python -c 'import time';
while ! curl store:9200 | grep -q 'You Know, for Search'
&& ! curl queue:15672 | grep -q '<!DOCTYPE html>';
do python -c 'time.sleep(10)';
done;
nose2 tests"
links:
- store
- queue
depends_on:
store:
condition: service_started
queue:
condition: service_started
# env_file: ./../src/test.env
command: bash -c "python -m unittest discover -s ./tests/core/models -p "test_*.py";
python -m unittest core.operators.test_vid_vec_rep_resnet;
python -m unittest core.operators.test_audio_vec_embedding"
# bash -c "python -c 'import time';
# while ! curl store:9200 | grep -q 'You Know, for Search'
# && ! curl queue:15672 | grep -q '<!DOCTYPE html>';
# do python -c 'time.sleep(10)';
# done;
# links:
# - store
# - queue
# depends_on:
# store:
# condition: service_started
# queue:
# condition: service_started

store:
container_name: es
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0
volumes:
- ./.docker/es/data:/var/lib/elasticsearch/data
# ports:
# - "9300:9300"
# - "9200:9200"
environment:
- xpack.security.enabled=false
- discovery.type=single-node
- http.cors.enabled=true
- http.cors.allow-origin=http://localhost:1358,http://127.0.0.1:1358
- http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
- http.cors.allow-credentials=true
- ES_JAVA_OPTS=-Xms750m -Xmx2g
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK

queue:
image: rabbitmq:3.12.12-management
container_name: rabbitmq
hostname: rabbit
volumes:
- ./.docker/rabbitmq/data:/var/lib/rabbitmq
- ./.docker/rabbitmq/logs:/var/log/rabbitmq
environment:
RABBITMQ_ERLANG_COOKIE: "secret-cookie"
RABBITMQ_DEFAULT_USER: "admin"
RABBITMQ_DEFAULT_PASS: "Admin123"
# ports:
# - "5672:5672"
# - "15672:15672"
# store:
# container_name: es
# image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0
# volumes:
# - ./.docker/es/data:/var/lib/elasticsearch/data
## ports:
## - "9300:9300"
## - "9200:9200"
# environment:
# - xpack.security.enabled=false
# - discovery.type=single-node
# - http.cors.enabled=true
# - http.cors.allow-origin=http://localhost:1358,http://127.0.0.1:1358
# - http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
# - http.cors.allow-credentials=true
# - ES_JAVA_OPTS=-Xms750m -Xmx2g
# ulimits:
# memlock:
# soft: -1
# hard: -1
# nofile:
# soft: 65536
# hard: 65536
# cap_add:
# - IPC_LOCK
#
# queue:
# image: rabbitmq:3.12.12-management
# container_name: rabbitmq
# hostname: rabbit
# volumes:
# - ./.docker/rabbitmq/data:/var/lib/rabbitmq
# - ./.docker/rabbitmq/logs:/var/log/rabbitmq
# environment:
# RABBITMQ_ERLANG_COOKIE: "secret-cookie"
# RABBITMQ_DEFAULT_USER: "admin"
# RABBITMQ_DEFAULT_PASS: "Admin123"
## ports:
## - "5672:5672"
## - "15672:15672"
4 changes: 2 additions & 2 deletions .github/workflows/merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:

- name: Dry Run to get next release version
id: next_version
shell: bash
run: |
pip install python-semantic-release
export NEXT_TAG_VERSION=$(semantic-release --noop version --print)
echo "new_tag_version=${NEXT_TAG_VERSION}" >> $GITHUB_OUTPUT
echo "new_tag_version=$(semantic-release --noop version --print)" >> $GITHUB_OUTPUT
- name: Python Semantic Release
id: release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Launch containers to run tests
id: vars
run: |
docker compose -f ./.ci/docker-compose.yml -p ci up -d store queue sut
docker compose -f ./.ci/docker-compose.yml -p ci up -d sut
docker logs -f ci-sut-1
echo "sut_output=$(docker wait ci-sut-1)" >> $GITHUB_OUTPUT
Expand Down
4 changes: 2 additions & 2 deletions src/core/operators/test_audio_vec_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def tearDownClass(cls):
# delete config files
pass

# @skip
@skip
def test_sample_audio_from_disk(self):
audio_file_path = AudioFactory.make_from_file_on_disk(r'core/operators/sample_data/audio.wav')
audio_emb = audio_vec_embedding.run(audio_file_path)
Expand All @@ -26,4 +26,4 @@ def test_sample_audio_from_url(self):
"https://raw.githubusercontent.com/tattle-made/feluda/main/src/core/operators/sample_data/audio.wav"
)
audio_emb = audio_vec_embedding.run(audio_path)
self.assertEqual(2048, len(audio_emb))
self.assertEqual(2048, len(audio_emb))

0 comments on commit b74f0c7

Please sign in to comment.