Skip to content
This repository has been archived by the owner on Feb 9, 2019. It is now read-only.

Commit

Permalink
Merge branch 'feature/nc-1198' into 'develop'
Browse files Browse the repository at this point in the history
Add drf docs generation (NC-1198)

- NC-1198

See merge request !18
  • Loading branch information
livenson committed Apr 20, 2016
2 parents 7138f6c + c56bcc3 commit 5871066
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ TEST-*.xml

# documentation
docs/_build/
docs/drfapi/

/static_files
12 changes: 12 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,3 +258,15 @@

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

os.environ['DJANGO_SETTINGS_MODULE'] = 'nodeconductor.server.test_settings'
from django.conf import settings
settings.INSTALLED_APPS = [app for app in settings.INSTALLED_APPS if not app.endswith('tests')]
settings.BASE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))

from django.core.wsgi import get_wsgi_application
get_wsgi_application()

from nodeconductor.core.management.commands.drfdocs import Command
Command().handle('nodeconductor_killbill', path='docs/drfapi')

9 changes: 9 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ API

api

Endpoints
---------

.. toctree::
:maxdepth: 1

drfapi/index


License
-------

Expand Down
19 changes: 18 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python

import sys
from setuptools import setup, find_packages


Expand All @@ -14,6 +14,23 @@
]


# RPM installation does not need oslo, cliff and stevedore libs -
# they are required only for installation with setuptools
try:
action = sys.argv[1]
except IndexError:
pass
else:
if action in ['develop', 'install', 'test', 'bdist_egg']:
install_requires += [
'cliff==1.7.0',
'oslo.config==1.4.0',
'oslo.i18n==1.0.0',
'oslo.utils==1.0.0',
'stevedore==1.0.0',
]


setup(
name='nodeconductor-killbill',
version='0.3.2',
Expand Down

0 comments on commit 5871066

Please sign in to comment.