Unverified Commit e11e8fa6 authored by Stacy Yang's avatar Stacy Yang Committed by GitHub
Browse files

Upsphix (#254)

parent 7463e593
......@@ -11,7 +11,7 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Set up Python
......
sphinx
sphinxcontrib-googleanalytics
sphinx-rtd-theme
-e git://github.com/zhanghang1989/autorch_sphinx_theme.git#egg=autorch_sphinx_theme
......@@ -21,7 +21,7 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import encoding
import sphinx_rtd_theme
import autorch_sphinx_theme
# -- General configuration ------------------------------------------------
......@@ -102,8 +102,8 @@ todo_include_todos = True
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme = 'autorch_sphinx_theme'
html_theme_path = [autorch_sphinx_theme.get_html_theme_path()]
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
......@@ -186,62 +186,3 @@ texinfo_documents = [
author, 'Encoding', 'One line description of project.',
'Miscellaneous'),
]
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/', None),
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
}
# -- A patch that prevents Sphinx from cross-referencing ivar tags -------
# See http://stackoverflow.com/a/41184353/3343043
from docutils import nodes
from sphinx.util.docfields import TypedField
from sphinx import addnodes
def patched_make_field(self, types, domain, items, **kw):
# `kw` catches `env=None` needed for newer sphinx while maintaining
# backwards compatibility when passed along further down!
# type: (List, unicode, Tuple) -> nodes.field
def handle_item(fieldarg, content):
par = nodes.paragraph()
par += addnodes.literal_strong('', fieldarg) # Patch: this line added
# par.extend(self.make_xrefs(self.rolename, domain, fieldarg,
# addnodes.literal_strong))
if fieldarg in types:
par += nodes.Text(' (')
# NOTE: using .pop() here to prevent a single type node to be
# inserted twice into the doctree, which leads to
# inconsistencies later when references are resolved
fieldtype = types.pop(fieldarg)
if len(fieldtype) == 1 and isinstance(fieldtype[0], nodes.Text):
typename = u''.join(n.astext() for n in fieldtype)
typename = typename.replace('int', 'python:int')
typename = typename.replace('long', 'python:long')
typename = typename.replace('float', 'python:float')
typename = typename.replace('type', 'python:type')
par.extend(self.make_xrefs(self.typerolename, domain, typename,
addnodes.literal_emphasis, **kw))
else:
par += fieldtype
par += nodes.Text(')')
par += nodes.Text(' -- ')
par += content
return par
fieldname = nodes.field_name('', self.label)
if len(items) == 1 and self.can_collapse:
fieldarg, content = items[0]
bodynode = handle_item(fieldarg, content)
else:
bodynode = self.list_type()
for fieldarg, content in items:
bodynode += nodes.list_item('', handle_item(fieldarg, content))
fieldbody = nodes.field_body('', bodynode)
return nodes.field('', fieldname, fieldbody)
TypedField.make_field = patched_make_field
......@@ -24,7 +24,7 @@ class Encoding(Module):
Encoding Layer: a learnable residual encoder.
.. image:: _static/img/cvpr17.svg
:width: 50%
:width: 30%
:align: center
Encoding Layer accpets 3D or 4D inputs.
......
......@@ -18,11 +18,11 @@ import setuptools.command.install
cwd = os.path.dirname(os.path.abspath(__file__))
version = '1.1.1'
version = '1.1.2'
try:
from datetime import date
today = date.today()
day = today.strftime("b%d%m%Y")
day = today.strftime("b%Y%m%d")
version += day
except Exception:
pass
......@@ -40,13 +40,11 @@ class install(setuptools.command.install.install):
def run(self):
create_version_file()
setuptools.command.install.install.run(self)
#subprocess.check_call("python tests/unit_test.py".split())
class develop(setuptools.command.develop.develop):
def run(self):
create_version_file()
setuptools.command.develop.develop.run(self)
#subprocess.check_call("python tests/unit_test.py".split())
readme = open('README.md').read()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment