From cbd9e07c54c9fd1fd6511594474f4570cee51120 Mon Sep 17 00:00:00 2001 From: Jacob Bieker Date: Thu, 16 Sep 2021 08:15:42 -0700 Subject: [PATCH 1/3] Add Docstring linters --- .github/workflows/linters.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/linters.yaml diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml new file mode 100644 index 0000000..d19fc7b --- /dev/null +++ b/.github/workflows/linters.yaml @@ -0,0 +1,24 @@ +name: Lint Python + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pydocstyle + - name: Docstyle linting + run: | + pydocstyle --convention=google From b2068dead1b6c03e0ea03479bd92e578b5707b1d Mon Sep 17 00:00:00 2001 From: Jacob Bieker Date: Thu, 16 Sep 2021 17:18:43 +0100 Subject: [PATCH 2/3] Update linters.yaml --- .github/workflows/linters.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index d19fc7b..29115db 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -21,4 +21,4 @@ jobs: pip install pydocstyle - name: Docstyle linting run: | - pydocstyle --convention=google + pydocstyle --convention=google --add-ignore=D200,D210,D212,D415 From 196bff56980a960e594ef369b3c1a0207828d570 Mon Sep 17 00:00:00 2001 From: Jacob Bieker Date: Thu, 16 Sep 2021 17:22:52 +0100 Subject: [PATCH 3/3] Only run linter once per pull --- .github/workflows/linters.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 29115db..d966d27 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -1,13 +1,13 @@ name: Lint Python -on: [push, pull_request] +on: [push] jobs: build: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9] + python-version: [3.9] steps: - uses: actions/checkout@v2