Skip to content

Commit

Permalink
Merge f914c47 into 9010f4a
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdullahshah committed Oct 23, 2020
2 parents 9010f4a + f914c47 commit 3b28de5
Show file tree
Hide file tree
Showing 33 changed files with 395 additions and 187 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,5 @@ evaql_parserVisitor.py

#VSCode
.vscode/*

/api-docs/_autosummary/
34 changes: 34 additions & 0 deletions api-docs/_templates/custom-class-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:members:
:show-inheritance:
:inherited-members:
:special-members: __call__, __add__, __mul__

{% block methods %}
{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
:nosignatures:
{% for item in methods %}
{%- if not item.startswith('_') %}
~{{ name }}.{{ item }}
{%- endif -%}
{%- endfor %}
{% endif %}
{% endblock %}

{% block attributes %}
{% if attributes %}
.. rubric:: {{ _('Attributes') }}

.. autosummary::
{% for item in attributes %}
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
66 changes: 66 additions & 0 deletions api-docs/_templates/custom-module-template.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}

{% block attributes %}
{% if attributes %}
.. rubric:: Module attributes

.. autosummary::
:toctree:
{% for item in attributes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:toctree:
:nosignatures:
{% for item in functions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:toctree:
:template: custom-class-template.rst
:nosignatures:
{% for item in classes %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
:toctree:
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block modules %}
{% if modules %}
.. autosummary::
:toctree:
:template: custom-module-template.rst
:recursive:
{% for item in modules %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}
58 changes: 47 additions & 11 deletions api-docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,24 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import warnings
import os
import sys

sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../src/'))
sys.path.append(os.path.abspath('.'))
sys.path.append(os.path.abspath('../'))

#sys.path.insert(0, os.path.abspath('../src2/'))
#sys.path.insert(0, os.path.abspath('../src/'))

print('Sys paths:')
for pathx in sys.path:
print(pathx)
# Temp. workaround for
# https://github.com/agronholm/sphinx-autodoc-typehints/issues/133
warnings.filterwarnings(
'ignore', message='sphinx.util.inspect.Signature\(\) is deprecated')

import sphinx_rtd_theme

# -- Project information -----------------------------------------------------

Expand All @@ -30,7 +40,7 @@

master_doc = 'index'

html_theme = 'mps'
# html_theme = 'mps'
html_sidebars = {
'**': ['localtoc.html', 'relations.html', 'links.html', 'contact.html'],
}
Expand All @@ -41,18 +51,32 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx',
'sphinx.ext.todo', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode',
'sphinx.ext.napoleon', 'sphinx.ext.graphviz', 'extensions.mps'
'sphinx.ext.autosummary',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinx.ext.graphviz',
'extensions.mps'
]
autosummary_generate = True # Turn on sphinx.ext.autosummary
autoclass_content = "both" # Add __init__ doc (ie. params) to class summaries
# Remove 'view source code' from top of page (for html, not python)
html_show_sourcelink = False
# If no class summary, inherit base class summary
autodoc_inherit_docstrings = False
numpydoc_show_class_members = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ['.py', '_build', 'Thumbs.db', '.DS_Store']

# The suffix of source filenames.
source_suffix = '.rst'
Expand All @@ -70,7 +94,10 @@
# sys.modules[mod_name] = mock.Mock()

autodoc_mock_imports = ["numpy", "sqlalchemy", "sqlalchemy_utils",
"petastorm", "yaml", "pyspark"]
"sqlalchemy.orm", "sqlalchemy.orm.exc",
"sqlalchemy.types",
"petastorm", "yaml", "pyspark", "torch",
"pandas", "cv2"]
# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand All @@ -79,7 +106,16 @@
# html_theme = 'sphinx_rtd_theme'

# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme_path = ['themes']
# html_theme_path = ['themes']


# on_rtd is whether on readthedocs.org,
# this line of code grabbed from docs.readthedocs.org...
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
38 changes: 0 additions & 38 deletions api-docs/documentation/catalog/catalog.models.rst

This file was deleted.

66 changes: 0 additions & 66 deletions api-docs/documentation/catalog/catalog.rst

This file was deleted.

38 changes: 0 additions & 38 deletions api-docs/documentation/catalog/catalog.services.rst

This file was deleted.

2 changes: 0 additions & 2 deletions api-docs/documentation/executor.rst

This file was deleted.

10 changes: 0 additions & 10 deletions api-docs/documentation/index.rst

This file was deleted.

Loading

0 comments on commit 3b28de5

Please sign in to comment.