-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
48 lines (41 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.PHONY: build
build:
echo "nothing to compile"
.PHONY: bootstrap
bootstrap:
python setup.py install
.PHONY: test
test:
python setup.py test
.PHONY: example
example: bootstrap
python examples/main.py
.PHONY: lint
lint:
pip install flake8
python -m flake8 ./haystack --exclude *_pb2* && echo "Flake8 passed without any issues!"
.PHONY: integration_tests
integration_tests:
docker-compose -f tests/integration/docker-compose.yml -p sandbox up -d
echo "sleeping for 15s while kafka/zookeeper initialize"
sleep 15
docker run -it \
--rm \
--network=sandbox_default \
-v $(PWD):/ws \
-w /ws \
python:3.8 \
/bin/sh -c 'python setup.py install && pip install kafka-python && python tests/integration/integration.py'
docker-compose -f tests/integration/docker-compose.yml -p sandbox stop
.PHONY: set_version
set_version:
pip install semver
pip install requests
python ./scripts/version.py
.PHONY: proto_compile
proto_compile:
git submodule init -- ./haystack-idl
git submodule update
pip install grpcio-tools
python -m grpc_tools.protoc -I haystack-idl/ --python_out=./haystack haystack-idl/proto/span.proto
python -m grpc_tools.protoc -I haystack-idl/proto --python_out=./haystack/proto --grpc_python_out=./haystack/proto agent/spanAgent.proto