-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from carlos-jenkins/fix_sphinx_1_8_0
new: usr: Updating codebase for Sphinx 1.8.0 and ownership transfer.
- Loading branch information
Showing
14 changed files
with
54 additions
and
54 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ License | |
|
||
:: | ||
|
||
Copyright (C) 2015 Carlos Jenkins <[email protected]> | ||
Copyright (C) 2015-2018 KuraLabs S.R.L | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
|
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 |
---|---|---|
|
@@ -239,7 +239,7 @@ License | |
|
||
:: | ||
|
||
Copyright (C) 2015 Carlos Jenkins <[email protected]> | ||
Copyright (C) 2015-2018 KuraLabs S.R.L | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
|
Binary file not shown.
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,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2015 Carlos Jenkins <[email protected]> | ||
# Copyright (C) 2015-2018 KuraLabs S.R.L | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
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,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2015 Carlos Jenkins <[email protected]> | ||
# Copyright (C) 2015-2018 KuraLabs S.R.L | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -20,8 +20,8 @@ | |
|
||
from .apinode import __doc__, APINode # noqa | ||
|
||
__author__ = 'Carlos Jenkins' | ||
__email__ = '[email protected]' | ||
__version__ = '1.3.1' | ||
__author__ = 'KuraLabs S.R.L' | ||
__email__ = '[email protected]' | ||
__version__ = '1.4.0' | ||
|
||
__all__ = ['APINode'] |
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,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2015 Carlos Jenkins <[email protected]> | ||
# Copyright (C) 2015-2018 KuraLabs S.R.L | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -162,9 +162,9 @@ def __init__(self, name, directory=None): | |
try: | ||
subnode = APINode(subname, self.directory) | ||
self.subnodes.append(subnode) | ||
except: # Overbroad exception handling on purpose | ||
except Exception as e: | ||
log.error('Failed to import {}'.format(subname)) | ||
log.debug(format_exc()) | ||
log.error(format_exc()) | ||
self.subnodes_failed.append(subname) | ||
|
||
# Fetch all public objects | ||
|
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,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2015 Carlos Jenkins <[email protected]> | ||
# Copyright (C) 2015-2018 KuraLabs S.R.L | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -23,12 +23,13 @@ | |
from __future__ import print_function, division | ||
|
||
from inspect import getdoc | ||
from logging import getLogger | ||
from functools import wraps | ||
from traceback import format_exc | ||
from os.path import join, dirname, abspath, exists | ||
|
||
from jinja2.sandbox import SandboxedEnvironment | ||
from sphinx.util.osutil import ensuredir | ||
from sphinx.util.logging import getLogger | ||
from sphinx.jinja2glue import BuiltinTemplateLoader | ||
|
||
from . import __version__ | ||
|
@@ -43,20 +44,17 @@ def handle_exception(func): | |
Utility decorator to report all exceptions in module without making Sphinx | ||
to die. | ||
""" | ||
@wraps(func) | ||
def wrapper(app): | ||
try: | ||
func(app) | ||
except Exception: | ||
app.warn( | ||
log.warning( | ||
'Unhandled exception in autoapi module: \n{}'.format( | ||
format_exc() | ||
) | ||
) | ||
|
||
# Preserve docstring | ||
if hasattr(func, '__doc__'): | ||
wrapper.__doc__ = func.__doc__ | ||
|
||
return wrapper | ||
|
||
|
||
|
@@ -73,9 +71,9 @@ def filter_summary(obj): | |
summary = doc.split('\n').pop(0) | ||
summary.replace('\\', '\\\\') # Escape backslash in RST | ||
return summary | ||
except: | ||
except Exception as e: | ||
log.error( | ||
'AutoApi failed to determine autosummary for obj: {}'.format(obj) | ||
'AutoApi failed to determine summary for obj: {}'.format(obj) | ||
) | ||
log.error(format_exc()) | ||
|
||
|
@@ -158,7 +156,8 @@ def builder_inited(app): | |
|
||
# Iterate nodes and render them | ||
for node in nodes: | ||
out_file = join(out_dir, node.name + app.config.source_suffix[0]) | ||
source_suffix = next(iter(app.config.source_suffix)) | ||
out_file = join(out_dir, node.name + source_suffix) | ||
|
||
# Skip file if it override is off and it exists | ||
if not options['override'] and exists(out_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 |
---|---|---|
|
@@ -4,4 +4,4 @@ pytest | |
pytest-cov | ||
sphinx | ||
sphinx_rtd_theme | ||
sphinxcontrib-plantuml | ||
plantweb |
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,7 +1,7 @@ | ||
#!/usr/bin/env python | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2015 Carlos Jenkins <[email protected]> | ||
# Copyright (C) 2015-2018 KuraLabs S.R.L | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
@@ -68,8 +68,8 @@ def find_requirements(filename): | |
install_requires=find_requirements('requirements.txt'), | ||
|
||
# Metadata | ||
author='Carlos Jenkins', | ||
author_email='[email protected]', | ||
author='KuraLabs S.R.L', | ||
author_email='[email protected]', | ||
description=( | ||
'Automatic API reference documentation generation for Sphinx inspired ' | ||
'by Doxygen' | ||
|
@@ -79,7 +79,7 @@ def find_requirements(filename): | |
keywords='autoapi', | ||
|
||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Development Status :: 5 - Production/Stable', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Natural Language :: English', | ||
|
@@ -88,5 +88,6 @@ def find_requirements(filename): | |
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2015 Carlos Jenkins <[email protected]> | ||
# Copyright (C) 2015-2018 KuraLabs S.R.L | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
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,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2015 Carlos Jenkins <[email protected]> | ||
# Copyright (C) 2015-2018 KuraLabs S.R.L | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
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