Skip to content

Commit

Permalink
Merge branch 'feature/sphinx_4.5.0_support' into 'master'
Browse files Browse the repository at this point in the history
Bump Sphinx, Breathe and theme version to latest

See merge request espressif/esp-docs!22
  • Loading branch information
ESP-Marius committed Apr 24, 2022
2 parents 4a7a47f + 2db9a66 commit cddf873
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ build_idf_docs_html:
- .build_template
variables:
DOCS_DIR: $CI_PROJECT_DIR/esp-idf/docs
IDF_COMMIT_ID: 989cb70289af8
IDF_COMMIT_ID: 8b402280489d4e73
script:
# add gitlab ssh key
- cit_add_ssh_key "${GITLAB_KEY_PEM}"
Expand All @@ -119,7 +119,7 @@ build_idf_docs_pdf:
- .build_template
variables:
DOCS_DIR: $CI_PROJECT_DIR/esp-idf/docs
IDF_COMMIT_ID: 989cb70289af8
IDF_COMMIT_ID: 8b402280489d4e73
script:
# add gitlab ssh key
- cit_add_ssh_key "${GITLAB_KEY_PEM}"
Expand Down
23 changes: 10 additions & 13 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = esp-docs
version = 0.2.5
version = 1.0.0
author = Espressif
author_email = [email protected]
description = Documentation building package used at Espressif
Expand All @@ -20,25 +20,22 @@ package_dir =
packages = find:
python_requires = >=3.7
install_requires =
markupsafe<2.0 # Locking version due to current version of sphinx breaking with latest version of Jinja
Jinja2>=2.3,<3.0 # Locking version due to current version of sphinx breaking with latest version of Jinja
docutils==0.16 # Locking version due to issues with rendering lists, https://github.com/readthedocs/sphinx_rtd_theme/issues/1115
docutils<0.18
cairosvg==2.5.1 # required by sphinxcontrib-svg2pdfconverter[CairoSVG]
sphinx==2.3.1
breathe==4.14.1
sphinx-copybutton==0.3.0
sphinx==4.5.0
breathe==4.33.1
sphinx-copybutton==0.5.0
sphinx-notfound-page
sphinxcontrib-blockdiag==2.0.0
sphinxcontrib-seqdiag==2.0.0
sphinxcontrib-actdiag==2.0.0
sphinxcontrib-blockdiag==3.0.0
sphinxcontrib-seqdiag==3.0.0
sphinxcontrib-actdiag==3.0.0
sphinxcontrib-nwdiag==2.0.0
sphinxcontrib-wavedrom>=3.0,<3.1
sphinxcontrib-svg2pdfconverter[CairoSVG]==1.1.0
sphinxcontrib-svg2pdfconverter[CairoSVG]==1.2.0
nwdiag==2.0.0
recommonmark
future>=0.16.0 # for gen_esp_err_to_name.py
sphinx_selective_exclude==1.0.3
sphinx_idf_theme==0.4.5
sphinx_idf_theme==1.0.1

[options.packages.find]
where = src
Expand Down
6 changes: 6 additions & 0 deletions src/esp_docs/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ a.internal + em::before {
.tool-sha256 {
word-break: break-all;
}

/* Fix extra space in nested toctrees */
.toctree-wrapper ul li>* {
margin-top: 0px !important;
margin-bottom: 0px !important;
}
3 changes: 3 additions & 0 deletions src/esp_docs/check_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

SANITIZE_FILENAME_REGEX = re.compile('[^:]*/([^/:]*)(:.*)')
SANITIZE_LINENUM_REGEX = re.compile('([^:]*)(:[0-9]+:)(.*)')
SANITIZE_DUPLICATE_LINENUM_REGEX = re.compile(r'([^:]*)(:[0-9]+\.)(.*)')


def sanitize_line(line):
Expand All @@ -15,10 +16,12 @@ def sanitize_line(line):
filter:
- only filename, no path at the beginning
- no line numbers after the filename
- no line numbers from duplicate definitions
"""

line = re.sub(SANITIZE_FILENAME_REGEX, r'\1\2', line)
line = re.sub(SANITIZE_LINENUM_REGEX, r'\1:line:\3', line)
line = re.sub(SANITIZE_DUPLICATE_LINENUM_REGEX, r'\1:line.\3', line)
return line


Expand Down
2 changes: 1 addition & 1 deletion src/esp_docs/conf_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def setup_user(app, config):


def setup(app):
app.add_stylesheet('theme_overrides.css')
app.add_css_file('theme_overrides.css')

# config values that are pushed in by build_docs,py
if 'idf_target' not in app.config:
Expand Down
2 changes: 1 addition & 1 deletion src/esp_docs/esp_extensions/link_roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def run(self, **kwargs):
(language, link_text) = text.split(':')
env = self.document.settings.env
docname = env.docname
doc_path = env.doc2path(docname, None, None)
doc_path = env.doc2path(docname)
return_path = '../' * doc_path.count('/') # path back to the root from 'docname'
# then take off 2/3 more paths for language/release/targetname and build the new URL
if env.config.idf_target:
Expand Down
2 changes: 0 additions & 2 deletions src/esp_docs/latex_templates/preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
%%% Needed for displaying Chinese in English documentation
\usepackage{xeCJK}

\usepackage{footnotebackref} %%link at the footnote to go to the place of footnote in the text

%% spacing between line
\usepackage{setspace}
\singlespacing
Expand Down

0 comments on commit cddf873

Please sign in to comment.