Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piper/change pypi name #21

Merged
merged 2 commits into from
Nov 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[bumpversion]
current_version = 0.4.4
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<stage>[^.]*)\.(?P<devnum>\d+))?
serialize =
{major}.{minor}.{patch}-{stage}.{devnum}
{major}.{minor}.{patch}

[bumpversion:part:stage]
optional_value = stable
first_value = stable
values =
alpha
beta
stable

[bumpversion:part:devnum]

[bumpversion:file:setup.py]
search = version='{current_version}',
replace = version='{new_version}',

16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
* Version: x.x.x
* Python: 2.7/3.4/3.5
* OS: osx/linux/win


### What was wrong?

Please include any of the following that are applicable:

* The code which produced the error
* The full output of the error


### How can it be fixed?

Fill this section in if you know how this could or should be fixed.
2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE.md → .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

#### Cute Animal Picture

> put a cute animal picture here.
![Cute animal picture]()
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
To start development you should begin by cloning the repo.

```bash
$ git clone git@github.com/pipermerriam/ethereum-abi-utils.git
$ git clone git@github.com/ethereum/eth-abi.git
```


Expand Down
74 changes: 70 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,75 @@
# Ethereum Contract

[![Build Status](https://travis-ci.org/pipermerriam/ethereum-abi-utils.png)](https://travis-ci.org/pipermerriam/ethereum-abi-utils)
[![Documentation Status](https://readthedocs.org/projects/ethereum-abi-utils/badge/?version=latest)](https://readthedocs.org/projects/ethereum-abi-utils/?badge=latest)
[![PyPi version](https://pypip.in/v/ethereum-abi-utils/badge.png)](https://pypi.python.org/pypi/ethereum-abi-utils)
[![PyPi downloads](https://pypip.in/d/ethereum-abi-utils/badge.png)](https://pypi.python.org/pypi/ethereum-ipc-utils)
[![Build Status](https://travis-ci.org/ethereum/eth-abi.png)](https://travis-ci.org/ethereum/eth-abi)
[![Documentation Status](https://readthedocs.org/projects/eth-abi/badge/?version=latest)](https://readthedocs.org/projects/eth-abi/?badge=latest)
[![PyPi version](https://pypip.in/v/eth-abi/badge.png)](https://pypi.python.org/pypi/eth-abi)
[![PyPi downloads](https://pypip.in/d/eth-abi/badge.png)](https://pypi.python.org/pypi/eth-ipc-utils)


Python utilities for working with the Ethereum ABI


## Installation

```sh
pip install eth-abi
```

## Development

Clone the repository and then run:

```sh
pip install -e . -r requirements-dev.txt
```


### Running the tests

You can run the tests with:

```sh
py.test tests
```

Or you can install `tox` to run the full test suite.


### Releasing

Pandoc is required for transforming the markdown README to the proper format to
render correctly on pypi.

For Debian-like systems:

```
apt install pandoc
```

Or on OSX:

```sh
brew install pandoc
```

To release a new version:

```sh
bumpversion $$VERSION_PART_TO_BUMP$$
git push && git push --tags
make release
```


#### How to bumpversion

The version format for this repo is `{major}.{minor}.{patch}` for stable, and
`{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).

To issue the next version in line, use bumpversion and specify which part to bump,
like `bumpversion minor` or `bumpversion devnum`.

If you are in a beta version, `bumpversion stage` will switch to a stable.

To issue an unstable version when the current version is stable, specify the
new version explicitly, like `bumpversion --new-version 4.0.0-alpha.1 devnum`
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

# General information about the project.
project = u'Ethereum ABI Utils'
copyright = u'2016, Piper Merriam <pipermerriam@gmail.com>'
copyright = u'2017, Piper Merriam <pipermerriam@gmail.com>'
author = u'Piper Merriam <pipermerriam@gmail.com>'

# The version info for the project you're documenting, acts as replacement for
Expand Down
4 changes: 2 additions & 2 deletions docs/decoding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Decoding
These functions are intended for decoding return values from the EVM.


* ``eth_alarm.decode_single(type, data)``
* ``eth_abi.decode_single(type, data)``

This function tries to decode ``data`` into the python type that corresponds
to the provided ``type``. This function accepts both byte strings as well as
Expand All @@ -28,7 +28,7 @@ The **value** parameter is expected to be one of the recognized EVM types.
.. note:: This function cannot be used to decode dynamic or array types such as ``bytes32[]``.


* ``eth_alarm.decode_abi(types, data)``
* ``eth_abi.decode_abi(types, data)``

This function decodes ``data`` into the python type corresponding to the
provided ``types``. This function accepts both byte arrays as well as their
Expand Down
4 changes: 2 additions & 2 deletions docs/encoding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ These functions are intended for encoding python values into representations
that are suitable for interacting with the EVM.


* ``eth_alarm.encode_single(type, value)``
* ``eth_abi.encode_single(type, value)``

This function encodes ``value`` in the ABI encoding for the provided ``type``.

Expand All @@ -22,7 +22,7 @@ The **value** parameter is expected to be one of the recognized EVM types.
.. note:: This function cannot be used to encode array types such as ``bytes32[]``.


* ``eth_alarm.encode_abi(types, values)``
* ``eth_abi.encode_abi(types, values)``

This function encodes ``values`` in the ABI encoding for the corresponding type
provided by the ``types`` argument.
Expand Down
2 changes: 1 addition & 1 deletion eth_abi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
)


__version__ = pkg_resources.get_distribution('ethereum-abi-utils').version
__version__ = pkg_resources.get_distribution('eth-abi').version
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pytest>=3.0.3
pytest-pythonpath>=0.7.1
tox>=2.4.1
hypothesis>=3.6.1
bumpversion==0.5.3
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

21 changes: 7 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os

from setuptools import (
setup,
find_packages,
)


DIR = os.path.dirname(os.path.abspath(__file__))

version = '0.4.4'

readme = open(os.path.join(DIR, 'README.md')).read()


setup(
name='ethereum-abi-utils',
version=version,
name='eth-abi',
# *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility.
version='0.4.4',
description="""Ethereum ABI Utils""",
long_description=readme,
long_description_markdown_filename='README.md',
author='Piper Merriam',
author_email='pipermerriam@gmail.com',
url='https://github.com/pipermerriam/ethereum-abi-utils',
url='https://github.com/ethereum/eth-abi',
include_package_data=True,
install_requires=[
'ethereum-utils>=0.2.0',
'eth-utils==0.7.*',
],
setup_requires=['setuptools-markdown'],
py_modules=['eth_abi'],
license="MIT",
zip_safe=False,
Expand Down