From 7ae9de88693202c1a9d1673f0a12077a23111ea5 Mon Sep 17 00:00:00 2001 From: Ioannis Sifnaios Date: Fri, 28 Jun 2024 11:30:43 +0200 Subject: [PATCH 1/9] corrected path --- docs/sphinx/source/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 9c0d90990e..a110e341b0 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -445,8 +445,9 @@ def make_github_url(file_name): if file_name.split("/")[-1] == "index": example_file = "README.rst" else: + example_folder = file_name.split("/")[-2] example_file = file_name.split("/")[-1].replace('.rst', '.py') - target_url = URL_BASE + "docs/examples/" + example_file + target_url = URL_BASE + "docs/examples/" + example_folder + "/" + example_file # is it an API autogen page? elif "generated" in file_name: From 5f2a122e48407b010c0a2c99ced866a2fbcb894a Mon Sep 17 00:00:00 2001 From: Ioannis Sifnaios Date: Fri, 28 Jun 2024 11:34:42 +0200 Subject: [PATCH 2/9] fixed linter --- docs/sphinx/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index a110e341b0..75298629ae 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -447,7 +447,7 @@ def make_github_url(file_name): else: example_folder = file_name.split("/")[-2] example_file = file_name.split("/")[-1].replace('.rst', '.py') - target_url = URL_BASE + "docs/examples/" + example_folder + "/" + example_file + target_url = URL_BASE + "docs/examples/" + example_folder + "/" + example_file # noqa: E501 # is it an API autogen page? elif "generated" in file_name: From 3cc357d7c0be178b6e98f71a0a9ed195f9384d48 Mon Sep 17 00:00:00 2001 From: Ioannis Sifnaios Date: Mon, 1 Jul 2024 14:15:42 +0200 Subject: [PATCH 3/9] Added watsnew --- docs/sphinx/source/whatsnew/v0.11.1.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.11.1.rst b/docs/sphinx/source/whatsnew/v0.11.1.rst index aa2205bb43..6e67342e94 100644 --- a/docs/sphinx/source/whatsnew/v0.11.1.rst +++ b/docs/sphinx/source/whatsnew/v0.11.1.rst @@ -22,6 +22,7 @@ Testing Documentation ~~~~~~~~~~~~~ +* Gallery example on cell temperature calculation for floating PV. (:pull:`2110`) Requirements @@ -30,4 +31,5 @@ Requirements Contributors ~~~~~~~~~~~~ - +* Ioannis Sifnaios (:ghuser:`IoannisSifnaios`) +* :ghuser:`lmicheli` From f1a1f51673177a27dce604774b325aed41deacc0 Mon Sep 17 00:00:00 2001 From: Ioannis Sifnaios Date: Mon, 1 Jul 2024 14:17:42 +0200 Subject: [PATCH 4/9] Revert "Added watsnew" This reverts commit 3cc357d7c0be178b6e98f71a0a9ed195f9384d48. --- docs/sphinx/source/whatsnew/v0.11.1.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.11.1.rst b/docs/sphinx/source/whatsnew/v0.11.1.rst index 6e67342e94..aa2205bb43 100644 --- a/docs/sphinx/source/whatsnew/v0.11.1.rst +++ b/docs/sphinx/source/whatsnew/v0.11.1.rst @@ -22,7 +22,6 @@ Testing Documentation ~~~~~~~~~~~~~ -* Gallery example on cell temperature calculation for floating PV. (:pull:`2110`) Requirements @@ -31,5 +30,4 @@ Requirements Contributors ~~~~~~~~~~~~ -* Ioannis Sifnaios (:ghuser:`IoannisSifnaios`) -* :ghuser:`lmicheli` + From 41cc478fb4d4891879c3f2a9521ff88d621b408e Mon Sep 17 00:00:00 2001 From: Ioannis Sifnaios Date: Mon, 1 Jul 2024 17:00:31 +0200 Subject: [PATCH 5/9] Update conf.py --- docs/sphinx/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 75298629ae..be802cdbc2 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -442,10 +442,10 @@ def make_github_url(file_name): # is it a gallery page? if any(d in file_name for d in sphinx_gallery_conf['gallery_dirs']): + example_folder = file_name.split("/")[-2] if file_name.split("/")[-1] == "index": - example_file = "README.rst" + example_file = example_folder + "README.rst" else: - example_folder = file_name.split("/")[-2] example_file = file_name.split("/")[-1].replace('.rst', '.py') target_url = URL_BASE + "docs/examples/" + example_folder + "/" + example_file # noqa: E501 From a6f582cb71c2398d5ba08a47a6e5f7a25a578d34 Mon Sep 17 00:00:00 2001 From: Ioannis Sifnaios Date: Mon, 1 Jul 2024 17:17:39 +0200 Subject: [PATCH 6/9] Update conf.py --- docs/sphinx/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index be802cdbc2..2be8edd3f7 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -443,7 +443,7 @@ def make_github_url(file_name): # is it a gallery page? if any(d in file_name for d in sphinx_gallery_conf['gallery_dirs']): example_folder = file_name.split("/")[-2] - if file_name.split("/")[-1] == "index": + if file_name.split("/")[-1] == "index.rst": example_file = example_folder + "README.rst" else: example_file = file_name.split("/")[-1].replace('.rst', '.py') From 3c277f69d489e284563c537edffc73dd7548aa4a Mon Sep 17 00:00:00 2001 From: Ioannis Sifnaios Date: Mon, 1 Jul 2024 17:24:31 +0200 Subject: [PATCH 7/9] Update conf.py --- docs/sphinx/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 2be8edd3f7..d72892d13d 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -444,7 +444,7 @@ def make_github_url(file_name): if any(d in file_name for d in sphinx_gallery_conf['gallery_dirs']): example_folder = file_name.split("/")[-2] if file_name.split("/")[-1] == "index.rst": - example_file = example_folder + "README.rst" + example_file = example_folder + "/" + "README.rst" else: example_file = file_name.split("/")[-1].replace('.rst', '.py') target_url = URL_BASE + "docs/examples/" + example_folder + "/" + example_file # noqa: E501 From ccf7597ebf3ebd621cfdf3806312ed653f85c5cb Mon Sep 17 00:00:00 2001 From: Ioannis Sifnaios Date: Mon, 1 Jul 2024 17:34:59 +0200 Subject: [PATCH 8/9] Update conf.py --- docs/sphinx/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index d72892d13d..10ae9300c5 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -444,7 +444,7 @@ def make_github_url(file_name): if any(d in file_name for d in sphinx_gallery_conf['gallery_dirs']): example_folder = file_name.split("/")[-2] if file_name.split("/")[-1] == "index.rst": - example_file = example_folder + "/" + "README.rst" + example_file = "README.rst" else: example_file = file_name.split("/")[-1].replace('.rst', '.py') target_url = URL_BASE + "docs/examples/" + example_folder + "/" + example_file # noqa: E501 From 8f88eefdb171bd9847b2bb810b0d6ce8c1770f74 Mon Sep 17 00:00:00 2001 From: Ioannis Sifnaios Date: Mon, 1 Jul 2024 17:53:44 +0200 Subject: [PATCH 9/9] Update conf.py --- docs/sphinx/source/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/conf.py b/docs/sphinx/source/conf.py index 10ae9300c5..522d0f9ec4 100644 --- a/docs/sphinx/source/conf.py +++ b/docs/sphinx/source/conf.py @@ -447,7 +447,11 @@ def make_github_url(file_name): example_file = "README.rst" else: example_file = file_name.split("/")[-1].replace('.rst', '.py') - target_url = URL_BASE + "docs/examples/" + example_folder + "/" + example_file # noqa: E501 + + if example_folder == 'gallery': + target_url = URL_BASE + "docs/examples/" + example_file # noqa: E501 + else: + target_url = URL_BASE + "docs/examples/" + example_folder + "/" + example_file # noqa: E501 # is it an API autogen page? elif "generated" in file_name: