Skip to content

Commit

Permalink
Merge branch 'main' into add-get-address
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljanes authored Feb 24, 2025
2 parents 1f6f48c + 72aab3f commit d31b50c
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions dev/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,31 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../

echo "=== test.sh ==="


# Default value (true)
RUN_FULL_TEST=${1:true}
echo "RUN_FULL_TEST: $RUN_FULL_TEST"

echo "- Start Python checks"

echo "- clang-format: start"
clang-format --Werror --dry-run src/proto/flwr/proto/*
echo "- clang-format: done"

echo "- isort: start"
python -m isort --check-only --skip src/py/flwr/proto src/py/flwr benchmarks e2e
if $RUN_FULL_TEST; then
python -m isort --check-only --skip src/py/flwr/proto src/py/flwr benchmarks e2e
else
python -m isort --check-only --skip src/py/flwr/proto src/py/flwr
fi
echo "- isort: done"

echo "- black: start"
python -m black --exclude "src\/py\/flwr\/proto" --check src/py/flwr benchmarks examples e2e
if $RUN_FULL_TEST; then
python -m black --exclude "src\/py\/flwr\/proto" --check src/py/flwr benchmarks examples e2e
else
python -m black --exclude "src\/py\/flwr\/proto" --check src/py/flwr
fi
echo "- black: done"

echo "- init_py_check: start"
Expand Down Expand Up @@ -54,9 +67,11 @@ echo "- All Python checks passed"

echo "- Start Markdown checks"

echo "- mdformat: start"
python -m mdformat --check --number framework/docs/source examples
echo "- mdformat: done"
if $RUN_FULL_TEST; then
echo "- mdformat: start"
python -m mdformat --check --number framework/docs/source examples
echo "- mdformat: done"
fi

echo "- All Markdown checks passed"

Expand All @@ -70,17 +85,21 @@ echo "- All TOML checks passed"

echo "- Start rST checks"

echo "- docstrfmt: start"
docstrfmt --check framework/docs/source
echo "- docstrfmt: done"
if $RUN_FULL_TEST; then
echo "- docstrfmt: start"
docstrfmt --check framework/docs/source
echo "- docstrfmt: done"
fi

echo "- All rST checks passed"

echo "- Start license checks"

echo "- copyright: start"
python -m flwr_tool.check_copyright src/py/flwr
echo "- copyright: done"
if $RUN_FULL_TEST; then
echo "- copyright: start"
python -m flwr_tool.check_copyright src/py/flwr
echo "- copyright: done"
fi

echo "- licensecheck: start"
python -m licensecheck -u poetry --fail-licenses gpl --zero
Expand Down

0 comments on commit d31b50c

Please sign in to comment.