Skip to content

Commit ea8024c

Browse files
authored
Use Sphinx v2 (#2470)
1 parent 6610976 commit ea8024c

9 files changed

+57
-58
lines changed

.github/workflows/deploy-branch.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
jobs:
66
deploy-branch:
77
runs-on: ubuntu-latest
8-
container: tarantool/doc-builder:fat-1
8+
container: tarantool/doc-builder:fat-2
99
env:
1010
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
1111
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}

.github/workflows/deploy-custom.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ on:
3131
jobs:
3232
custom-deploy-branch:
3333
runs-on: ubuntu-latest
34-
container: tarantool/doc-builder:fat-1
34+
container: tarantool/doc-builder:fat-2
3535
env:
3636
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
3737
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
deploy:
1212
runs-on: ubuntu-latest
13-
container: tarantool/doc-builder:fat-1
13+
container: tarantool/doc-builder:fat-2
1414
env:
1515
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
1616
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}

.github/workflows/pull-translation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
jobs:
1414
pull-translations:
1515
runs-on: ubuntu-latest
16-
container: tarantool/doc-builder:fat-1
16+
container: tarantool/doc-builder:fat-2
1717

1818
steps:
1919
- uses: actions/checkout@v2

.github/workflows/push-translation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
push-translation-sources:
1111
runs-on: ubuntu-latest
12-
container: tarantool/doc-builder:fat-1
12+
container: tarantool/doc-builder:fat-2
1313
steps:
1414
- uses: actions/checkout@v2
1515

.github/workflows/update-pot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
update-translations:
1414
runs-on: ubuntu-latest
15-
container: tarantool/doc-builder:fat-1
15+
container: tarantool/doc-builder:fat-2
1616

1717
steps:
1818

README.rst

+23-23
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ First of all, pull the image for building the docs.
1818

1919
.. code-block:: bash
2020
21-
docker pull tarantool/doc-builder
21+
docker pull tarantool/doc-builder:fat
2222
2323
Next, initialize a Makefile for your OS:
2424

2525
.. code-block:: bash
2626
27-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "cmake ."
27+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "cmake ."
2828
2929
Update submodules and generate documentation sources from code
3030
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -37,7 +37,7 @@ To include their latest contents in the docs, run these two steps.
3737

3838
.. code-block:: bash
3939
40-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make pull-modules"
40+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make pull-modules"
4141
4242
This will initialize Git submodules and update them to the top of the stable
4343
branch in each repository.
@@ -65,7 +65,7 @@ To include their latest contents in the docs, run these two steps.
6565

6666
.. code-block:: bash
6767
68-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make build-modules"
68+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make build-modules"
6969
7070
This command will do two things:
7171

@@ -87,7 +87,7 @@ and refresh the browser page.
8787

8888
.. code-block:: bash
8989
90-
docker run --rm -it -p 8000:8000 -v $(pwd):/doc tarantool/doc-builder sh -c "make autobuild"
90+
docker run --rm -it -p 8000:8000 -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make autobuild"
9191
9292
First build will take some time.
9393
When it's done, open `127.0.0.1:8000 <http://127.0.0.1:8000>`_ in the browser.
@@ -99,8 +99,8 @@ and then serve them using python3 built-in server:
9999

100100
.. code-block:: bash
101101
102-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make html"
103-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make html-ru"
102+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make html"
103+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make html-ru"
104104
python3 -m http.server --directory output/html
105105
106106
or python2 built-in server:
@@ -113,23 +113,23 @@ or python2 built-in server:
113113
then go to `localhost:8000 <http://localhost:8000>`_ in your browser.
114114

115115
There are other commands which can run
116-
in the ``tarantool/doc-builder`` container:
116+
in the ``tarantool/doc-builder:fat`` container:
117117

118118
.. code-block:: bash
119119
120-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make html"
121-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make html-ru"
122-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make singlehtml"
123-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make singlehtml-ru"
124-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make pdf"
125-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make pdf-ru"
126-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make json"
127-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make json-ru"
128-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make epub"
129-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make epub-ru"
130-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make update-pot"
131-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make update-po"
132-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make update-po-force"
120+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make html"
121+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make html-ru"
122+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make singlehtml"
123+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make singlehtml-ru"
124+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make pdf"
125+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make pdf-ru"
126+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make json"
127+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make json-ru"
128+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make epub"
129+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make epub-ru"
130+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make update-pot"
131+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make update-po"
132+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make update-po-force"
133133
134134
Localization
135135
------------
@@ -159,7 +159,7 @@ Upload translation sources any time when they have changed:
159159
.. code-block:: bash
160160
161161
# first, update the translation sources
162-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make update-pot"
162+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make update-pot"
163163
164164
# next, upload them to Crowdin
165165
crowdin upload
@@ -178,7 +178,7 @@ Then reformat them to see the real changes.
178178
.. code-block:: bash
179179
180180
crowdin download
181-
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder sh -c "make reformat-po"
181+
docker run --rm -it -v $(pwd):/doc tarantool/doc-builder:fat sh -c "make reformat-po"
182182
183183
How to contribute
184184
-----------------

conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
'ext.DropdownList',
3131
'ext.WebPageSection',
3232
'ext.WebPageButtons',
33-
'ext.WebPageMap',
3433
'ext.ModuleBlock',
3534
'ext.DownloadPageBlock',
3635
'ext.CustomHTMLTranslator',

ext/LuaDomain.py

+28-28
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from sphinx import addnodes
3333
from sphinx import version_info as sphinx_version_info
3434
from sphinx.roles import XRefRole
35-
from sphinx.locale import l_, _
35+
from sphinx.locale import _
3636
from sphinx.domains import Domain, ObjType, Index
3737
from sphinx.directives import ObjectDescription
3838
from sphinx.util.nodes import make_refnode
@@ -334,7 +334,7 @@ def get_index_text(self, names):
334334

335335
class LuaClass(LuaObject):
336336
doc_field_types = [
337-
Field('extend', label=l_('Extends'), has_arg=False,
337+
Field('extend', label=_('Extends'), has_arg=False,
338338
names=('extend',)),
339339
]
340340

@@ -357,15 +357,15 @@ class LuaFunction(LuaObject):
357357
typename = "function"
358358

359359
doc_field_types = [
360-
TypedField('parameter', label=l_('Parameters'),
360+
TypedField('parameter', label=_('Parameters'),
361361
names=('param', 'parameter', 'arg', 'argument'),
362362
typerolename='obj', typenames=('paramtype', 'type', 'ptype')),
363-
TypedField('returnvalues', label=l_('Returns'),
363+
TypedField('returnvalues', label=_('Returns'),
364364
names=('return', 'ret'), typerolename='obj',
365365
typenames=('rtype', 'type')),
366-
Field('returnvalue', label=l_('Returns'), has_arg=False,
366+
Field('returnvalue', label=_('Returns'), has_arg=False,
367367
names=('returns')),
368-
Field('returntype', label=l_('Return type'), has_arg=False,
368+
Field('returntype', label=_('Return type'), has_arg=False,
369369
names=('returntype',)),
370370
]
371371

@@ -379,18 +379,18 @@ def get_index_name(self, names):
379379
return '%s()' % (names['fullname'])
380380

381381
class LuaVarFunction(LuaObject):
382-
typename = l_("varfunc")
382+
typename = _("varfunc")
383383

384384
doc_field_types = [
385-
TypedField('parameter', label=l_('Parameters'),
385+
TypedField('parameter', label=_('Parameters'),
386386
names=('param', 'parameter', 'arg', 'argument'),
387387
typerolename='obj', typenames=('paramtype', 'type', 'ptype')),
388-
TypedField('returnvalues', label=l_('Returns'),
388+
TypedField('returnvalues', label=_('Returns'),
389389
names=('return', 'ret'), typerolename='obj',
390390
typenames=('rtype', 'type')),
391-
Field('returnvalue', label=l_('Returns'), has_arg=False,
391+
Field('returnvalue', label=_('Returns'), has_arg=False,
392392
names=('returns')),
393-
Field('returntype', label=l_('Return type'), has_arg=False,
393+
Field('returntype', label=_('Return type'), has_arg=False,
394394
names=('returntype',)),
395395
]
396396

@@ -439,7 +439,7 @@ class LuaData(LuaObject):
439439
)
440440

441441
doc_field_types = [
442-
Field('type', label=l_('Type'), has_arg=False,
442+
Field('type', label=_('Type'), has_arg=False,
443443
names=('type',)),
444444
]
445445

@@ -450,7 +450,7 @@ def build_objtype(self):
450450
return self.options.get('objtype') or ""
451451

452452
class LuaAttribute(LuaData):
453-
typename = l_("attribute")
453+
typename = _("attribute")
454454

455455
lua_class_re = re.compile(
456456
r'''([\w\./\-]+):([\w\./\-]+)?
@@ -471,18 +471,18 @@ def build_context(self, context):
471471
return None, None
472472

473473
class LuaOperator(LuaObject):
474-
typename = l_("operator")
474+
typename = _("operator")
475475

476476
doc_field_types = [
477-
TypedField('parameter', label=l_('Parameters'),
477+
TypedField('parameter', label=_('Parameters'),
478478
names=('param', 'parameter', 'arg', 'argument'),
479479
typerolename='obj', typenames=('paramtype', 'type', 'ptype')),
480-
TypedField('returnvalues', label=l_('Returns'),
480+
TypedField('returnvalues', label=_('Returns'),
481481
names=('return', 'ret'), typerolename='obj',
482482
typenames=('rtype', 'type')),
483-
Field('returnvalue', label=l_('Returns'), has_arg=False,
483+
Field('returnvalue', label=_('Returns'), has_arg=False,
484484
names=('returns')),
485-
Field('returntype', label=l_('Return type'), has_arg=False,
485+
Field('returntype', label=_('Return type'), has_arg=False,
486486
names=('returntype',)),
487487
]
488488

@@ -706,8 +706,8 @@ class LuaModuleIndex(Index):
706706
Index subclass to provide the Lua module index.
707707
"""
708708
name = 'modindex'
709-
localname = l_('Lua Module Index')
710-
shortname = l_('modules')
709+
localname = _('Lua Module Index')
710+
shortname = _('modules')
711711

712712
def generate(self, docnames=None):
713713
content = {}
@@ -776,14 +776,14 @@ class LuaDomain(Domain):
776776
name = 'lua'
777777
label = 'Lua'
778778
object_types = {
779-
'class': ObjType(l_('class'), 'class', 'obj'),
780-
'attribute': ObjType(l_('attribute'), 'data', 'obj'),
781-
'function': ObjType(l_('function'), 'func', 'obj'),
782-
'varunc': ObjType(l_('varfunc'), 'func', 'obj'),
783-
'method': ObjType(l_('method'), 'func', 'obj'),
784-
'operator': ObjType(l_('operator'), 'func', 'obj'),
785-
'module': ObjType(l_('module'), 'mod', 'obj'),
786-
'data': ObjType(l_('data'), 'data', 'obj'),
779+
'class': ObjType(_('class'), 'class', 'obj'),
780+
'attribute': ObjType(_('attribute'), 'data', 'obj'),
781+
'function': ObjType(_('function'), 'func', 'obj'),
782+
'varfunc': ObjType(_('varfunc'), 'func', 'obj'),
783+
'method': ObjType(_('method'), 'func', 'obj'),
784+
'operator': ObjType(_('operator'), 'func', 'obj'),
785+
'module': ObjType(_('module'), 'mod', 'obj'),
786+
'data': ObjType(_('data'), 'data', 'obj'),
787787
}
788788

789789
directives = {

0 commit comments

Comments
 (0)