Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug #20 : adding back scripts folder #21

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions scripts/git_hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
# Call black and flake before each commit.
# The command "git commit" with no argument will trigger this script.
#
# To enable this hook, cp this file to .git/hooks/.

# If any command fails, exit immediately with that command's exit status
set -eo pipefail

# Run black against all code in the `source_code` directory
black . --check
echo "-------> Black passed!"

# Run isort against all code in the `source_code` directory
isort . -c
echo "-------> Isort passed!"

# Run flake8 against all code in the `source_code` directory
flake8 .
echo "-------> Flake8 passed!"

# Run mypy against all code in the `source_code` directory
mypy .
echo "-------> Mypy passed!"

Loading