Skip to content

Commit

Permalink
Merge branch 'patch-sphinx-3.5.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
tcppjp committed Mar 24, 2021
2 parents a93f2e0 + 3b736d5 commit aa2d518
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 49 deletions.
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF
formats: [htmlzip, pdf]

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: requirements.txt
6 changes: 3 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ verify_ssl = true

[packages]
sphinx-autobuild = "*"
docutils = "==0.13.1"
Sphinx = "==1.8.4"
sphinx_rtd_theme = "==0.4.3"
docutils = "==0.16"
Sphinx = "==3.5.3"
sphinx_rtd_theme = "==0.5.1"
69 changes: 50 additions & 19 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 18 additions & 12 deletions docs/_extensions/tecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from sphinx.roles import XRefRole
from sphinx.domains import Domain, ObjType
from sphinx.directives import ObjectDescription
from sphinx.locale import l_, _
from sphinx.locale import _
from sphinx.util.nodes import make_refnode
from sphinx.util.docfields import Field, TypedField

Expand Down Expand Up @@ -68,8 +68,14 @@ class TECSObject(ObjectDescription):
"""Description of a TECS object.
"""

# stopwords imported from C
stopwords = CObject.stopwords
# stopwords copied from those of C
# (https://github.com/sphinx-doc/sphinx/blob/2f61ba8/sphinx/domains/c.py#L76)
stopwords = set((
'const', 'void', 'char', 'wchar_t', 'int', 'short',
'long', 'float', 'double', 'unsigned', 'signed', 'FILE',
'clock_t', 'time_t', 'ptrdiff_t', 'size_t', 'ssize_t',
'struct', '_Bool',
))

def get_index_text(self, name):
raise NotImplementedError("must be implemented in subclass")
Expand Down Expand Up @@ -365,15 +371,15 @@ class TECSDomain(Domain):
name = 'tecs'
label = 'TECS'
object_types = {
'celltype': ObjType(l_('cell type'), 'celltype'),
'cell': ObjType(l_('cell'), 'cell'),
'call': ObjType(l_('call port'), 'call'),
'entry': ObjType(l_('entry port'), 'entry'),
'attribute': ObjType(l_('attribute'), 'attr'),
'variable': ObjType(l_('variable'), 'var'),
'signature': ObjType(l_('signature'), 'signature'),
'sigfunction': ObjType(l_('sigfunction'), 'sigfunction'),
'namespace': ObjType(l_('namespace'), 'namespace'),
'celltype': ObjType(_('cell type'), 'celltype'),
'cell': ObjType(_('cell'), 'cell'),
'call': ObjType(_('call port'), 'call'),
'entry': ObjType(_('entry port'), 'entry'),
'attribute': ObjType(_('attribute'), 'attr'),
'variable': ObjType(_('variable'), 'var'),
'signature': ObjType(_('signature'), 'signature'),
'sigfunction': ObjType(_('sigfunction'), 'sigfunction'),
'namespace': ObjType(_('namespace'), 'namespace'),
}
directives = {
'celltype': TECSCellTypeObject,
Expand Down
14 changes: 3 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@
'toppers3-tag': ('https://www.toppers.jp/documents.html#tgki_spec.%s', '')
}

# Disable converting quotes to CJK brackets.
smartquotes = False

# -- Options for HTML output ----------------------------------------------

import sphinx_rtd_theme
Expand Down Expand Up @@ -180,11 +183,6 @@
#
# html_last_updated_fmt = None

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#
# html_sidebars = {}
Expand Down Expand Up @@ -300,12 +298,6 @@
#
# latex_appendices = []

# It false, will not define \strong, \code, itleref, \crossref ... but only
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
# packages.
#
# latex_keep_old_macro_names = True

# If false, no module index is generated.
#
# latex_domain_indices = True
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Sphinx==1.8.4
sphinx-autobuild==0.5.2
sphinx-rtd-theme==0.4.3
docutils==0.13.1
Sphinx==3.5.3
sphinx-autobuild==2021.3.14
sphinx-rtd-theme==0.5.1
docutils==0.16

0 comments on commit aa2d518

Please sign in to comment.