diff --git a/.gitignore b/.gitignore index 0840b0f..be34809 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ node_modules/ +testproj/db.sqlite3 +.vscode/ # Created by .ignore support plugin (hsz.mobi) ### Python template @@ -156,5 +158,3 @@ com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties - -testproj/db\.sqlite3 diff --git a/README.rst b/README.rst index 643e0e1..fab5d2c 100644 --- a/README.rst +++ b/README.rst @@ -29,12 +29,12 @@ Features - customization hooks at all points in the spec generation process - JSON and YAML format for spec - bundles latest version of - `swagger-ui `__ and - `redoc `__ for viewing the generated documentation + `swagger-ui `_ and + `redoc `_ for viewing the generated documentation - schema view is cacheable out of the box - generated Swagger schema can be automatically validated by - `swagger-spec-validator `__ or - `flex `__ + `swagger-spec-validator `_ or + `flex `_ .. figure:: https://raw.githubusercontent.com/axnsan12/drf-yasg/1.0.2/screenshots/redoc-nested-response.png :width: 100% diff --git a/docs/conf.py b/docs/conf.py index 3e9b70b..c4856de 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -199,8 +199,6 @@ nitpick_ignore = [ ('py:obj', 'APIView'), ] -# TODO: inheritance aliases in sphinx 1.7 - # even though the package should be already installed, the sphinx build on RTD # for some reason needs the sources dir to be in the path in order for viewcode to work sys.path.insert(0, os.path.abspath('../src')) diff --git a/requirements/dev.txt b/requirements/dev.txt index e762ef4..f6c7569 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -7,5 +7,4 @@ isort>=4.2 flake8>=3.5.0 flake8-isort>=2.3 -# do not unpin this (see setup.py) -setuptools_scm==1.15.6 +-r setup.txt diff --git a/requirements/setup.txt b/requirements/setup.txt new file mode 100644 index 0000000..6c424ae --- /dev/null +++ b/requirements/setup.txt @@ -0,0 +1,4 @@ +# requirements for building the distributable package + +# do not unpin this (see setup.py) +setuptools_scm==1.15.6 diff --git a/setup.py b/setup.py index e6b2b37..8db6fd3 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,18 @@ import os import sys from setuptools import find_packages, setup -requirements_setup = ['setuptools_scm==1.15.6'] + +def read_req(req_file): + with open(os.path.join('requirements', req_file)) as req: + return [line for line in req.readlines() if line and not line.isspace()] + + +with io.open('README.rst', encoding='utf-8') as readme: + description = readme.read() + +requirements = ['djangorestframework>=3.7.0'] + read_req('base.txt') +requirements_setup = read_req('setup.txt') +requirements_validation = read_req('validation.txt') def _install_setup_requires(attrs): @@ -40,18 +51,6 @@ if 'sdist' in sys.argv: except ImportError: pass - -def read_req(req_file): - with open(os.path.join('requirements', req_file)) as req: - return [line for line in req.readlines() if line and not line.isspace()] - - -with io.open('README.rst', encoding='utf-8') as readme: - description = readme.read() - -requirements = ['djangorestframework>=3.7.0'] + read_req('base.txt') -requirements_validation = read_req('validation.txt') - setup( name='drf-yasg', use_scm_version=True, diff --git a/tox.ini b/tox.ini index abadc40..d1cc1a0 100644 --- a/tox.ini +++ b/tox.ini @@ -59,7 +59,7 @@ max-line-length = 120 exclude = **/migrations/* [isort] -skip = .eggs,.tox,docs +skip = .eggs,.tox,docs,env,venv skip_glob = **/migrations/* not_skip = __init__.py atomic = true