-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit cd87965
Showing
12 changed files
with
174 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[run] | ||
omit = */**/__init__.py |
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,33 @@ | ||
# System | ||
venv | ||
*.pyc | ||
*.zip | ||
.DS_Store | ||
*.sqlite3 | ||
*.rdb | ||
.coverage | ||
.cache | ||
coverage | ||
htmlcov | ||
.vscode | ||
|
||
# Settings | ||
local_settings.py | ||
deploy_settings.py | ||
deploy_settings.sh | ||
|
||
# Static, media and libs | ||
static/ | ||
libs/ | ||
node_modules | ||
media/ | ||
|
||
# Logs | ||
error_logs.log | ||
|
||
# Sockets | ||
*.socket | ||
|
||
#Build | ||
dist/ | ||
djlotrek.egg-info/ |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) Lotrek 2017 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,4 @@ | ||
include LICENSE | ||
include README.md | ||
recursive-exclude * __pycache__ | ||
recursive-exclude * *.py[co] |
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,8 @@ | ||
|
||
clean: | ||
@find . -name "*.pyc" | xargs rm -rf | ||
@find . -name "*.pyo" | xargs rm -rf | ||
@find . -name "__pycache__" -type d | xargs rm -rf | ||
|
||
test: clean | ||
@python runtests.py --with-coverage |
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,7 @@ | ||
# Cattp | ||
|
||
|
||
## Run tests | ||
|
||
$ pip install -r requirements-dev.txt | ||
$ ./runtests.py --with-coverage |
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,10 @@ | ||
Cattp | ||
===== | ||
|
||
Run tests | ||
--------- | ||
|
||
:: | ||
|
||
$ pip install -r requirements-dev.txt | ||
$ ./runtests.py --with-coverage |
Empty file.
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,5 @@ | ||
-r requirements.txt | ||
|
||
coverage==4.3.4 | ||
django-nose==1.4.5 | ||
mock==2.0.0 |
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 @@ | ||
Django==1.11.5 |
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,62 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
import logging | ||
from optparse import OptionParser | ||
|
||
from django.conf import settings | ||
|
||
logging.disable(logging.CRITICAL) | ||
|
||
|
||
def configure(nose_args=None): | ||
if not settings.configured: | ||
settings.configure( | ||
DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3'}}, | ||
TEMPLATES=[{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'APP_DIRS': True, | ||
}], | ||
AES_ENCRIPTION_KEY = 'abcdefgh01234567', | ||
INSTALLED_APPS=[ | ||
'django.contrib.contenttypes', | ||
'django.contrib.auth', | ||
], | ||
NOSE_ARGS=nose_args | ||
) | ||
|
||
|
||
def runtests(*test_args): | ||
from django_nose import NoseTestSuiteRunner | ||
runner = NoseTestSuiteRunner() | ||
|
||
if not test_args: | ||
test_args = ['cattp'] | ||
num_failures = runner.run_tests(test_args) | ||
if num_failures: | ||
sys.exit(num_failures) | ||
|
||
|
||
if __name__ == '__main__': | ||
parser = OptionParser() | ||
parser.add_option('--with-coverage', dest='coverage', default=False, | ||
action='store_true') | ||
parser.add_option('--with-xunit', dest='xunit', default=False, | ||
action='store_true') | ||
parser.add_option('--with-spec', dest='with_spec', default=False, | ||
action='store_true') | ||
parser.add_option('--pdb', dest='pdb', default=False, | ||
action='store_true') | ||
options, args = parser.parse_args() | ||
|
||
nose_args = [] | ||
if options.pdb: | ||
nose_args.append('--pdb') | ||
|
||
if options.coverage: | ||
# Nose automatically uses any options passed to runtests.py, which is | ||
# why the coverage trigger uses '--with-coverage' and why we don't need | ||
# to explicitly include it here. | ||
nose_args.extend([ | ||
'--cover-package=cattp', '--cover-branch', '--cover-html', '--cover-html-dir=htmlcov', '--nocapture']) | ||
configure(nose_args) | ||
runtests() |
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,21 @@ | ||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name='cattp', | ||
version='0.0.1', | ||
url='https://github.com/lotrekagency/cattp', | ||
install_requires=[], | ||
description="Cattp", | ||
long_description=open('README.rst', 'r').read(), | ||
license="MIT", | ||
author="Lotrek", | ||
author_email="dimmitutto@lotrek.it", | ||
packages=find_packages(), | ||
classifiers=[ | ||
'Environment :: Web Environment', | ||
'Framework :: Django', | ||
'Intended Audience :: Developers', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3' | ||
] | ||
) |