Skip to content

Commit 0f03d50

Browse files
committed
pre-commit
1 parent 61a3023 commit 0f03d50

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

_config.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ sphinx:
2121
html_show_copyright: false
2222
nb_execution_raise_on_error: true # raise error if a notebook cell fails to execute
2323
nb_execution_timeout: 600 # max time [s] to wait for a cell to execute; raises error if exceeded
24-
html_theme_options:
24+
html_theme_options:
2525
use_repository_button: true
2626
use_issues_button: true
27-
use_edit_page_button: true
28-
home_page_in_navbar: true
27+
use_edit_page_button: true
28+
home_page_in_navbar: true
2929
analytics:
30-
google_analytics_id: "G-ZBXC3EFGGJ"
31-
launch_buttons:
30+
google_analytics_id: "G-ZBXC3EFGGJ"
31+
launch_buttons:
3232
notebook_interface: jupyterlab
3333
thebe: true
34-
repository_url:
35-
repository_branch: main
34+
repository_url:
35+
repository_branch: main
3636
logo:
3737
link: "https://learn.astropy.org"
38-
alt_text: "Learn Astropy"
38+
alt_text: "Learn Astropy"

scripts/execute-convert.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def run_command(command, verbose=1):
1717
print(f"Output: {result.stdout}")
1818
return result
1919

20+
2021
notebooks = glob.glob("*.ipynb")
2122
if len(notebooks) > 1:
2223
print("More than one .ipynb notebook found --> assuming this is a book")
@@ -28,7 +29,7 @@ def run_command(command, verbose=1):
2829
# copy build outputs to 'html' dir
2930
command = ["cp", "-r", "_build/html", "html"]
3031
run_command(command)
31-
32+
3233
else:
3334
# build single notebook
3435
command = ["jb", "build", f"{slug}.ipynb", "--config", "_config.yml"]

scripts/pre-process.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
cfg["title"] = meta["title"]
1414
cfg["author"] = authors
1515
# cfg["repository"]["url"] = f"https://github.com/astropy-learn/{meta['source']}"
16-
cfg["sphinx"]["config"]["html_theme_options"]["repository_url"] = f"https://github.com/astropy-learn/{meta['source']}"
16+
cfg["sphinx"]["config"]["html_theme_options"]["repository_url"] = (
17+
f"https://github.com/astropy-learn/{meta['source']}"
18+
)
1719

1820
# add a button to launch notebook on Binder
1921
# cfg["launch_buttons"]["binderhub_url"] = (

0 commit comments

Comments
 (0)