Skip to content

Commit e11e8fa

Browse files
authored
Upsphix (#254)
1 parent 7463e59 commit e11e8fa

File tree

5 files changed

+8
-69
lines changed

5 files changed

+8
-69
lines changed

.github/workflows/sphix_build_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
docs:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v2
1515
- uses: seanmiddleditch/gha-setup-ninja@master
1616

1717
- name: Set up Python

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
sphinx
22
sphinxcontrib-googleanalytics
3-
sphinx-rtd-theme
3+
-e git://github.com/zhanghang1989/autorch_sphinx_theme.git#egg=autorch_sphinx_theme

docs/source/conf.py

Lines changed: 3 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# import sys
2222
# sys.path.insert(0, os.path.abspath('.'))
2323
import encoding
24-
import sphinx_rtd_theme
24+
import autorch_sphinx_theme
2525

2626

2727
# -- General configuration ------------------------------------------------
@@ -102,8 +102,8 @@
102102
# The theme to use for HTML and HTML Help pages. See the documentation for
103103
# a list of builtin themes.
104104
#
105-
html_theme = 'sphinx_rtd_theme'
106-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
105+
html_theme = 'autorch_sphinx_theme'
106+
html_theme_path = [autorch_sphinx_theme.get_html_theme_path()]
107107

108108
# Theme options are theme-specific and customize the look and feel of a theme
109109
# further. For a list of options available for each theme, see the
@@ -186,62 +186,3 @@
186186
author, 'Encoding', 'One line description of project.',
187187
'Miscellaneous'),
188188
]
189-
190-
191-
# Example configuration for intersphinx: refer to the Python standard library.
192-
intersphinx_mapping = {
193-
'python': ('https://docs.python.org/', None),
194-
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
195-
}
196-
197-
# -- A patch that prevents Sphinx from cross-referencing ivar tags -------
198-
# See http://stackoverflow.com/a/41184353/3343043
199-
200-
from docutils import nodes
201-
from sphinx.util.docfields import TypedField
202-
from sphinx import addnodes
203-
204-
205-
def patched_make_field(self, types, domain, items, **kw):
206-
# `kw` catches `env=None` needed for newer sphinx while maintaining
207-
# backwards compatibility when passed along further down!
208-
209-
# type: (List, unicode, Tuple) -> nodes.field
210-
def handle_item(fieldarg, content):
211-
par = nodes.paragraph()
212-
par += addnodes.literal_strong('', fieldarg) # Patch: this line added
213-
# par.extend(self.make_xrefs(self.rolename, domain, fieldarg,
214-
# addnodes.literal_strong))
215-
if fieldarg in types:
216-
par += nodes.Text(' (')
217-
# NOTE: using .pop() here to prevent a single type node to be
218-
# inserted twice into the doctree, which leads to
219-
# inconsistencies later when references are resolved
220-
fieldtype = types.pop(fieldarg)
221-
if len(fieldtype) == 1 and isinstance(fieldtype[0], nodes.Text):
222-
typename = u''.join(n.astext() for n in fieldtype)
223-
typename = typename.replace('int', 'python:int')
224-
typename = typename.replace('long', 'python:long')
225-
typename = typename.replace('float', 'python:float')
226-
typename = typename.replace('type', 'python:type')
227-
par.extend(self.make_xrefs(self.typerolename, domain, typename,
228-
addnodes.literal_emphasis, **kw))
229-
else:
230-
par += fieldtype
231-
par += nodes.Text(')')
232-
par += nodes.Text(' -- ')
233-
par += content
234-
return par
235-
236-
fieldname = nodes.field_name('', self.label)
237-
if len(items) == 1 and self.can_collapse:
238-
fieldarg, content = items[0]
239-
bodynode = handle_item(fieldarg, content)
240-
else:
241-
bodynode = self.list_type()
242-
for fieldarg, content in items:
243-
bodynode += nodes.list_item('', handle_item(fieldarg, content))
244-
fieldbody = nodes.field_body('', bodynode)
245-
return nodes.field('', fieldname, fieldbody)
246-
247-
TypedField.make_field = patched_make_field

encoding/nn/encoding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Encoding(Module):
2424
Encoding Layer: a learnable residual encoder.
2525
2626
.. image:: _static/img/cvpr17.svg
27-
:width: 50%
27+
:width: 30%
2828
:align: center
2929
3030
Encoding Layer accpets 3D or 4D inputs.

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
cwd = os.path.dirname(os.path.abspath(__file__))
2020

21-
version = '1.1.1'
21+
version = '1.1.2'
2222
try:
2323
from datetime import date
2424
today = date.today()
25-
day = today.strftime("b%d%m%Y")
25+
day = today.strftime("b%Y%m%d")
2626
version += day
2727
except Exception:
2828
pass
@@ -40,13 +40,11 @@ class install(setuptools.command.install.install):
4040
def run(self):
4141
create_version_file()
4242
setuptools.command.install.install.run(self)
43-
#subprocess.check_call("python tests/unit_test.py".split())
4443

4544
class develop(setuptools.command.develop.develop):
4645
def run(self):
4746
create_version_file()
4847
setuptools.command.develop.develop.run(self)
49-
#subprocess.check_call("python tests/unit_test.py".split())
5048

5149
readme = open('README.md').read()
5250

0 commit comments

Comments
 (0)