Skip to content

Commit

Permalink
setting up releases
Browse files Browse the repository at this point in the history
  • Loading branch information
igorcoding committed Feb 14, 2017
1 parent 56e2ea2 commit d9c0e51
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 75 deletions.
1 change: 1 addition & 0 deletions .ci/travis-before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
sudo apt-get -qq update
sudo apt-get -y install tarantool
sudo tarantoolctl stop example || exit 0
sudo apt-get install pandoc
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
if [[ "${TARANTOOL_VERSION}" == "1_7" ]]; then
brew install tarantool --HEAD
Expand Down
13 changes: 13 additions & 0 deletions .ci/travis-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -e -x


if [ -z "${TRAVIS_TAG}" ]; then
# Not a release
exit 0
fi


python setup.py sdist
twine upload dist/*
134 changes: 69 additions & 65 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,82 @@
language: python

matrix:
fast_finish: true
include:
# osx
- os: osx
language: generic
env: BUILD=tests PYTHON_VERSION=3.5.2 TARANTOOL_VERSION=1_6

- os: osx
language: generic
env: BUILD=tests PYTHON_VERSION=3.6.0 TARANTOOL_VERSION=1_6

- os: osx
language: generic
env: BUILD=tests PYTHON_VERSION=3.5.2 TARANTOOL_VERSION=1_7

- os: osx
language: generic
env: BUILD=tests PYTHON_VERSION=3.6.0 TARANTOOL_VERSION=1_7

# precise
- os: linux
dist: precise
sudo: required
language: python
python: "3.5"
env: BUILD=quicktests TARANTOOL_VERSION=1_6

- os: linux
dist: precise
sudo: required
language: python
python: "3.5"
env: BUILD=quicktests TARANTOOL_VERSION=1_7

# trusty
- os: linux
dist: trusty
sudo: required
language: python
python: "3.5"
env: BUILD=quicktests TARANTOOL_VERSION=1_6

- os: linux
dist: trusty
sudo: required
language: python
python: "3.5"
env: BUILD=quicktests TARANTOOL_VERSION=1_7

# latest tarantool
- os: linux
dist: trusty
sudo: required
language: python
python: "3.5"
env: BUILD=tests TARANTOOL_VERSION=1_7

- os: linux
dist: trusty
sudo: required
language: python
python: "3.6"
env: BUILD=tests TARANTOOL_VERSION=1_7
- os: osx
language: generic
env: BUILD=tests PYTHON_VERSION=3.5.2 TARANTOOL_VERSION=1_6
- os: osx
language: generic
env: BUILD=tests PYTHON_VERSION=3.6.0 TARANTOOL_VERSION=1_6
- os: osx
language: generic
env: BUILD=tests PYTHON_VERSION=3.5.2 TARANTOOL_VERSION=1_7
- os: osx
language: generic
env: BUILD=tests PYTHON_VERSION=3.6.0 TARANTOOL_VERSION=1_7
- os: linux
dist: precise
sudo: required
language: python
python: '3.5'
env: BUILD=quicktests TARANTOOL_VERSION=1_6
- os: linux
dist: precise
sudo: required
language: python
python: '3.5'
env: BUILD=quicktests TARANTOOL_VERSION=1_7
- os: linux
dist: trusty
sudo: required
language: python
python: '3.5'
env: BUILD=quicktests TARANTOOL_VERSION=1_6
- os: linux
dist: trusty
sudo: required
language: python
python: '3.5'
env: BUILD=quicktests TARANTOOL_VERSION=1_7
- os: linux
dist: trusty
sudo: required
language: python
python: '3.5'
env: BUILD=tests TARANTOOL_VERSION=1_7
- os: linux
dist: trusty
sudo: required
language: python
python: '3.6'
env: BUILD=tests,release TARANTOOL_VERSION=1_7

cache:
- pip

before_install:
- .ci/travis-before-install.sh
- ".ci/travis-before-install.sh"

install:
- .ci/travis-install.sh
- ".ci/travis-install.sh"

script:
- .ci/travis-tests.sh
- ".ci/travis-tests.sh"

deploy:
- provider: releases
skip_cleanup: true
api_key:
secure: QldT0BfRC5AiavTIQqB9TkRK30J0UVd0yfLll2UjgJIB615jSbr/9NLLjI50x3TXyyeD80I9N+EvyGWl0sX1aWZE/sFYalbfCPFWfbpZ3XnsvNxgbzAhKrWbW0F7Vyb2hccq8fBuCo7m9WaTfFfTFe3ziEpFLDtZqkWKvv3GPqQxqrDW4tgq2dcyqZKTDX2XTN/SQNsHFZtaIvSyNRYCd1Z4ZrnOEnRZH7nxNKWR5lQ25o2Z9u4lukaq//M5rlphQQU74y3O8oYq/FiR6PzmSoH2+AKzJ2MiLqdbH/VhmAU+nsMwLPbSM8YnIICJh4lRVw7Ug5YNUogXHWyiCg6ztOQhPAL8v4/TTMteGT/8oMt7kc/w1EENaaMRhyfaLOC9glkJWcamnGBsJ2OJR1ogqNzmJvvWbSMHZB8fi/xWjWJ5YonGbR+MSh5h5q7h0yr7uO6M4PUVdpqKgQCfvowwyJPC5udgtGnBR3GE9g85jquVPdK+oCHZsJFBKB96Hci6AejlM0eRWV/RZI2fzv5/2UUkwQnnpF8pejtw9y3cG6kyJABdQSQjb/2illv8HXZe5m9orcSvjS2t6zpPYPWvqBJn2PTRwnq4Djl1Wo8PcwBLgjtN8JhM2NhXl3JrN7aLUtcBUqlmBgA5LWPHvaQtq6MA466rOV8x+pVNfEo0sL4=
file_glob: true
file: dist/asynctnt*.tar.gz
on:
repo: igorcoding/asynctnt
tags: true
condition: '"${BUILD}" == *release*'

- provider: script
script: .ci/travis-release.sh
on:
tags: true
condition: '"${BUILD}" == *release*'
File renamed without changes.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
recursive-include tests *.py
recursive-include asynctnt *.pyx *.pxd *.pxi *.py *.c *.h
recursive-include third_party *
include LICENSE.txt README.md Makefile
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# asynctnt

[![Build Status](https://travis-ci.com/igorcoding/asynctnt.svg?token=rFNDyy6cdNgiTQaxXzt8&branch=master)](https://travis-ci.com/igorcoding/asynctnt)

asynctnt is a high-performance [Tarantool](https://tarantool.org/) database
connector library for Python/asyncio. It was highly inspired by
[asyncpg](https://github.com/MagicStack/asyncpg) module.
Expand Down Expand Up @@ -48,6 +46,7 @@ RPS on running 200k requests in 300 parallel coroutines (no `uvloop`):
Let's enable uvloop. This is where asynctnt shines.
RPS on running 200k requests in 300 parallel coroutines (with `uvloop`):


| Request | aiotarantool | asynctnt |
| ------------- |:-------------:| ---------:|
| ping | 30050.55 | 131317.35 |
Expand All @@ -56,6 +55,7 @@ RPS on running 200k requests in 300 parallel coroutines (with `uvloop`):
| select | 22346.14 | 88748.47 |
| insert | 25811.84 | 82526.94 |
| update | 21914.15 | 80865.00 |


## Roadmap

Expand Down
2 changes: 1 addition & 1 deletion asynctnt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .connection import Connection, connect
from .iproto.protocol import Iterator, Response

__version__ = '0.0.1'
__version__ = '0.0.6'
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
psutil==5.0.1
PyYAML>=3.12
uvloop>=0.6.7
cython==0.25.2
pep8==1.7.0
flake8==3.2.1
PyYAML>=3.12
uvloop>=0.6.7
pypandoc
twine
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
15 changes: 12 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

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

description = "A fast Tarantool Database connector for Python/asyncio."
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
long_description = description


def find_version():
for line in open("asynctnt/__init__.py"):
Expand Down Expand Up @@ -176,8 +183,10 @@ def _patch_cfile(self, cfile):
version=find_version(),
author="igorcoding",
author_email="[email protected]",
url='https://github.com/igorcoding/asynctnt',
license='Apache Software License',
classifiers=[
"Programming Language :: Python :: Only",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Intended Audience :: Developers",
Expand All @@ -188,7 +197,7 @@ def _patch_cfile(self, cfile):
install_requires=[
'PyYAML>=3.12'
],
description="A fast Tarantool Database connector for Python/asyncio.",
long_description=open("README.md").read(),
description=description,
long_description=long_description,
test_suite='run_tests.discover_tests'
)
1 change: 0 additions & 1 deletion temp/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ async def bench_asynctnt(n, b, loop=None):

async def bulk_f():
for _ in range(n_requests_per_bulk):
await getattr(conn, method)(*args)
await conn.ping()
# await conn.call('test')
# await conn.eval('return "hello"')
Expand Down

0 comments on commit d9c0e51

Please sign in to comment.