Skip to content

Commit a54b265

Browse files
Added notebooks docs support (#1592)
Co-authored-by: Fedor Ignatov <[email protected]>
1 parent 2bc186b commit a54b265

File tree

15 files changed

+1411
-550
lines changed

15 files changed

+1411
-550
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ Please leave us [your feedback](https://forms.gle/i64fowQmiVhMMC7f9) on how we c
2626

2727
**Models**
2828

29-
[Named Entity Recognition](http://docs.deeppavlov.ai/en/master/features/models/ner.html) | [Intent/Sentence Classification](http://docs.deeppavlov.ai/en/master/features/models/classifiers.html) |
29+
[Named Entity Recognition](http://docs.deeppavlov.ai/en/master/features/models/NER.html) | [Intent/Sentence Classification](http://docs.deeppavlov.ai/en/master/features/models/classifiers.html) |
3030

31-
[Question Answering over Text (SQuAD)](http://docs.deeppavlov.ai/en/master/features/models/squad.html) | [Knowledge Base Question Answering](http://docs.deeppavlov.ai/en/master/features/models/kbqa.html)
31+
[Question Answering over Text (SQuAD)](http://docs.deeppavlov.ai/en/master/features/models/SQuAD.html) | [Knowledge Base Question Answering](http://docs.deeppavlov.ai/en/master/features/models/kbqa.html)
3232

3333
[Sentence Similarity/Ranking](http://docs.deeppavlov.ai/en/master/features/models/neural_ranking.html) | [TF-IDF Ranking](http://docs.deeppavlov.ai/en/master/features/models/tfidf_ranking.html)
3434

deeppavlov/_meta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '1.0.0rc1'
1+
__version__ = '1.0.0'
22
__author__ = 'Neural Networks and Deep Learning lab, MIPT'
33
__description__ = 'An open source library for building end-to-end dialog systems and training chatbots.'
44
__keywords__ = ['NLP', 'NER', 'SQUAD', 'Intents', 'Chatbot']

docs/_static/my_blocks.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
button.copybtn svg {
2+
width: 1.3em;
3+
height: 1.3em;
4+
padding: 0.1em;
5+
}
6+
7+
button.copybtn {
8+
top: 0.2em;
9+
width: 1.4em;
10+
height: 1.4em;
11+
}
12+
13+
.rst-content .linenodiv pre, .rst-content div[class^=highlight] pre, .rst-content pre.literal-block {
14+
font-size: 13px;
15+
line-height: 1.4;
16+
}

docs/conf.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
'sphinx.ext.mathjax',
4949
'sphinx.ext.extlinks',
5050
'nbsphinx',
51+
'IPython.sphinxext.ipython_console_highlighting',
52+
'sphinx_copybutton'
5153
]
5254

5355
# Add any paths that contain templates here, relative to this directory.
@@ -67,12 +69,16 @@
6769
#
6870
# This is also used if you do content translation via gettext catalogs.
6971
# Usually you set "language" from the command line for these cases.
70-
language = None
72+
language = 'en'
7173

7274
# List of patterns, relative to source directory, that match files and
7375
# directories to ignore when looking for source files.
7476
# This pattern also affects html_static_path and html_extra_path .
75-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints']
77+
exclude_patterns = ['_build',
78+
'Thumbs.db',
79+
'.DS_Store',
80+
'**.ipynb_checkpoints'
81+
]
7682

7783
# The name of the Pygments (syntax highlighting) style to use.
7884
pygments_style = 'sphinx'
@@ -102,14 +108,7 @@
102108
# relative to this directory. They are copied after the builtin static files,
103109
# so a file named "default.css" will overwrite the builtin "default.css".
104110
html_static_path = ['_static']
105-
106-
html_context = {
107-
'css_files': [
108-
'https://media.readthedocs.org/css/sphinx_rtd_theme.css',
109-
'https://media.readthedocs.org/css/readthedocs-doc-embed.css',
110-
'_static/deeppavlov.css'
111-
]
112-
}
111+
html_css_files = ['my_blocks.css', 'deeppavlov.css']
113112

114113
# Custom sidebar templates, must be a dictionary that maps document names
115114
# to template names.
@@ -121,6 +120,18 @@
121120
#
122121
# html_sidebars = {}
123122

123+
nbsphinx_prolog = """
124+
.. raw:: html
125+
126+
<style>
127+
.nbinput .prompt,
128+
.nboutput .prompt {
129+
display: none;
130+
}
131+
</style>
132+
"""
133+
nbsphinx_execute = 'never'
134+
124135

125136
# -- Options for HTMLHelp output ---------------------------------------------
126137

0 commit comments

Comments
 (0)