Skip to content

Commit

Permalink
Merge pull request #6 from uncovertruth/feature/add_image
Browse files Browse the repository at this point in the history
Add image and deploy task
  • Loading branch information
heavenshell authored May 22, 2017
2 parents ddafd60 + 01202c3 commit f5f1f2b
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 22 deletions.
22 changes: 16 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
History
=======

0.0.1 (2017-05-20)
0.0.1 (2017-05-22)
------------------

* First release on PyPI.
42 changes: 27 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand All @@ -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
--------

Expand Down Expand Up @@ -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
"""""""""""""""""""""""""""""""""""""""""""""""
Expand Down Expand Up @@ -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
"""""""""""""
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
Empty file removed docs/_static/.gitkeep
Empty file.
Binary file added docs/_static/logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f5f1f2b

Please sign in to comment.