From f73a7b657a1135ac731895002b49c550ecac3236 Mon Sep 17 00:00:00 2001 From: James Seden Smith Date: Wed, 4 Apr 2018 14:48:19 +0100 Subject: [PATCH] Setup for PyPi --- README.md | 78 ------------------------------------------- README.rst | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 1 - setup.py | 12 +++---- 4 files changed, 104 insertions(+), 85 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index dbccf0af..00000000 --- a/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# phial - -[![Documentation Status](https://readthedocs.org/projects/phial/badge/?version=develop)](http://phial.readthedocs.io/en/develop/) -[![CircleCI](https://circleci.com/gh/sedders123/phial.svg?style=svg)](https://circleci.com/gh/sedders123/phial) -[![Coverage Status](https://coveralls.io/repos/github/sedders123/phial/badge.svg?branch=develop)](https://coveralls.io/github/sedders123/phial?branch=develop) - - -> A simple framework for building slack bots - -Phial is a slack bot framework, modelled loosely on [flask](https://github.com/pallets/flask/). - -NOTE: This package is still in early development, things are likely to change - -## Table of Contents - -- [Usage](#usage) -- [Install](#install) -- [Contribute](#contribute) -- [To Do](#todo) -- [Licenses](#licenses) - -## Usage - -### Python: - -```python -from phial import Phial, command, Response - -bot = Phial('---slack token here---') - -@bot.command('greet ') -def greet(name): - '''Simple command with argument which replies to a message''' - return "Hello {0}".format(name) - -bot.run() - -``` - -### Slack: - -By default the bot requires a prefix of `!` before its commands. This can be changed in the config. -``` -youruser: -> !greet jim -bot: -> Hello Jim -``` - -Features: - - - Simple command definition - - Send messages to slack - - Reply to messages in a thread - - Reply to messages with a reaction - - Upload Files - -Examples of commands utilising these features can be found in the [examples](examples/) folder - - -## Install - -``` - $ pip install git+https://github.com/sedders123/phial -``` - -## Contribute - -If a feature is missing, or you can improve the code please submit a PR or raise an Issue - -## TODO: - - PyPi Package - -## Licenses - -phial - MIT © 2017 James Seden Smith - -Erlenmeyer Flask by Iconic from the Noun Project - [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) (used in [examples/phial.png](examples/phial.png)) diff --git a/README.rst b/README.rst new file mode 100644 index 00000000..555f565a --- /dev/null +++ b/README.rst @@ -0,0 +1,98 @@ +phial +===== + +|Documentation Status| |CircleCI| |Coverage Status| + + A simple framework for building slack bots + +Phial is a slack bot framework, modelled loosely on +`flask `__. + +NOTE: This package is still in early development, things are likely to +change + +Table of Contents +----------------- + +- `Usage <#usage>`__ +- `Install <#install>`__ +- `Contribute <#contribute>`__ +- `To Do <#todo>`__ +- `Licenses <#licenses>`__ + +Usage +----- + +Python: +~~~~~~~ + +.. code:: python + + from phial import Phial, command, Response + + bot = Phial('---slack token here---') + + @bot.command('greet ') + def greet(name): + '''Simple command with argument which replies to a message''' + return "Hello {0}".format(name) + + bot.run() + +Slack: +~~~~~~ + +By default the bot requires a prefix of ``!`` before its commands. This +can be changed in the config. + +:: + + youruser: + > !greet jim + bot: + > Hello Jim + +Features: + +- Simple command definition +- Send messages to slack +- Reply to messages in a thread +- Reply to messages with a reaction +- Upload Files + +Examples of commands utilising these features can be found in the +`examples `__ folder + +Install +------- + +:: + + $ pip install phial-slack + +Contribute +---------- + +If a feature is missing, or you can improve the code please submit a PR +or raise an Issue + +TODO: +----- + +- PyPi Package + +Licenses +-------- + +phial - MIT © 2017 James Seden Smith + +Erlenmeyer Flask by Iconic from the Noun Project - `CC BY +3.0 `__ (used in +`examples/phial.png `__) + +.. |Documentation Status| image:: https://readthedocs.org/projects/phial/badge/?version=develop + :target: http://phial.readthedocs.io/en/develop/ +.. |CircleCI| image:: https://circleci.com/gh/sedders123/phial.svg?style=svg + :target: https://circleci.com/gh/sedders123/phial +.. |Coverage Status| image:: https://coveralls.io/repos/github/sedders123/phial/badge.svg?branch=develop + :target: https://coveralls.io/github/sedders123/phial?branch=develop diff --git a/setup.cfg b/setup.cfg index 0d8d2a27..0c9e0fc1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,2 @@ [metadata] license_file = LICENSE -description-file = README.md diff --git a/setup.py b/setup.py index d3122a6c..bbd2469f 100644 --- a/setup.py +++ b/setup.py @@ -1,30 +1,30 @@ from setuptools import setup setup( - name='phial', + name='phial-slack', version='0.1.0', url='https://github.com/sedders123/phial/', license='MIT', author='James Seden Smith', author_email='sedders123@gmail.com', - description='A slack bot framework', + description='A Slack bot framework', + long_description=open('README.rst').read(), packages=['phial'], include_package_data=True, zip_safe=False, platforms='any', + python_requires='>=3.6', + keywords=['Slack', 'bot', 'Slackbot'], install_requires=[ 'slackclient==1.0.6', 'Werkzeug==0.12.2', ], classifiers=[ - 'Development Status :: 2 - Pre-Alpha', + 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: MIT License', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: Software Development :: Libraries :: Python Modules' ]