Skip to content

Commit f8c9047

Browse files
authored
Apply suggestions from code review
1 parent d4f28c7 commit f8c9047

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.jenkins/insert_last_verified.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66

77
from bs4 import BeautifulSoup
88

9-
build_dir = sys.argv[1]
10-
print(f"Build directory: {build_dir}")
119

1210
json_file_path = "tutorials-review-data.json"
13-
#build_dir = "_build/html" # for testing after _build/html is created
1411

1512
# paths to skip from the post-processing script
1613
paths_to_skip = [
@@ -143,18 +140,19 @@ def process_json_file(json_file_path):
143140
print(f"Warning: <h1> tag not found in {html_file_path}")
144141

145142

146-
process_json_file(json_file_path)
147-
print(
148-
f"Finished processing JSON file. Please check the output for any warnings. "
149-
"Pages like `nlp/index.html` are generated only during the full `make docs` "
150-
"or `make html` build. Warnings about these files when you run `make html-noplot` "
151-
"can be ignored."
152-
)
153-
154143
def main():
155144
if len(sys.argv) < 2:
156145
print("Error: Build directory not provided. Exiting.")
157146
exit(1)
147+
build_dir = sys.argv[1]
148+
print(f"Build directory: {build_dir}")
149+
process_json_file(json_file_path)
150+
print(
151+
"Finished processing JSON file. Please check the output for any warnings. "
152+
"Pages like `nlp/index.html` are generated only during the full `make docs` "
153+
"or `make html` build. Warnings about these files when you run `make html-noplot` "
154+
"can be ignored."
155+
)
158156

159157
if __name__ == "__main__":
160158
main()

0 commit comments

Comments
 (0)