Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institut für Informatik
dbis
dbis-teaching
data-engineering-analytics-notebooks
Commits
7456a7ba
Commit
7456a7ba
authored
Oct 21, 2021
by
Eva Zangerle
Browse files
improved shell script reg. usability
parent
0f7bbccc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
perform_notebook_qa.sh
perform_notebook_qa.sh
+26
-5
No files found.
perform_notebook_qa.sh
View file @
7456a7ba
cd
notebooks
#!/bin/bash
py.test
--nbval
$1
nbqa isort
$1
# script takes a Jupyter Notebook as argument and calls
nbqa black
--line-length
=
79
$1
# validation and static code analysis tools for this notebook
nbqa flake8
$1
# usage help
usage
()
{
echo
"Usage:
$0
NOTEBOOK_TO_CHECK.ipynb"
1>&2
}
# call tools for given notebook
perform_qa
()
{
py.test
--nbval
$1
nbqa isort
$1
nbqa black
--line-length
=
79
$1
nbqa flake8
$1
}
# check if command line argument is present
if
[
"$#"
-ne
1
]
;
then
echo
"No notebook (.ipynb) was provided"
;
usage
;
exit
1
;
fi
perform_qa
$1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment