File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -7,20 +7,25 @@ notebook_files=()
77all_markdown_files=$( find tutorials -type f -name " *.md" )
88
99if [ $# -gt 0 ]; then
10- if [[ " $1 " == all ]]; then
11- files_to_process=$all_markdown_files
10+ echo " INFO: Testing only a subset of notebooks"
11+ if [[ " $1 " == --changed ]]; then
12+ # We only want to run tests for the notebooks we touched compared to `branch`
13+ # provided in the second argument.
14+ branch=$2
15+ files_to_process=$( git fetch ${branch} --depth=1; git diff ${branch} --name-only tutorials | grep .md)
16+
1217 else
1318 files_to_process=" $@ "
1419 fi
1520
1621else
17- # We only want to run tests for the notebooks we touched
18- files_to_process=$( git fetch origin main --depth=1; git diff origin/main --name-only tutorials | grep .md)
22+ echo " INFO: Testing all the notebooks"
23+ files_to_process=$all_markdown_files
24+
1925fi
2026
2127# Identify Markdown files that are Jupytext and convert them all.
2228for file in ${files_to_process} ; do
23- echo loop in $file
2429 # Extract the kernel information from the Jupytext Markdown file.
2530 kernel_info=$( grep -A 10 ' ^---$' " $file " | grep -E ' kernelspec' )
2631 # Skip if no kernel information was found.
You can’t perform that action at this time.
0 commit comments