Skip to content

Commit

Permalink
Change dydxpy to v4-proto-py (v4-proto package name) (#197)
Browse files Browse the repository at this point in the history
* Change dydxpy to v4-telescope-py

* v4-telescope-py -> v4-proto-py (v4-proto package name)

* fix merge

* nit merge fix
  • Loading branch information
jiajames authored Sep 7, 2023
1 parent d414025 commit 8c046a2
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on: # yamllint disable-line rule:truthy
- '**.pb.gw.go'
- 'indexer/packages/v4-protos/**'
# Code that affects generation
- 'v4-proto-py/**'
- 'v4-proto-js/**'
- 'dydxpy/**'
- 'proto/**'
- 'indexer/package.json'
- 'protocol/scripts/protoc**'
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
npm install -g [email protected]
pnpm install --loglevel warn --frozen-lockfile
cd packages/v4-protos && npm run build:verify-proto
dydxpy-gen:
v4-proto-py-gen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -95,8 +95,8 @@ jobs:
VERSION="1.26.1" && \
curl -sSL "https://github.com/bufbuild/buf/releases/download/v${VERSION}/buf-Linux-x86_64" -o "${BIN}/buf" && \
chmod +x "${BIN}/buf"
- run: pip install -r ./dydxpy/requirements.txt
- run: make dydxpy-gen
- run: pip install -r ./v4-proto-py/requirements.txt
- run: make v4-proto-py-gen
v4-proto-js-gen:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/protocol-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ jobs:
asset_content_type: application/gzip
# TODO(DEC-1743): add build report and binary check sums

dydxpy-release:
v4-proto-py-release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./dydxpy
working-directory: ./v4-proto-py

steps:
- name: Check out repository code
Expand All @@ -99,9 +99,9 @@ jobs:
- name: Install Requirements
run: pip install -r requirements-publish.txt

- name: Generate dydxpy
- name: Generate v4-proto-py
working-directory: ./ # Move to parent folder
run: make dydxpy-gen
run: make v4-proto-py-gen

- name: Set Env from Tag (remove 'v' prefix)
run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/protocol/v} | tr '-' '.')" >> $GITHUB_ENV
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.gen
.proto-export
.proto-export-deps
dydxpy/build
dydxpy/dist
dydxpy/dydxpy.egg-info/
dydxpy/dydxpy
v4-proto-py/build
v4-proto-py/dist
v4-proto-py/v4-proto-py.egg-info/
v4-proto-py/v4-proto-py
v4-proto-js/build
v4-proto-js/node_modules
v4-proto-js/src
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ proto-export-deps:

PROTO_DIRS=$(shell find .proto-export-deps -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)

dydxpy-gen: proto-export-deps
@rm -rf ./dydxpy/dydxpy
@mkdir -p ./dydxpy/dydxpy
v4-proto-py-gen: proto-export-deps
@rm -rf ./v4-proto-py/v4-proto-py
@mkdir -p ./v4-proto-py/v4-proto-py
@for dir in $(PROTO_DIRS); do \
python3 -m grpc_tools.protoc \
-I .proto-export-deps \
--python_out=./dydxpy/dydxpy \
--pyi_out=./dydxpy/dydxpy \
--grpc_python_out=./dydxpy/dydxpy \
--python_out=./v4-proto-py/v4-proto-py \
--pyi_out=./v4-proto-py/v4-proto-py \
--grpc_python_out=./v4-proto-py/v4-proto-py \
$$(find ./$${dir} -type f -name '*.proto'); \
done; \
touch dydxpy/dydxpy/__init__.py
touch v4-proto-py/v4-proto-py/__init__.py

.PHONY: proto-format proto-lint proto-check-bc-breaking proto-export proto-export-deps dydxpy-gen
.PHONY: proto-format proto-lint proto-check-bc-breaking proto-export proto-export-deps v4-proto-py-gen
2 changes: 1 addition & 1 deletion proto/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TODO(roy): These are currently not used. Clean this up when moving v4-proto-js and dydxpy.
# TODO(roy): These are currently not used. Clean this up when moving v4-proto-js and v4-proto-py.
# v4-proto-js needs cosmos protos that aren't depended on by dydx protos.
# Running the export command above will only get a subset of cosmos protos.
# For now, we will export cosmos protos separately. Note that this doesn't verify the digest.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dydxpy/setup.py → v4-proto-py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
required = f.read().splitlines()

setup(
name="dydxpy",
name="v4-proto",
version="0.0.0",
author="dYdX Trading Inc.",
author_email="[email protected]",
Expand Down

0 comments on commit 8c046a2

Please sign in to comment.