Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Update package info, docstrings, and README, add CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhly committed Mar 25, 2019
1 parent e2da6ee commit d854e31
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 25 deletions.
11 changes: 11 additions & 0 deletions python-packages/sra_demos/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"version": "1.0.0",
"changes": [
{
"note": "Initial publish",
"pr": 1726
}
]
}
]
6 changes: 3 additions & 3 deletions python-packages/sra_demos/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 0x-demos
## 0x-sra-demos

Demonstrations of using the 0x python packages.
Demonstrations of using the python 0x Standard Relayer API client.

Read the [documentation](http://0x-demos-py.s3-website-us-east-1.amazonaws.com/)

Expand All @@ -20,7 +20,7 @@ pip install -e .[dev]

### Test

`./setup.py test`
Tests depend on a running relayer instance that implements the 0x Standard Relayer API. For convenience, a docker container is provided that has the 0x-launch-kit server. A shortcut is provided to run that docker container: `./setup.py launch_kit`. With that running, the tests can be run with `./setup.py test`.

### Clean

Expand Down
10 changes: 5 additions & 5 deletions python-packages/sra_demos/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

"""setuptools module for 0x-demos package."""
"""setuptools module for 0x-sra-demos package."""

import distutils.command.build_py
from distutils.command.clean import clean
Expand Down Expand Up @@ -86,7 +86,7 @@ class PublishDocsCommand(distutils.command.build_py.build_py):

description = (
"Publish docs to "
+ "http://0x-demos-py.s3-website-us-east-1.amazonaws.com/"
+ "http://0x-sra-demos-py.s3-website-us-east-1.amazonaws.com/"
)

def run(self):
Expand All @@ -95,15 +95,15 @@ def run(self):


setup(
name="0x-demos",
name="0x-sra-demos",
version="1.0.0",
description="Demonstration of calling 0x contracts",
url=(
"https://github.com/0xProject/0x-monorepo/tree/development"
+ "/python-packages/demos"
),
author="F. Eugene Aumson",
author_email="feuGeneA@users.noreply.github.com",
author="Michael Huang",
author_email="michaelhly@users.noreply.github.com",
cmdclass={
"clean": CleanCommandExtension,
"launch_kit": LaunchKitCommand,
Expand Down
8 changes: 4 additions & 4 deletions python-packages/sra_demos/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
# pylint: disable=invalid-name
# because these variables are not named in upper case, as globals should be.

project = "0x-demos"
project = "0x-sra-demos"
# pylint: disable=redefined-builtin
copyright = "2018, ZeroEx, Intl."
author = "F. Eugene Aumson"
version = pkg_resources.get_distribution("0x-demos").version
author = "Michael Huang"
version = pkg_resources.get_distribution("0x-sra-demos").version
release = "" # The full version, including alpha/beta/rc tags

extensions = [
Expand Down Expand Up @@ -56,7 +56,7 @@
# so a file named "default.css" will overwrite the builtin "default.css".

# Output file base name for HTML help builder.
htmlhelp_basename = "demospydoc"
htmlhelp_basename = "srademospydoc"

# -- Extension configuration:

Expand Down
22 changes: 10 additions & 12 deletions python-packages/sra_demos/src/index.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
.. source for the sphinx-generated build/docs/web/index.html
Using the Python SRA_Client
=================================
============================

0x Protocol is an open standard. Many relayers opt-in to implementing a set of
`standard relayer API endpoints <http://sra-spec.s3-website-us-east-1.amazonaws.com/>`_
to it easier for anyone to source liquidity that conforms to the 0x order format.
Here, we will show you how you can use our `python sra_client
<https://github.com/0xProject/0x-monorepo/tree/development/python-packages/sra_client#0x-sra-client>`_
0x Protocol is an open standard. Many relayers opt-in to implementing a set of
`standard relayer API endpoints <http://sra-spec.s3-website-us-east-1.amazonaws.com/>`_
to it easier for anyone to source liquidity that conforms to the 0x order format.
Here, we will show you how you can use our `python sra_client
<https://github.com/0xProject/0x-monorepo/tree/development/python-packages/sra_client#0x-sra-client>`_
module to interact with 0x relayers that implements the standard relayer API.

Setup
Expand All @@ -16,12 +14,12 @@ Install the sra-client package with pip:

`pip install https://github.com/0xproject/0x-monorepo/python-packages/sra_client`:code:

To interact with a 0x-relayer, you need the HTTP endpoint of the relayer you'd like to
connect to (i.e. https://api.radarrelay.com/0x/v2).
To interact with a 0x-relayer, you need the HTTP endpoint of the relayer you'd like to
connect to (i.e. https://api.radarrelay.com/0x/v2).

For local testing one use the `0x-launch-kit
For local testing one can use the `0x-launch-kit
<https://github.com/0xProject/0x-launch-kit#table-of-contents/>`_
to host orders locally. For convenience, a docker container is provided
to host orders locally. For convenience, a docker container is provided
for just this purpose. To start it:

`docker run -d -p 3000:3000 0xorg/launch-kit-ci`:code:
Expand Down
2 changes: 1 addition & 1 deletion python-packages/sra_demos/src/sra_demos.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,6 @@
'taker_asset_data': '0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa',
'taker_fee': '0'}}]},
'bids': {'records': []}}
""" # noqa: E501
""" # noqa: E501 (line too long)

# NOTE: sra_client not deserialzing order from server properly, need fix!

0 comments on commit d854e31

Please sign in to comment.