Skip to content

Commit

Permalink
Re-organized requirements and other files
Browse files Browse the repository at this point in the history
* Added hacking and usage section to README
  • Loading branch information
Andrew-Chen-Wang committed Jul 9, 2020
1 parent 27b74b7 commit 6379e41
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 18 deletions.
23 changes: 9 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
os: linux
dist: xenial

language: python
cache: pip
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"

services:
- memcached
- redis
- mysql
- postgresql

python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
env:
- DJANGO="2.0"
- DJANGO="2.1"
Expand All @@ -27,8 +31,6 @@ matrix:
- python: 3.8
env: DJANGO=2.1

cache: pip

install: pip install tox tox-travis coveralls

before_script:
Expand All @@ -39,10 +41,3 @@ before_script:
script: tox

after_success: coveralls

notifications:
email:
recipients:
- acwangpython@gmail.com
on_success: change
on_failure: always
36 changes: 36 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,42 @@ Quickstart

Cachalot officially supports Python 3.5-3.8 and Django 2.0-2.2, 3.0 with the databases PostgreSQL, SQLite, and MySQL.

Usage
.....

#. ``pip install django-cachalot``
#. Add ``'cachalot',`` to your ``INSTALLED_APPS``
#. If you use multiple servers with a common cache server,
:ref:`double check their clock synchronisation <https://django-cachalot.readthedocs.io/en/latest/limits.html#multiple-servers>`_
#. If you modify data outside Django
– typically after restoring a SQL database –,
use the :ref:`manage.py command <https://django-cachalot.readthedocs.io/en/latest/quickstart.html#command>`_
#. Be aware of :ref:`the few other limits <https://django-cachalot.readthedocs.io/en/latest/limits.html#limits>`_
#. If you use
`django-debug-toolbar <https://github.com/jazzband/django-debug-toolbar>`_,
you can add ``'cachalot.panels.CachalotPanel',``
to your ``DEBUG_TOOLBAR_PANELS``
#. Enjoy!

Hacking
-------

To start developing, install the requirements
and run the tests via tox.

Make sure you have the following services:

* Memcached
* Redis
* PostgreSQL
* MySQL

For setup:

#. Install: ``pip install -r requirements/hacking.txt``
#. For PostgreSQL: ``CREATE ROLE cachalot LOGIN SUPERUSER;``
#. Run: ``tox --current-env`` to run the test suite on your current Python version.

Third-Party Cache Comparison
----------------------------

Expand Down
4 changes: 0 additions & 4 deletions benchmark_requirements.txt

This file was deleted.

6 changes: 6 additions & 0 deletions requirements/benchmark.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Requirements file for benchmark.py

-r tests.txt

pandas
matplotlib
8 changes: 8 additions & 0 deletions requirements/hacking.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Requirements file for testing and
# contributing to Django cachalot

-r tests.txt

tox
tox-current-env
coverage

0 comments on commit 6379e41

Please sign in to comment.