Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Pytorch-Encoding
Commits
e11e8fa6
Unverified
Commit
e11e8fa6
authored
Apr 09, 2020
by
Stacy Yang
Committed by
GitHub
Apr 09, 2020
Browse files
Upsphix (#254)
parent
7463e593
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
69 deletions
+8
-69
.github/workflows/sphix_build_pr.yml
.github/workflows/sphix_build_pr.yml
+1
-1
docs/requirements.txt
docs/requirements.txt
+1
-1
docs/source/conf.py
docs/source/conf.py
+3
-62
encoding/nn/encoding.py
encoding/nn/encoding.py
+1
-1
setup.py
setup.py
+2
-4
No files found.
.github/workflows/sphix_build_pr.yml
View file @
e11e8fa6
...
...
@@ -11,7 +11,7 @@ jobs:
docs
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v
1
-
uses
:
actions/checkout@v
2
-
uses
:
seanmiddleditch/gha-setup-ninja@master
-
name
:
Set up Python
...
...
docs/requirements.txt
View file @
e11e8fa6
sphinx
sphinxcontrib-googleanalytics
sphinx-rtd-
theme
-e git://github.com/zhanghang1989/autorch_sphinx_theme.git#egg=autorch_sphinx_
theme
docs/source/conf.py
View file @
e11e8fa6
...
...
@@ -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
encoding/nn/encoding.py
View file @
e11e8fa6
...
...
@@ -24,7 +24,7 @@ class Encoding(Module):
Encoding Layer: a learnable residual encoder.
.. image:: _static/img/cvpr17.svg
:width:
5
0%
:width:
3
0%
:align: center
Encoding Layer accpets 3D or 4D inputs.
...
...
setup.py
View file @
e11e8fa6
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment