diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000..614c3b6243 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[tool.black] +line-length = 80 + +[tool.isort] +profile = "black" +force_single_line = "False" +line_length = 80 \ No newline at end of file diff --git a/shell/format.sh b/shell/format.sh new file mode 100755 index 0000000000..36f863dbc2 --- /dev/null +++ b/shell/format.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -Eeuo pipefail + +base_dir=$(dirname $(dirname $0)) + +# TODO: @karansh1 Apply across all modules +isort --sp "${base_dir}/pyproject.toml" openfl/experimental + +black --config "${base_dir}/pyproject.toml" openfl/experimental + +flake8 --config "${base_dir}/setup.cfg" openfl/experimental \ No newline at end of file diff --git a/shell/lint.sh b/shell/lint.sh new file mode 100755 index 0000000000..16d5da0ef4 --- /dev/null +++ b/shell/lint.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -Eeuo pipefail + +base_dir=$(dirname $(dirname $0)) + +# TODO: @karansh1 Apply across all modules +isort --sp "${base_dir}/pyproject.toml" --check openfl/experimental + +black --config "${base_dir}/pyproject.toml" --check openfl/experimental + +flake8 --config "${base_dir}/setup.cfg" openfl/experimental \ No newline at end of file