Skip to content

Commit

Permalink
feat: Updating protobuf generation to new version
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMcL committed Aug 16, 2022
1 parent a0006dd commit b56c726
Show file tree
Hide file tree
Showing 29 changed files with 2,328 additions and 10,990 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ build_deps_ui:
build_proto: pull_deps
@rm -rf ./vega_sim/proto
@mkdir ./vega_sim/proto
@python -m grpc_tools.protoc -I ${EXTERN_DIR}/vega/protos/sources --python_out=vega_sim/proto --grpc_python_out=vega_sim/proto $(shell find ${EXTERN_DIR}/vega/protos/sources -name '*.proto')
@buf generate extern/vega/protos/sources
@GENERATED_DIR=./vega_sim/proto scripts/post-generate.sh

.PHONY: black
Expand Down
7 changes: 7 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: v1
plugins:
- remote: buf.build/protocolbuffers/plugins/python
out: ./vega_sim/proto
- remote: buf.build/grpc/plugins/python
out: ./vega_sim/proto
35 changes: 34 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ matplotlib = {version = "^3.5.2", optional = true}
snakeviz = {version = "^2.1.1", optional = true}
pytest-profiling = {version = "^1.7.0", optional = true}
ipywidgets = {version = "^7.7.1", extras = ["plotly"]}
grpc-gateway-protoc-gen-openapiv2 = "^0.1.0"

[tool.poetry.dev-dependencies]
black = "^22.3.0"
Expand Down
6 changes: 3 additions & 3 deletions tests/vega_sim/api/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ def Assets(self, request, context):
vega_protos.assets.Asset(
id="asset1_id",
details=vega_protos.assets.AssetDetails(
name="asset1", symbol="A1", total_supply="1000000", decimals=5
name="asset1", symbol="A1", decimals=5
),
),
vega_protos.assets.Asset(
id="asset2_id",
details=vega_protos.assets.AssetDetails(
name="asset2", symbol="A2", total_supply="1000000", decimals=5
name="asset2", symbol="A2", decimals=5
),
),
vega_protos.assets.Asset(
id="asset3_id",
details=vega_protos.assets.AssetDetails(
name="asset3", symbol="A3", total_supply="1000000", decimals=5
name="asset3", symbol="A3", decimals=5
),
),
]
Expand Down
2 changes: 0 additions & 2 deletions vega_sim/api/governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ def propose_asset(
wallet: Wallet,
name: str,
symbol: str,
total_supply: int,
decimals: int,
data_client: vac.VegaTradingDataClient,
quantum: int = 1,
Expand All @@ -366,7 +365,6 @@ def propose_asset(
asset_detail = vega_protos.assets.AssetDetails(
name=name,
symbol=symbol,
total_supply=str(int(total_supply)),
decimals=decimals,
quantum=str(int(quantum)),
builtin_asset=vega_protos.assets.BuiltinAsset(
Expand Down
2,771 changes: 336 additions & 2,435 deletions vega_sim/proto/data_node/api/v1/trading_data_pb2.py

Large diffs are not rendered by default.

3,218 changes: 455 additions & 2,763 deletions vega_sim/proto/data_node/api/v2/trading_data_pb2.py

Large diffs are not rendered by default.

Loading

0 comments on commit b56c726

Please sign in to comment.