Skip to content

Commit c53af44

Browse files
author
Brendan Chou
authored
v2.0.0: Update Package Requirements and use Github Actions (#188)
1 parent dd166d2 commit c53af44

11 files changed

Lines changed: 109 additions & 81 deletions

File tree

.circleci/config.yml

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

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository code
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Python 3.11
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.11
20+
21+
- name: Install Dependencies
22+
run: sudo pip install -r requirements-lint.txt
23+
24+
- name: Lint
25+
run: flake8

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Push to ECR
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out repository code
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Python 3.11
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: 3.11
19+
20+
- name: Install Dependencies
21+
run: sudo pip install -r requirements-publish.txt
22+
23+
- name: init .pypirc
24+
env:
25+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
26+
run: |
27+
echo -e "[pypi]" >> ~/.pypirc
28+
echo -e "username = __token__" >> ~/.pypirc
29+
echo -e "password = $PYPI_TOKEN" >> ~/.pypirc
30+
31+
- name: create packages
32+
run: python3 setup.py sdist bdist_wheel
33+
34+
- name: upload to pypi
35+
run: python3 -m twine upload dist/* --skip-existing

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository code
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Python 3.11
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.11
20+
21+
- name: Run Ganache
22+
run: docker-compose up -d
23+
24+
- name: Install Dependencies
25+
run: sudo pip install -r requirements-test.txt
26+
27+
- name: Test
28+
env:
29+
V3_API_HOST: https://api.stage.dydx.exchange
30+
run: tox

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
<p align="center"><img src="https://s3.amazonaws.com/dydx-assets/dydx_logo_black.svg" width="256" /></p>
1+
<p align="center"><img src="https://dydx.exchange/flat.svg" width="256" /></p>
22

33
<div align="center">
4-
<a href="https://circleci.com/gh/dydxprotocol/workflows/dydx-v3-python/tree/master">
5-
<img src="https://img.shields.io/circleci/project/github/dydxprotocol/dydx-v3-python.svg?token=089b73e1b03736647446c0d80057bc8609790e2d" alt='CI' />
6-
</a>
74
<a href='https://pypi.org/project/dydx-v3-python'>
85
<img src='https://img.shields.io/pypi/v/dydx-v3-python.svg' alt='PyPI'/>
96
</a>

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3'
22
services:
33
ganache:
4-
image: trufflesuite/ganache-cli:v6.6.0
4+
image: trufflesuite/ganache-cli:v6.12.2
55
ports:
66
- 8545:8545
77
command: ganache-cli -d -k=petersburg -i 1001

requirements-publish.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
setuptools==50.3.2
1+
setuptools>=60.0.0
22
wheel==0.33.4
33
twine==1.13.0

requirements-test.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
aiohttp>=3.8.1
2+
cytoolz==0.11.2
3+
dateparser==1.0.0
4+
ecdsa>=0.16.0
5+
eth_keys
6+
eth-account>=0.4.0,<0.6.0
7+
mpmath==1.0.0
8+
pytest>=7.0.0
9+
requests>=2.22.0,<3.0.0
10+
six==1.14
11+
sympy==1.6
12+
tox>=4.3.4
13+
web3>=5.0.0,<6.0.0

requirements.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@ ecdsa>=0.16.0
55
eth_keys
66
eth-account>=0.4.0,<0.6.0
77
mpmath==1.0.0
8-
pytest>=4.4.0,<5.0.0
9-
requests-mock==1.6.0
10-
requests==2.22.0
11-
setuptools==50.3.2
8+
requests>=2.22.0,<3.0.0
129
six==1.14
1310
sympy==1.6
14-
tox==3.25.0
1511
web3>=5.0.0,<6.0.0
16-
importlib-metadata>=1.6.1

setup.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@
1010
'eth_keys',
1111
'eth-account>=0.4.0,<0.6.0',
1212
'mpmath==1.0.0',
13-
'pytest>=4.4.0,<5.0.0',
14-
'requests-mock==1.6.0',
1513
'requests>=2.22.0,<3.0.0',
16-
'setuptools==50.3.2',
1714
'sympy==1.6',
18-
'tox==3.13.2',
1915
'web3>=5.0.0,<6.0.0',
2016
]
2117

2218
setup(
2319
name='dydx-v3-python',
24-
version='1.9.2',
20+
version='2.0.0',
2521
packages=find_packages(),
2622
package_data={
2723
'dydx3': [

0 commit comments

Comments
 (0)