-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from HSF/flin
Reformat code with autopep8 and black
- Loading branch information
Showing
238 changed files
with
11,658 additions
and
12,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/mirrors-autopep8 | ||
rev: v2.0.4 | ||
hooks: | ||
- id: autopep8 | ||
# args: ["--global-config", "package/pyproject.toml"] | ||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 | ||
hooks: | ||
- id: black | ||
# args: ["--config", "package/pyproject.toml"] | ||
# exclude python 2 code which cannot be dealt with black | ||
exclude: | | ||
(?x)( | ||
^pandaharvester/harvestermonitor/arc_monitor.py| | ||
^pandaharvester/harvestermisc/arc_utils.py| | ||
^pandaharvester/harvesterpayload/simple_wrapper_mpi.py| | ||
^pandaharvester/harvestersubmitter/apfgrid_submitter.py| | ||
^pandaharvester/harvestertest/dumpTable.py| | ||
^pandaharvester/harvestertest/getQueuedata.py| | ||
^pandaharvester/harvestermessenger/arc_messenger.py| | ||
^pandaharvester/harvestersubmitter/arc_submitter.py| | ||
^pandaharvester/harvestertest/stageOutTest_globus.py| | ||
^pandaharvester/harvestertest/stageInTest_go_bulk_preparator.py| | ||
^pandaharvester/harvesterpayload/ATLAS_simple_wrapper_mpi.py| | ||
^pandaharvester/harvestercloud/google_startup_script.py| | ||
^& | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
DATE=`date -u '+%d-%m-%Y %H:%M:%S'` | ||
NAME=`git config --global user.name` | ||
BRANCH=`git rev-parse --abbrev-ref HEAD` | ||
FILE=pandaharvester/commit_timestamp.py | ||
echo timestamp = \"$DATE on $BRANCH \(by $NAME\)\" > $FILE | ||
git add $FILE | ||
exit 0 | ||
basedir="$(dirname $0)/pre-commit.d" | ||
|
||
for hook in $(ls -1 $basedir); do | ||
bash $basedir/$hook | ||
RESULT=$? | ||
if [ $RESULT != 0 ]; then | ||
echo "$hook returned non-zero: $RESULT, abort commit" | ||
exit $RESULT | ||
fi | ||
done | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
# start templated | ||
INSTALL_PYTHON=/usr/bin/python3 | ||
ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=pre-commit) | ||
# end templated | ||
|
||
HERE="$(cd "$(dirname "$0")" && pwd)" | ||
ARGS+=(--hook-dir "$HERE" -- "$@") | ||
|
||
if [ -x "$INSTALL_PYTHON" ]; then | ||
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}" | ||
elif command -v pre-commit > /dev/null; then | ||
exec pre-commit "${ARGS[@]}" | ||
else | ||
echo '`pre-commit` not found. Skipped...' 1>&2 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
DATE=`date -u '+%d-%m-%Y %H:%M:%S'` | ||
NAME=`git config --global user.name` | ||
BRANCH=`git rev-parse --abbrev-ref HEAD` | ||
FILE=pandaharvester/commit_timestamp.py | ||
echo timestamp = \"$DATE on $BRANCH \(by $NAME\)\" > $FILE | ||
git add $FILE | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
timestamp = "18-07-2023 14:53:35 on flin (by mightqxc)" | ||
timestamp = "29-09-2023 13:31:07 on flin (by mightqxc)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.