Python publish for v3 (#2383)

* Remove pre-release suffixes from version numbers

* For wrapper test, pull latest ganache image first

* For wrapper test, unpin ganache, use beta snapshot

* In docs, advise using beta ganache snapshot

Because we haven't yet published the non-beta snapshot

* Unpin package interdependencies

* unpin tests from beta 0xorg/ganache-cli version

* use beta ganache snapshot

* Set release date in CHANGELOGs

* In testing deployment, stop testing pre-releases

* Include rmtree("build") in all clean commands

* Fix clean not cleaning what it thought it was

* In monorepo script, install pkgs 1st then dev deps

* Stop pinning ganache snapshot version

* In test setup, wait longer for mesh to start up

* Fix broken hyperlinks in docs

* fix missing \n that was breaking doc rendering

* In monorepo script comment, fix typo, and clarify
This commit is contained in:
F. Eugene Aumson
2019-12-04 08:42:00 -08:00
committed by GitHub
parent 8685cf9036
commit 4f17a251d3
28 changed files with 74 additions and 61 deletions

View File

@@ -1,6 +1,6 @@
# Changelog
## 2.0.0 - TBD
## 2.0.0 - 2019-12-03
- Updated for version 3 of the protocol.
- Allow wrappers to be instantiated with EITHER a Web3.py `BaseProvider` OR an already-instantiated `Web3` client object.

View File

@@ -123,6 +123,7 @@ class CleanCommandExtension(clean):
def run(self):
"""Run the regular clean, followed by our custom commands."""
super().run()
rmtree("build", ignore_errors=True)
rmtree("dist", ignore_errors=True)
rmtree(".mypy_cache", ignore_errors=True)
rmtree(".tox", ignore_errors=True)
@@ -183,10 +184,10 @@ class GanacheCommand(distutils.command.build_py.build_py):
def run(self):
"""Run ganache."""
cmd_line = (
"docker run -d -p 8545:8545 0xorg/ganache-cli:2.2.2"
).split()
subprocess.call(cmd_line) # nosec
subprocess.call(("docker pull 0xorg/ganache-cli").split()) # nosec
subprocess.call( # nosec
("docker run -d -p 8545:8545 0xorg/ganache-cli").split()
)
with open("README.md", "r") as file_handle:
@@ -195,7 +196,7 @@ with open("README.md", "r") as file_handle:
setup(
name="0x-contract-wrappers",
version="2.0.0.dev10",
version="2.0.0",
description="Python wrappers for 0x smart contracts",
long_description=README_MD,
long_description_content_type="text/markdown",
@@ -216,10 +217,10 @@ setup(
"ganache": GanacheCommand,
},
install_requires=[
"0x-contract-addresses==3.0.0.dev3",
"0x-contract-artifacts==3.0.0.dev2",
"0x-json-schemas==2.1.0.dev2",
"0x-order-utils==4.0.0.dev8",
"0x-contract-addresses",
"0x-contract-artifacts",
"0x-json-schemas",
"0x-order-utils",
"web3",
"attrs",
"eth_utils",

View File

@@ -203,23 +203,23 @@ zero_ex.contract_wrappers.exchange: Generated Tuples
.. autoclass:: zero_ex.contract_wrappers.exchange.LibOrderOrder
This is the generated class representing `the Order struct <https://0x.org/docs/contracts#structs-Order>`_.
This is the generated class representing `the Order struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#order>`_.
.. autoclass:: zero_ex.contract_wrappers.exchange.LibFillResultsFillResults
This is the generated class representing `the FillResults struct <https://0x.org/docs/contracts#structs-FillResults>`_.
This is the generated class representing `the FillResults struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#fillresults>`_.
.. autoclass:: zero_ex.contract_wrappers.exchange.LibFillResultsMatchedFillResults
This is the generated class representing `the MatchedFillResults struct <https://0x.org/docs/contracts#structs-MatchedFillResults>`_.
This is the generated class representing `the MatchedFillResults struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#matchedfillresults>`_.
.. autoclass:: zero_ex.contract_wrappers.exchange.LibOrderOrderInfo
This is the generated class representing `the OrderInfo struct <https://0x.org/docs/contracts#structs-OrderInfo>`_.
This is the generated class representing `the OrderInfo struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#orderinfo>`_.
.. autoclass:: zero_ex.contract_wrappers.exchange.LibZeroExTransactionZeroExTransaction
This is the generated class representing `the ZeroExTransaction struct <https://0x.org/docs/contracts#structs-ZeroExTransaction>`_.
This is the generated class representing `the ZeroExTransaction struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#zeroextransaction>`_.
Indices and tables
==================

View File

@@ -12,8 +12,8 @@ Install the 0x-contract-wrappers with pip::
We need a Web3 provider to allow us to talk to the blockchain. You can
read `more about providers in the Web3.py documentation
<https://web3py.readthedocs.io/en/stable/providers.htm>`_. The examples below
assume there's a local instance of Ganache listening on port 8545:
<https://web3py.readthedocs.io/en/stable/>`_. The examples below assume
there's a local instance of Ganache listening on port 8545:
>>> from web3 import HTTPProvider
>>> ganache = HTTPProvider("http://localhost:8545")
@@ -21,7 +21,7 @@ assume there's a local instance of Ganache listening on port 8545:
To replicate these examples, one can use the `0xorg/ganache-cli`:code: docker
image, which comes with the 0x contracts pre-deployed. To start it::
docker run docker run -d -p 8545:8545 0xorg/ganache-cli
docker run -d -p 8545:8545 0xorg/ganache-cli
Accounts
--------

View File

@@ -22,5 +22,5 @@ commands =
[testenv:run_tests_against_deployment]
setenv = PY_IGNORE_IMPORTMISMATCH = 1
commands =
pip install --pre 0x-contract-wrappers[dev]
pip install 0x-contract-wrappers[dev]
pytest --doctest-modules src test