Skip to content

Commit

Permalink
Add runner scripts for development tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ChisSoc authored and ChisSoc committed Oct 12, 2021
1 parent 731f3e9 commit 8e9e925
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
13 changes: 13 additions & 0 deletions run_flake8.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# Runner script for flak8 to ensure
# - correct config file
# - independent from working directory

# Change working directory to location of script
SOURCE=${BASH_SOURCE[0]}
SCRIPT_DIR="$(dirname "$SOURCE")"
cd "$SCRIPT_DIR" || (echo "Could not change to top-level project directory" && exit 1)

# Run flake8
flake8 --config .flake8 "$@"
13 changes: 13 additions & 0 deletions run_pytest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

# Runner script for pytest to ensure
# - correct config file
# - independent from working directory

# Change working directory to location of script
SOURCE=${BASH_SOURCE[0]}
SCRIPT_DIR="$(dirname "$SOURCE")"
cd "$SCRIPT_DIR" || (echo "Could not change to top-level project directory" && exit 1)

# Run pytest
pytest -c pytest.ini
14 changes: 14 additions & 0 deletions run_sphinx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

# Runner script for sphinx documentation build
# Usage:
# (a) run_sphinx.sh for incremental build
# (b) run_sphinx.sh clean for clean re-build

# Change working directory to location of script
SOURCE=${BASH_SOURCE[0]}
SCRIPT_DIR="$(dirname "$SOURCE")"
cd "$SCRIPT_DIR/docs/sphinx" || (echo "Could not change to docs directory" && exit 1)

# Run sphinx
make "$@" html

0 comments on commit 8e9e925

Please sign in to comment.