From 5b02d61a04e8a8470cc92674d670b385c71df3f5 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Wed, 14 Feb 2018 01:34:50 +0900 Subject: [PATCH 1/9] Use roots/basic for test_latex_logo_if_not_found --- tests/test_build_latex.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index af4b771d8..1057a6867 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -767,7 +767,8 @@ def test_image_in_section(app, status, warning): assert ('\\chapter{Another section}' in result) -@pytest.mark.sphinx('latex', confoverrides={'latex_logo': 'notfound.jpg'}) +@pytest.mark.sphinx('latex', testroot='basic', + confoverrides={'latex_logo': 'notfound.jpg'}) def test_latex_logo_if_not_found(app, status, warning): try: app.builder.build_all() From 3efc8e957a0261a7f6a02f986831ab4bc1d1097a Mon Sep 17 00:00:00 2001 From: Akihiro Takizawa Date: Thu, 15 Feb 2018 14:28:55 +0900 Subject: [PATCH 2/9] key changes to scheme in epub3 opf template --- sphinx/templates/epub3/content.opf_t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/templates/epub3/content.opf_t b/sphinx/templates/epub3/content.opf_t index faabc86df..224443283 100644 --- a/sphinx/templates/epub3/content.opf_t +++ b/sphinx/templates/epub3/content.opf_t @@ -11,7 +11,7 @@ {{ contributor }} {{ publisher }} {{ copyright }} - {{ id }} + {{ id }} {{ date }} {{ date }} {{ version }} From 11f543445af96665db848143a5eb2ce0860e1920 Mon Sep 17 00:00:00 2001 From: Akihiro Takizawa Date: Fri, 16 Feb 2018 09:37:00 +0900 Subject: [PATCH 3/9] fix dc.identifier element using opf:scheme in sphinx/templates/epub3/content.opf_t --- sphinx/templates/epub3/content.opf_t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/templates/epub3/content.opf_t b/sphinx/templates/epub3/content.opf_t index 224443283..dc71bb421 100644 --- a/sphinx/templates/epub3/content.opf_t +++ b/sphinx/templates/epub3/content.opf_t @@ -11,7 +11,7 @@ {{ contributor }} {{ publisher }} {{ copyright }} - {{ id }} + {{ id }} {{ date }} {{ date }} {{ version }} From 8a3f485e59b6e0c1b9d3cbaf80a145b00010b96f Mon Sep 17 00:00:00 2001 From: Akihiro Takizawa Date: Fri, 16 Feb 2018 10:31:50 +0900 Subject: [PATCH 4/9] restore deleted id attribute in dc.identifier element --- sphinx/templates/epub3/content.opf_t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/templates/epub3/content.opf_t b/sphinx/templates/epub3/content.opf_t index dc71bb421..25f57b7b5 100644 --- a/sphinx/templates/epub3/content.opf_t +++ b/sphinx/templates/epub3/content.opf_t @@ -11,7 +11,7 @@ {{ contributor }} {{ publisher }} {{ copyright }} - {{ id }} + {{ id }} {{ date }} {{ date }} {{ version }} From dc4cb0765c1186821978f180dbc5450ae7b10e08 Mon Sep 17 00:00:00 2001 From: Akihiro Takizawa Date: Fri, 16 Feb 2018 11:09:06 +0900 Subject: [PATCH 5/9] restore deleted id attribute in dc.identifier element --- sphinx/templates/epub3/content.opf_t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/templates/epub3/content.opf_t b/sphinx/templates/epub3/content.opf_t index 25f57b7b5..c201e49d6 100644 --- a/sphinx/templates/epub3/content.opf_t +++ b/sphinx/templates/epub3/content.opf_t @@ -11,7 +11,7 @@ {{ contributor }} {{ publisher }} {{ copyright }} - {{ id }} + {{ id }} {{ date }} {{ date }} {{ version }} From b2e18a08e91dfde11c9738d8ab5963b4bbbc947d Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Fri, 16 Feb 2018 21:42:24 +0900 Subject: [PATCH 6/9] Update CHANGES for PR #4622 --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index df83d9b24..b41da6445 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,8 @@ Bugs fixed * #4608: epub: Invalid meta tag is generated * #4260: autodoc: keyword only argument separator is not disappeared if it is appeared at top of the argument list +* #4622: epub: :confval:`epub_scheme` does not effect to content.opf + Testing -------- From 1d311b3b5c5e0e580d776fb6ea3ab0d8ea2ded96 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 17 Feb 2018 00:16:34 +0900 Subject: [PATCH 7/9] test: allows to drop 0.05% coverages --- .codecov.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..aa7a96c27 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,6 @@ +coverage: + status: + patch: + default: + # allowed to drop X% and still result in a "success" commit status + threshold: 0.05 From 675b8fe48fd2747bdd2c31dfd7ea0f3dc422da9f Mon Sep 17 00:00:00 2001 From: Roman Kapl Date: Sun, 11 Feb 2018 15:32:59 +0100 Subject: [PATCH 8/9] Fit graphviz images to page. Use \sphinxincludegraphics, that's what the core image directives use and it handles fitting properly. --- sphinx/ext/graphviz.py | 2 +- tests/test_ext_graphviz.py | 8 ++++---- tests/test_ext_inheritance_diagram.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index 2986bf9c1..08707b733 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -341,7 +341,7 @@ def render_dot_latex(self, node, code, options, prefix='graphviz'): post = r'\hspace*{\fill}}' self.body.append('\n%s' % pre) - self.body.append(r'\includegraphics{%s}' % fname) + self.body.append(r'\sphinxincludegraphics[]{%s}' % fname) if not is_inline: self.body.append('%s\n' % post) diff --git a/tests/test_ext_graphviz.py b/tests/test_ext_graphviz.py index ef77135d7..3efab6b56 100644 --- a/tests/test_ext_graphviz.py +++ b/tests/test_ext_graphviz.py @@ -91,20 +91,20 @@ def test_graphviz_latex(app, status, warning): content = (app.outdir / 'SphinxTests.tex').text() macro = ('\\\\begin{figure}\\[htbp\\]\n\\\\centering\n\\\\capstart\n\n' - '\\\\includegraphics{graphviz-\\w+.pdf}\n' + '\\\\sphinxincludegraphics\\[\\]{graphviz-\\w+.pdf}\n' '\\\\caption{caption of graph}\\\\label{.*}\\\\end{figure}') assert re.search(macro, content, re.S) - macro = 'Hello \\\\includegraphics{graphviz-\\w+.pdf} graphviz world' + macro = 'Hello \\\\sphinxincludegraphics\\[\\]{graphviz-\\w+.pdf} graphviz world' assert re.search(macro, content, re.S) macro = ('\\\\begin{wrapfigure}{r}{0pt}\n\\\\centering\n' - '\\\\includegraphics{graphviz-\\w+.pdf}\n' + '\\\\sphinxincludegraphics\\[\\]{graphviz-\\w+.pdf}\n' '\\\\caption{on right}\\\\label{.*}\\\\end{wrapfigure}') assert re.search(macro, content, re.S) macro = (r'\{\\hfill' - r'\\includegraphics{graphviz-.*}' + r'\\sphinxincludegraphics\[\]{graphviz-.*}' r'\\hspace\*{\\fill}}') assert re.search(macro, content, re.S) diff --git a/tests/test_ext_inheritance_diagram.py b/tests/test_ext_inheritance_diagram.py index ed79729e6..ad106e6c6 100644 --- a/tests/test_ext_inheritance_diagram.py +++ b/tests/test_ext_inheritance_diagram.py @@ -40,7 +40,7 @@ def test_inheritance_diagram_latex(app, status, warning): content = (app.outdir / 'Python.tex').text() pattern = ('\\\\begin{figure}\\[htbp]\n\\\\centering\n\\\\capstart\n\n' - '\\\\includegraphics{inheritance-\\w+.pdf}\n' + '\\\\sphinxincludegraphics\\[\\]{inheritance-\\w+.pdf}\n' '\\\\caption{Test Foo!}\\\\label{\\\\detokenize{index:id1}}\\\\end{figure}') assert re.search(pattern, content, re.M) From 08158bf804a010c3afa1b88d33d6db79e1a6ba5d Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 17 Feb 2018 10:07:28 +0900 Subject: [PATCH 9/9] Fix CHANGES for PR #4627 --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b41da6445..afb8cbbbe 100644 --- a/CHANGES +++ b/CHANGES @@ -20,7 +20,7 @@ Bugs fixed * #4260: autodoc: keyword only argument separator is not disappeared if it is appeared at top of the argument list * #4622: epub: :confval:`epub_scheme` does not effect to content.opf - +* #4627: graphviz: Fit graphviz images to page Testing --------