Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
readme & changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ovv committed Aug 19, 2017
1 parent 2fd05ad commit d15eea6
Show file tree
Hide file tree
Showing 11 changed files with 322 additions and 19 deletions.
42 changes: 42 additions & 0 deletions .github/.dothub.repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
labels:
bug:
color: ee0701
difficulty/newcomers:
color: c5def5
difficulty/easy:
color: c2e0c6
difficulty/hard:
color: e99695
difficulty/medium:
color: fef2c0
documentation:
color: 1d76db
etc/blocked:
color: b60205
etc/duplicate:
color: cccccc
etc/invalid:
color: cccccc
etc/question:
color: cccccc
etc/wontfix:
color: cccccc
feature/request:
color: d93f0b
feature/approved:
color: 5319e7
help wanted:
color: 128A0C
question:
color: cc317c
options:
allow_merge_commit: false
allow_rebase_merge: true
allow_squash_merge: true
description: Python (a)sync Slack API library
has_downloads: true
has_issues: true
has_wiki: false
homepage: ''
name: slack-sansio
private: false
30 changes: 20 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,31 @@ python:
- nightly

install:
- pip install .[full]
- pip install .[tests]

script:
- python setup.py flake8
- python setup.py sdist
- python setup.py bdist_wheel

before_deploy:
- pip install dothub

deploy:
provider: pypi
distributions: sdist bdist_wheel
user: Ovv
password:
secure: lldoHkBPyFjcMEWpOMzaXeNdNl1JUgodXfrm9TPT4DYNcQCDU01f6xm8uShBT47mz+tbrUnx2rFhZmTmZAqZDODo7pmkukSrhBRpbLroEp6045MmT4P4aJjoGJooksGouqOsJjqE8yGwyinCVsv0ZNi1RZDxxuUw3Ye+HtDllMNv4XUeEBxOY5LtKpGW/+MF0QZiDggvR2bcLlMJz2EJvtIzhdRtl7fy2eAdrsQoyXhqt7Zuu0y/sc4YTiRt1adLFFFOIDL6mtL76D2eHBQm5oHJM5TtZi0gs633567fyEZ6Gm9fxSo0Ba9L7sen6ApgJLx2yba1+7ititXg7/U7+DvgmFT3Tk294cBRGF/3rhzt60p1xYO1b6tyFK5GTPghidAJZb/OQoMb9L6iZhCmMCukvdW0/241yiLdSQfMbeCzO8diwpwsJiv7k8pWtGTtl2+PtuH26zyZZeuQpu3BlctF5r/hdaiuggoN87RzlOLwqbIRfHZfMGA24LJNbtyRcu3mvaZwFFrRq5NWYqwU2VHQB/plBvB4c+FRyKRIcbiN/G+31WEK3cuMPaKfXM0opJwVpLNA320IHgVxZu0b78Exr2Qs48cBYiEl/BtHYPRYDGscSI5LYZ5cPrGcrhp7Z6jBFTHenq+IW/O21qtxv1h9R9VXyatIGHSW0U/dLOA=
on:
repo: pyslackers/slack-sansio
branch: master
python: '3.6'
tags: true
- provider: pypi
distributions: sdist bdist_wheel
user: Ovv
password:
secure: lldoHkBPyFjcMEWpOMzaXeNdNl1JUgodXfrm9TPT4DYNcQCDU01f6xm8uShBT47mz+tbrUnx2rFhZmTmZAqZDODo7pmkukSrhBRpbLroEp6045MmT4P4aJjoGJooksGouqOsJjqE8yGwyinCVsv0ZNi1RZDxxuUw3Ye+HtDllMNv4XUeEBxOY5LtKpGW/+MF0QZiDggvR2bcLlMJz2EJvtIzhdRtl7fy2eAdrsQoyXhqt7Zuu0y/sc4YTiRt1adLFFFOIDL6mtL76D2eHBQm5oHJM5TtZi0gs633567fyEZ6Gm9fxSo0Ba9L7sen6ApgJLx2yba1+7ititXg7/U7+DvgmFT3Tk294cBRGF/3rhzt60p1xYO1b6tyFK5GTPghidAJZb/OQoMb9L6iZhCmMCukvdW0/241yiLdSQfMbeCzO8diwpwsJiv7k8pWtGTtl2+PtuH26zyZZeuQpu3BlctF5r/hdaiuggoN87RzlOLwqbIRfHZfMGA24LJNbtyRcu3mvaZwFFrRq5NWYqwU2VHQB/plBvB4c+FRyKRIcbiN/G+31WEK3cuMPaKfXM0opJwVpLNA320IHgVxZu0b78Exr2Qs48cBYiEl/BtHYPRYDGscSI5LYZ5cPrGcrhp7Z6jBFTHenq+IW/O21qtxv1h9R9VXyatIGHSW0U/dLOA=
on:
repo: pyslackers/slack-sansio
branch: master
python: '3.6'
tags: true
- provider: script
script: "yes | dothub repo --owner pyslackers --repository slack-sansio push --input_file .github/.dothub.repo.yml"
on:
repo: pyslackers/slack-sansio
branch: master
python: '3.6'
58 changes: 58 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
participation in our project and our community a harassment-free experience for everyone.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
project or its community. Examples of representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed representative at an online or offline
event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
contact@ovv.wtf. The project team will review and investigate all complaints, and will respond in a way that it deems
appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter
of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at
[http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
146 changes: 146 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
============
Contributing
============

First off, thanks for taking the time to contribute!

Contributions are welcome by anybody and everybody. We are not kidding! Looking for help ? Join us on `Slack`_ by requesting an `invite`_.

The rest of this document will be guidelines to contributing to the project. Remember that these are just guidelines, not rules. Use common sense as much as possible.

.. _invite: http://pyslackers.com/
.. _Slack: https://pythondev.slack.com/

Pull Request Guidelines
-----------------------

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests (if necessary). If you have any questions about how to write tests then ask the community.
2. If the pull request adds functionality update the docs where appropriate.
3. Use a `good commit message`_.

If you have any issues contributing_git_hygiene_ might help.

.. _good commit message: https://github.com/spring-projects/spring-framework/blob/30bce7/CONTRIBUTING.md#format-commit-messages


Types of Contributions
----------------------

Report Bugs
^^^^^^^^^^^

The best way to report a bug is to file an `issue <https://github.com/pyslackers/slack-sansio/issues>`_.

Please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Fix Bugs & Features
^^^^^^^^^^^^^^^^^^^

Look through the github issues for bugs or features request.
Anything tagged with "help-wanted" is open to whoever wants to implement it.

Write Documentation
^^^^^^^^^^^^^^^^^^^

Slack-sansio could always use more documentation and examples, whether as part of the
official documentation, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback
^^^^^^^^^^^^^^^

The best way to submit feedback is to file an `issue <https://github.com/pyslackers/slack-sansio/issues>`_.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)

Get Started!
------------

Ready to contribute? Here's how to set up `slack-sansio` for local development.

1. Fork the `slack-sansion` repo on github.
2. Clone your fork locally and add the upstream repository:

.. code-block:: console
$ git clone git@github.com:<username>/slack-sansio.git
$ git remote add upstream https://github.com/pyslackers/slack-sansio.git
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:

.. code-block:: console
$ mkvirtualenv slack-sansion
$ cd slack-sansion/
4. Install all dependencies

.. code-block:: console
$ pip install -e .[dev]
5. Create a branch for local development:

.. code-block:: console
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.

6. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:

.. code-block:: console
$ tox
7. Commit your changes and push your branch to github:

.. code-block:: console
$ git add .
$ git commit
$ git push origin name-of-your-bugfix-or-feature
8. Submit a pull request through the github website.

Git Hygiene
-----------

.. _contributing_git_hygiene:

Handling Merge Conflicts
^^^^^^^^^^^^^^^^^^^^^^^^

Occasionally a Pull Request will have Merge Conflicts. **Do not merge master into your branch.** Instead, make sure your :code:`master` branch is up to date:

.. code-block:: console
$ git checkout master
$ git pull upstream master
$ git push origin master
Then rebase your branch on :code:`master`:

.. code-block:: console
$ git checkout _my-branch_
$ git rebase master
If there are any conflicts you need to resolve, it will suspend the rebase for you to fix them. Then do:

.. code-block:: console
$ git add .
$ git rebase --continue
It will do one round of conflict-checking for each commit in your branch, so keeping your history clean will make rebasing much easier. When the rebase is done, your branch will be up to date with master and ready to issue a PR if you are.
50 changes: 46 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,59 @@ slack-sansio

Python (a)sync `Slack API <https://api.slack.com/>`_ library

.. image:: https://travis-ci.org/pyslackers/slack-sansio.svg?branch=master
:target: https://travis-ci.org/pyslackers/slack-sansio

Installation
------------

Slack-sansio is `available on PyPI <https://pypi.org/project/slack-sansio/>`_.

$ pip3 install slack-sansio
.. code::
$ pip3 install slack-sansio # No specific implementation requirements
$ pip3 install slack-sansio[requests] # Requests implementation requirements
$ pip3 install slack-sansio[aiohttp] # Aiohttp implementation requirements
$ pip3 install slack-sansio[full] # All implementations requirements
Quickstart
----------

.. code-block:: python
import slack
import pprint
import requests
from slack.io.sync import SlackAPI
session = requests.session()
slack_client = SlackAPI(token=TOKEN, session=session)
data = client.query(slack.methods.AUTH_TEST)
pprint.pprint(data)
For more examples see the `examples folder <https://github.com/pyslackers/slack-sansio/tree/master/examples>`_.

I/O Implementation
------------------

Two I/O implementation are provided with the library. One synchronous built upon
`request <http://docs.python-requests.org/en/master/>`_ and a second one built upon
`aiohttp <http://aiohttp.readthedocs.io/en/stable/>`_.

The library also provide an abstract base class on which to built I/O implementation.

Changelog
---------

0.0.1 (10/08/2017)
``````````````````
0.1.0
`````

* Initial beta release
* RTM API
* Pagination

0.0.1
`````

Initial release
* Initial development release
2 changes: 1 addition & 1 deletion examples/sync/iterate.py → examples/requests/iterate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import requests
import slack

from slack.io.sync import SlackAPI
from slack.io.requests import SlackAPI

logging.basicConfig(level=logging.INFO)
LOG = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion examples/sync/query.py → examples/requests/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import requests
import slack

from slack.io.sync import SlackAPI
from slack.io.requests import SlackAPI

logging.basicConfig(level=logging.INFO)
LOG = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion examples/sync/rtm.py → examples/requests/rtm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import requests
import slack

from slack.io.sync import SlackAPI
from slack.io.requests import SlackAPI
from slack.events import Message

logging.basicConfig(level=logging.INFO)
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
'install': [],
'setup': [],
'tests': ['flake8'],
'sync': ['requests', 'websocket-client'],
'full': set(),
'dev': {'tox'},
'requests': ['requests', 'websocket-client'],
'aiohttp': ['aiohttp']
}

requires['dev'].update(*requires.values())
requires['full'].update(requires['requests'], requires['aiohttp'])

setuptools.setup(
name='slack-sansio',
long_description=LONG_DESCRIPTION,
Expand Down
Loading

0 comments on commit d15eea6

Please sign in to comment.