Skip to content

Commit 07d1bdf

Browse files
authored
Use poetry (#337)
1 parent ea99dee commit 07d1bdf

18 files changed

+258
-644
lines changed

docker/Dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ RUN apt-get install -qq \
1616
git \
1717
libzstd1 \
1818
libzstd-dev \
19-
python3-pytest \
20-
python3-pytest-asyncio \
21-
python3-websockets \
2219
sudo \
2320
zlib1g \
2421
zlib1g-dev \
@@ -46,15 +43,14 @@ RUN mkdir /usr/bin/sdk/bpf/dependencies \
4643
USER pyth
4744
WORKDIR /home/pyth
4845

46+
# Install poetry
47+
RUN curl -sSL https://install.python-poetry.org | python3 -
48+
ENV PATH="${PATH}:/home/pyth/.local/bin:/home/pyth/pyth-client/build"
49+
50+
#Install rust
4951
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
5052
| sh -s -- -y
5153

52-
53-
RUN echo "\n\
54-
export PATH=\"\${PATH}:\${HOME}/pyth-client/build:\${HOME}/.cargo/bin\"\n\
55-
export PYTHONPATH=\"\${PYTHONPATH:+\$PYTHONPATH:}\${HOME}/pyth-client\"\n\
56-
" >> .profile
57-
5854
COPY --chown=pyth:pyth . pyth-client/
5955

6056
# Build off-chain binaries.
@@ -69,7 +65,7 @@ RUN cd pyth-client && ./scripts/build-bpf.sh .
6965
RUN cd pyth-client && ./scripts/check-size.sh
7066
# Run aggregation logic tests
7167
RUN cd pyth-client && ./scripts/run-aggregation-tests.sh
72-
RUN /bin/bash -l -c "pytest-3 --pyargs pyth"
68+
RUN cd pyth-client/pyth && poetry install && poetry run python -m pytest
7369

7470
ENTRYPOINT []
7571
CMD []

pctest/add_publisher.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

pctest/create_products.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

pctest/get_product_list.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

pctest/get_products.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

pctest/init_prices.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)