From b6c8126589a94c2986c591ad7741cd3787a96e58 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Wed, 12 Dec 2018 17:47:25 -0800 Subject: Move zero_ex.json_schemas to its own package --- python-packages/order_utils/setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'python-packages/order_utils/setup.py') diff --git a/python-packages/order_utils/setup.py b/python-packages/order_utils/setup.py index 125de5ff7..fdf8d1e8e 100755 --- a/python-packages/order_utils/setup.py +++ b/python-packages/order_utils/setup.py @@ -171,9 +171,9 @@ setup( "ganache": GanacheCommand, }, install_requires=[ + "0x-json-schemas", "eth-abi", "eth_utils", - "jsonschema", "mypy_extensions", "web3", ], @@ -198,7 +198,6 @@ setup( package_data={ "zero_ex.order_utils": ["py.typed"], "zero_ex.contract_artifacts": ["artifacts/*"], - "zero_ex.json_schemas": ["schemas/*"], }, package_dir={"": "src"}, license="Apache 2.0", -- cgit From 72a56db5abc71d59f904dd0ff250474f97a52c99 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Wed, 2 Jan 2019 15:03:09 +1100 Subject: chore(python-packages): Change docker command in setup.py --- python-packages/order_utils/setup.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'python-packages/order_utils/setup.py') diff --git a/python-packages/order_utils/setup.py b/python-packages/order_utils/setup.py index 125de5ff7..31631d8d4 100755 --- a/python-packages/order_utils/setup.py +++ b/python-packages/order_utils/setup.py @@ -137,14 +137,8 @@ class GanacheCommand(distutils.command.build_py.build_py): def run(self): """Run ganache.""" cmd_line = ( - "docker run -d -p 8545:8545 0xorg/ganache-cli --gasLimit" - + " 10000000 --db /snapshot --noVMErrorsOnRPCResponse -p 8545" - + " --networkId 50 -m" + "docker run -d -p 8545:8545 0xorg/ganache-cli:2.2.2" ).split() - cmd_line.append( - "concert load couple harbor equip island argue ramp clarify fence" - + " smart topic" - ) subprocess.call(cmd_line) # nosec -- cgit From aa5af04447dfae24731557c6beead55bd8ff99a9 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Wed, 9 Jan 2019 09:58:29 -0500 Subject: Python contract demo, with lots of refactoring (#1485) * Refine Order for Web3 compat. & add conversions Changed some of the fields in the Order class so that it can be passed to our contracts via Web3. Added conversion utilities so that an Order can be easily converted to and from a JSON-compatible dict (specifically by encoding/decoding the `bytes` fields), to facilitate validation against the JSON schema. Also modified JSON order schema to accept integers in addition to stringified integers. * Fixes for json_schemas Has-types indicator file, py.typed, was not being included in package. Schemas were not being properly gathered into package installation. * Add test/demo of Exchange.getOrderInfo() * web3 bug workaround * Fix problem packaging contract artifacts * Move contract addresses to their own package * Move contract artifacts to their own package * Add scripts to install, test & lint all components * prettierignore files in local python dev env * Correct missing coverage analysis for sra_client * CI cache lint: don't save, re-use from test-python * tag hacks as hacks * correct merge mistake * remove local strip_0x() in favor of eth_utils * remove json schemas from old order_utils location * correct merge mistake * doctest json schemas via command-line, not code --- python-packages/order_utils/setup.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'python-packages/order_utils/setup.py') diff --git a/python-packages/order_utils/setup.py b/python-packages/order_utils/setup.py index 06533e60a..01a6c7360 100755 --- a/python-packages/order_utils/setup.py +++ b/python-packages/order_utils/setup.py @@ -21,7 +21,7 @@ class TestCommandExtension(TestCommand): """Invoke pytest.""" import pytest - exit(pytest.main()) + exit(pytest.main(["--doctest-modules"])) class LintCommand(distutils.command.build_py.build_py): @@ -165,9 +165,13 @@ setup( "ganache": GanacheCommand, }, install_requires=[ + "0x-contract-addresses", + "0x-contract-artifacts", "0x-json-schemas", "eth-abi", "eth_utils", + "hypothesis>=3.31.2", # HACK! this is web3's dependency! + # above works around https://github.com/ethereum/web3.py/issues/1179 "mypy_extensions", "web3", ], @@ -189,10 +193,7 @@ setup( ] }, python_requires=">=3.6, <4", - package_data={ - "zero_ex.order_utils": ["py.typed"], - "zero_ex.contract_artifacts": ["artifacts/*"], - }, + package_data={"zero_ex.order_utils": ["py.typed"]}, package_dir={"": "src"}, license="Apache 2.0", keywords=( -- cgit From e39ef60775728ae5d61e9090dc11f51ed5779178 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Wed, 9 Jan 2019 12:12:20 -0500 Subject: Clean up docs before publish --- python-packages/order_utils/setup.py | 1 + 1 file changed, 1 insertion(+) (limited to 'python-packages/order_utils/setup.py') diff --git a/python-packages/order_utils/setup.py b/python-packages/order_utils/setup.py index 01a6c7360..6f9465680 100755 --- a/python-packages/order_utils/setup.py +++ b/python-packages/order_utils/setup.py @@ -188,6 +188,7 @@ setup( "pylint", "pytest", "sphinx", + "sphinx-autodoc-typehints", "tox", "twine", ] -- cgit