-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
580 additions
and
490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.idea/ | ||
.vscode/ | ||
.tox/ | ||
build/ | ||
dist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[settings] | ||
multi_line_output=3 | ||
force_grid_wrap=3 | ||
line_length=79 | ||
include_trailing_comma=True | ||
known_first_party=django_cassandra_engine | ||
known_third_party= | ||
django, | ||
furl, | ||
icu, | ||
ipcalc, | ||
isoweek, | ||
mock, | ||
requests, | ||
rest_framework, | ||
from_first=True | ||
combine_as_imports=True | ||
force_to_top=False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,47 @@ | ||
dist: xenial | ||
language: python | ||
dist: bionic | ||
sudo: required | ||
services: | ||
- cassandra | ||
|
||
language: python | ||
python: | ||
- "3.7" | ||
|
||
before_script: | ||
- echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list | ||
- wget -qO - https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add - | ||
- sudo apt update | ||
- sudo apt install cassandra | ||
- sudo service cassandra start | ||
|
||
env: | ||
matrix: | ||
- TOX_ENV=py27-django110 | ||
- TOX_ENV=py36-django110 | ||
- TOX_ENV=py27-django111 | ||
- TOX_ENV=py36-django111 | ||
- TOX_ENV=py36-django21 | ||
- TOX_ENV=py36-djangomaster | ||
- TOX_ENV=py37-django21 | ||
- TOX_ENV=py37-django22 | ||
- TOX_ENV=py37-django30 | ||
- TOX_ENV=py37-djangomaster | ||
global: | ||
- CASS_DRIVER_NO_CYTHON=1 | ||
- CASS_HOST=127.0.0.1 | ||
|
||
python: | ||
- "3.6" | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- apt-transport-https | ||
- build-essential | ||
- python-dev | ||
- python3-dev | ||
- python3-pip | ||
- pypy-dev | ||
- libc-ares-dev | ||
- libev4 | ||
- libev-dev | ||
- sqlite3 | ||
- curl | ||
- ca-certificates | ||
- wget | ||
- gnupg | ||
- wait-for-it | ||
|
||
install: | ||
- pip install tox | ||
- pip3 install tox-travis lz4 | ||
|
||
script: | ||
- tox -e $TOX_ENV | ||
- wait-for-it 127.0.0.1:9042 -- tox -e $TOX_ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
FROM python:3.6 | ||
FROM python:3.7 | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV CASS_HOST=cassandra | ||
RUN apt-get -y update | ||
RUN apt-get -y upgrade | ||
RUN apt-get -y install wait-for-it | ||
|
||
RUN mkdir /code | ||
WORKDIR /code | ||
ADD requirements.txt /code/ | ||
ADD requirements-dev.txt /code/ | ||
RUN pip install -r requirements-dev.txt | ||
ADD . /code/ | ||
RUN python setup.py develop | ||
RUN pip3 install -e . | ||
|
||
EXPOSE 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2014-2016, Rafał Furmański <[email protected]> | ||
Copyright (c) 2014-2020, Rafał Furmański <[email protected]> | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# -*- coding: utf-8 -*- | ||
|
||
# Do not forget to change version number in mkdocs.yml also! | ||
__version__ = (1, 5, 5) | ||
__version__ = (1, 6, 0) | ||
__author__ = "Rafał Furmański" | ||
__contact__ = "[email protected]" | ||
__homepage__ = "http://github.com/r4fek/django-cassandra-engine" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
import django | ||
|
||
if django.VERSION[0:2] >= (1, 8): | ||
from django.db.backends.base.features import BaseDatabaseFeatures | ||
else: | ||
from django.db.backends import BaseDatabaseFeatures | ||
from django.db.backends.base.features import BaseDatabaseFeatures | ||
|
||
|
||
class CassandraDatabaseFeatures(BaseDatabaseFeatures): | ||
string_based_auto_field = True | ||
supports_long_model_names = False | ||
supports_microsecond_precision = True | ||
supports_transactions = False | ||
can_rollback_ddl = True | ||
uses_savepoints = False | ||
requires_rollback_on_dirty_transaction = False | ||
atomic_transactions = True | ||
|
||
# Django 1.4 compatibility | ||
def _supports_transactions(self): | ||
return False | ||
|
||
supports_transactions = _supports_transactions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.