diff --git a/.gitignore b/.gitignore index ba74660..bdaab25 100644 --- a/.gitignore +++ b/.gitignore @@ -1,57 +1 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..727f07a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: python + +python: + - "3.3" + - "3.4" + - "3.5" + - "pypy3" + +install: + - pip install -r requirements.txt + +script: + - python runtests.py + +notifications: + slack: + secure: ITmN/3Db23HEcHP5pwoBjGE3qC5w/vOhCOGoefBTGV133YPqcAft1TDA+qQRcB87Da2qcechiR8DwWYVSbugd52lnOnEgwyb+fpTLKKyzU6u5QP6sMjBo+umLwwQSLp9UlctdbgidEOZlYML7H7LTwXrek5g/HXWawHZ90jr60rLKa0qVqFlljx+663VAiw07ro1gx66q60Ptc40OYstgskCVEG2Nb6vCMhE2bqvLRlTBoFvkdLGJdJW9S+WofJMNlRJBHK/boLpWx2/fS6IJFJxo3HvFHcu79OBoe7Oi3WYPjikZB2iNOAv1rHGq7GlFqAiHgnG4USDLyl8vyagsAqwllIcNtNoPh3Yu3TsfGDYs3opRKSLxMp1pvWNLAI1D7y55zPVCdADUziLjBSYSSd0Mcws/plmex7g+N8y650aQu5lVRysiN0Ug9YnQsOKNIAGL4s7/BIlDRtN5ZkUdPmRjrqrBK74eiKBZi+JVkoQTIBiQ2qr2/UugYfwUuB1NSIiIGujHu9j4KPooeVzgJdRIGYTPCQH9TYQ3Al/iY+cbVBecTf6mbEsXDsNrRfGJcI1K3G3YLP3buzGzQoTpR/buTnwgRMiXMuTIx4/I5jmYFSnvSK86O/kpGbPCMXIG9MMmldBy95y1D10CAKr8WRwiw0dYzJ+cdJz2GKWhEk= diff --git a/LICENSE b/LICENSE index 3f5ea3b..875f5c1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,22 +1,23 @@ -The MIT License (MIT) - Copyright (c) 2015 Emmanouil Konstantinidis +All rights reserved. -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: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. -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. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 76bf764..9c9cc09 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ # drf-docs -Documention for Web APIs made with Django Rest Framework +Documentation for Web APIs made with Django Rest Framework + + +### Prerequisites + + - Python (3.3, 3.4, 3.5) + - Django (1.8, 1.9) + + +### Development + + pyvenv env + env/bin/pip install -r requirements.txt diff --git a/drfdocs/__init__.py b/drfdocs/__init__.py new file mode 100644 index 0000000..b8023d8 --- /dev/null +++ b/drfdocs/__init__.py @@ -0,0 +1 @@ +__version__ = '0.0.1' diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2b5587a --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +flake8==2.5.1 diff --git a/runtests.py b/runtests.py new file mode 100644 index 0000000..5ee0757 --- /dev/null +++ b/runtests.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +import os +import sys +import subprocess + + +FLAKE8_ARGS = ['drfdocs', '--ignore=E501'] + +def exit_on_failure(command, message=None): + if command: + sys.exit(command) + +def flake8_main(args): + print('Running: flake8', *FLAKE8_ARGS, sep=' ') + command = subprocess.call(['flake8'] + args) + print("" if command else "Success. flake8 passed.") + return command + +exit_on_failure(flake8_main(FLAKE8_ARGS)) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..2fab0f9 --- /dev/null +++ b/setup.py @@ -0,0 +1,27 @@ +from setuptools import find_packages, setup + +setup( + name="drf-docs", + version=__import__('drfdocs').__version__, + author="Emmanouil Konstantinidis", + author_email="manos@iamemmanouil.com", + packages=find_packages(), + include_package_data=True, + url="http://www.drfdocs.com", + license='BSD', + description="Documentation for Web APIs made with Django Rest Framework.", + long_description=open("README.txt").read(), + install_requires=[], + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Web Environment', + 'Framework :: Django', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + ], +)