diff --git a/.travis.yml b/.travis.yml index afb0ce2..7e44300 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,12 +53,12 @@ matrix: - env: TOX_ENV=py35-djdev - env: TOX_ENV=py36-djdev - env: TOX_ENV=pypy3-dj111 - - env: TOX_ENV=py27-dj18 # SQLite is too old - - env: TOX_ENV=py27-dj19 # SQLite is too old - - env: TOX_ENV=py27-dj110 # SQLite is too old - - env: TOX_ENV=py27-dj111 # SQLite is too old - - env: TOX_ENV=pypy-dj111 # SQLite is too old - - env: TOX_ENV=py33-dj18 # SQLite is too old + - env: TOX_ENV=py27-dj18 + - env: TOX_ENV=py27-dj19 + - env: TOX_ENV=py27-dj110 + - env: TOX_ENV=py27-dj111 + - env: TOX_ENV=pypy-dj111 + - env: TOX_ENV=py33-dj18 addons: apt: sources: @@ -71,3 +71,13 @@ before_script: - sqlite3 -version script: - tox -e "${TOX_ENV}" +deploy: + provider: pypi + user: uncovertruth + password: + secure: vm63jxiupnzZI1A9UwiE8JOJ02/7u8sIHUdx0K4Nb9teqZew+uk4DaSSY6MXtjFtatnBocBG/9xc7Ej90suFfQzx5ouYguWvhMDnBivzSvFQ+L68PlgNQ2od09r7NidCOKMkgBDjM0wPnSjzAfaPQatc3PCHcA04BOH10+KPZdDDNQtvjiqRPcFuIZiet0yA5ZECDy4vYeZInXREikbFneKW4NH35eigtZbxxXPX1QBTP9eWPbEM9Hjy+q79/njXHSkyTvdeCjfBHj2Uqul78FVwxdZI37Q4Bl7dgnJ96ccqmHVPEkdhW2wpIcu04hvF1Yo6xVmcx6xsSK77lNh2apLJh5eaYv0jA107z0XszamUZyhMrIIXhrMeXOFOBvsc6oT+VvV7AIfJTLulmsRT49fwAPxzyjobGwqTN0vEJAtfux07WptR2e1IQvOGIzl2JMBckEB+37ecB5H50fW0F9MjxzsE99nEkM0QkKRe64UEZ45Dtgltzdg91JdDzhJMD7qJAfaUpLsBc2dXeoi9Is/QgpPJ15vA7JWmMOuV0eT0gaIHuaRHGd5SHT75jAmu3v5ygulXVIesytasoFFfICWDXP4YsPro+PNmyTd8QW+tAJkigSFt85E5fYhdTToZ4jDMGFC2+ryoxUkk84XX1Ax3Fu22QRip8XjWRRz72Uc= + distributions: sdist bdist_wheel + on: + tags: true + repo: uncovertruth/django-horizon + condition: $TOX_ENV = py36-dj111 diff --git a/HISTORY.rst b/HISTORY.rst index 007387a..7ea5e57 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,7 +2,7 @@ History ======= -0.0.1 (2017-05-20) +0.0.1 (2017-05-22) ------------------ * First release on PyPI. diff --git a/README.rst b/README.rst index 4260ef1..33f6284 100644 --- a/README.rst +++ b/README.rst @@ -2,20 +2,27 @@ Django Horizon ============== +.. image:: https://travis-ci.org/uncovertruth/django-horizon.svg?branch=master + :target: https://travis-ci.org/uncovertruth/django-horizon -.. image:: https://img.shields.io/pypi/v/django_horizon.svg - :target: https://pypi.python.org/pypi/django_horizon - -.. image:: https://img.shields.io/travis/uncovertruth/django_horizon.svg - :target: https://travis-ci.org/uncovertruth/django_horizon +.. image:: https://codecov.io/gh/uncovertruth/django-horizon/branch/master/graph/badge.svg + :target: https://codecov.io/gh/uncovertruth/django-horizon .. image:: https://readthedocs.org/projects/django-horizon/badge/?version=latest - :target: https://django-horizon.readthedocs.io/en/latest/?badge=latest - :alt: Documentation Status + :target: http://django-horizon.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status + +.. image:: https://pyup.io/repos/github/uncovertruth/django-horizon/shield.svg + :target: https://pyup.io/repos/github/uncovertruth/django-horizon/ + :alt: Updates + +.. image:: https://pyup.io/repos/github/uncovertruth/django-horizon/python-3-shield.svg + :target: https://pyup.io/repos/github/uncovertruth/django-horizon/ + :alt: Python 3 + +.. image:: https://img.shields.io/pypi/v/django-horizon.svg + :target: https://pypi.python.org/pypi/django-horizon -.. image:: https://pyup.io/repos/github/uncovertruth/django_horizon/shield.svg - :target: https://pyup.io/repos/github/uncovertruth/django_horizon/ - :alt: Updates Purpose ------- @@ -29,6 +36,11 @@ Simple database sharding (horizontal partitioning) library for Django applicatio .. _django-sharding: https://github.com/JBKahn/django-sharding + +.. image:: https://raw.githubusercontent.com/uncovertruth/django-horizon/master/docs/_static/logo.jpg + :alt: Logo + + Features -------- @@ -59,7 +71,7 @@ Usage Setup ^^^^^ -Add database router configuration in your `settings.py`: +Add database router configuration in your ``settings.py``: Horizontal database groups and a metadata store """"""""""""""""""""""""""""""""""""""""""""""" @@ -113,7 +125,7 @@ Metadata store class HorizontalMetadata(AbstractHorizontalMetadata): pass -In the example, metadata store keep user's pk and that index of horizontal database (`1`, `2` or `3`). +In the example, metadata store keep user's pk and that index of horizontal database (``1``, ``2`` or ``3``). Sharded model """"""""""""" @@ -136,8 +148,8 @@ Sharded model horizontal_group = 'group1' # Group name horizontal_key = 'user' # Group key -In many cases use UUIDField_ field for `id`. -The `AbstractHorizontalModel` uses UUIDField_ as a them id field in default. +In many cases use UUIDField_ field for ``id``. +The ``AbstractHorizontalModel`` uses UUIDField_ as a them id field in default. .. _UUIDField: https://docs.djangoproject.com/en/dev/ref/models/fields/#uuidfield @@ -170,7 +182,7 @@ Model limitations SomeLargeModel.objects.all() -* Cannot lookup by foreign key field, cause there are other (like `default`) database +* Cannot lookup by foreign key field, cause there are other (like ``default``) database .. code-block:: python diff --git a/docs/_static/.gitkeep b/docs/_static/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/docs/_static/logo.jpg b/docs/_static/logo.jpg new file mode 100644 index 0000000..d10a9b5 Binary files /dev/null and b/docs/_static/logo.jpg differ diff --git a/tox.ini b/tox.ini index deebea2..8110737 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,7 @@ deps = py36-dj111: codecov setenv = PYTHONPATH = {toxinidir} + CODECOV_TOKEN = 32efb94e-5288-4a2c-bc83-137f08eb2626 commands = coverage run --source=horizon setup.py test py36-dj111: coverage report