Skip to content
Open
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
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,33 @@ Modify the Procfile which declares which command Heroku should run to serve the

`web: panel serve --address="0.0.0.0" --port=$PORT model/app.py --allow-websocket-origin=app-name.herokuapp.com`

### To distribute as package

1. Install setuptools and twine
```
pip install setuptools twine
```

2. Check if any metadata are missing

```
python setup.py check
```

3. Create a source distribution

```
python setup.py sdist
```

4. Upload it to PyPI. You will need an registered account at https://pypi.python.org
```
twine upload dist/*
```

### Credits:
> https://panel.holoviz.org/user_guide/Server_Deployment.html

> https://github.com/holoviz-demos/minimal-heroku-demo/blob/master/README.md

> https://betterscientificsoftware.github.io/python-for-hpc/tutorials/python-pypi-packaging/
4 changes: 3 additions & 1 deletion augmentedbondingcurve/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

__version__ = "0.1.0"
__author__ = ''
__credits__ = ''
50 changes: 50 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
from setuptools import setup
import codecs
import os.path

def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()

def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")

setup(
name='augmentedbondingcurve',
version=get_version("augmentedbondingcurve/__init__.py"),
description='Python implementation of the Bancor automated Market Maker',
url='https://github.com/CommonsBuild/augmented-bonding-curve-model',
author='YGG Anderson',
author_email='example@example.com',
license='',
packages=['augmentedbondingcurve'],
install_requires=['numpy',
'bokeh',
'cadCAD',
'holoviews',
'hvplot',
'matplotlib',
'panel',
'param',
'pandas',
],

classifiers=[
'Development Status :: 1 - Planning',
'Intended Audience :: Science/Research',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
)