From ee29d575276fba195ac4e8f83548acbd2a8646f9 Mon Sep 17 00:00:00 2001 From: Frank Schneider Date: Fri, 21 Jan 2022 15:37:48 +0100 Subject: [PATCH] Add yapf --- .github/workflows/linting.yml | 18 +++++++++++++++++- setup.cfg | 21 +++++++++++++-------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 0553237e7..0ee0dd076 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -33,4 +33,20 @@ jobs: pip install isort - name: Run isort run: | - isort . --check \ No newline at end of file + isort . --check + + yapf: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Install yapf + run: | + python -m pip install --upgrade pip + pip install yapf + - name: Run yapf + run: | + yapf . --diff --recursive \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index af2f038c4..9c18152bb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,11 +33,11 @@ setup_requires = # Dependencies of the project: install_requires = absl-py==0.14.0 - numpy>=1.19.2 - pandas>=1.3.1 -# ctcdecode>=1.0.3 + # ctcdecode>=1.0.3 levenshtein>=0.12.0 librosa>=0.8.1 + numpy>=1.19.2 + pandas>=1.3.1 six>=1.15.0 python_requires = >=3.7 @@ -50,14 +50,15 @@ python_requires = >=3.7 dev = isort pylint + yapf # JAX Core jax_core_deps = - jax==0.2.17 flax==0.3.5 + jax==0.2.17 optax==0.0.9 - tensorflow_datasets==4.4.0 tensorflow-cpu==2.5.0 + tensorflow_datasets==4.4.0 # JAX CPU jax_cpu = @@ -74,15 +75,19 @@ pytorch = torch==1.9.1+cu111 torchvision==0.10.1+cu111 -# Linting configuration +# Linting configuration # -# isort configuration +# yapf configuration +[yapf] +based_on_style = google +column_limit = 80 +indent_width = 2 +# isort configuration [isort] profile=google # pylint configuration - [pylint.MASTER] # Pickle collected data for later comparisons.