We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3769709 commit 8cbc503Copy full SHA for 8cbc503
scripts/format_check.sh
@@ -91,6 +91,22 @@ else
91
exit 1
92
fi
93
94
+# Check Jupyter Notebook format
95
+echo "Checking Jupyter Notebook format..."
96
+if ! command -v nbstripout &> /dev/null
97
+then
98
+ echo "nbstripout could not be found, please install it with 'pip install nbstripout'"
99
+ exit 1
100
+fi
101
+
102
+for notebook in $(find . -name "*.ipynb"); do
103
+ nbstripout --check "$notebook"
104
+ if [ $? -ne 0 ]; then
105
+ echo "Notebook $notebook is not in the correct format. Please strip output and metadata."
106
107
+ fi
108
+done
109
110
echo "Checking C++ formatting...";
111
formatting_outputs=$(find tensorflow_quantum/ -iname *.h -o -iname *.cc | xargs clang-format -style=google -output-replacements-xml);
112
CFORMATCHECK=0
0 commit comments