Skip to content

Commit

Permalink
ci: testing docstring linter
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianmtr committed Feb 23, 2021
1 parent 499a818 commit 91e2621
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 18 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -83,10 +83,22 @@ jobs:
uses: jitterbit/get-changed-files@v1
- name: docstring check with darglint and pydocstyle
run: |
pip install darglint
pip install pydocstyle
echo checking ${{ steps.file_changes.outputs.all }}
darglint -v 2 -s sphinx ${{ steps.file_changes.outputs.all }} & pydocstyle --select=D101,D102,D103 ${{ steps.file_changes.outputs.all }}
pip install darglint==1.6.0
pip install pydocstyle==5.1.1
echo ====================================================================================
echo DOCSTRINGS LINT: checking ${{ steps.file_changes.outputs.all }}
echo ------------------------------------------------------------------------------------
arrVar=()
# we ignore tests files
for changed_file in ${{ steps.file_changes.outputs.all }}; do
echo ${changed_file}
if [[ ${changed_file}} != tests/* ]]; then
arrVar+=(${changed_file})
done
done
# required in order to get the status of all the files at once
darglint -v 2 -s sphinx "${arrVar[@]}" & pydocstyle --select=D101,D102,D103 "${arrVar[@]}"
echo ====================================================================================
prep-testbed:
runs-on: ubuntu-18.04
Expand Down
Empty file removed another.txt
Empty file.
3 changes: 0 additions & 3 deletions dummy.txt

This file was deleted.

3 changes: 3 additions & 0 deletions jina/removeem.py
@@ -0,0 +1,3 @@
def f(x):
"""sup"""
pass
1 change: 0 additions & 1 deletion jina/test.txt

This file was deleted.

7 changes: 0 additions & 7 deletions removeme.py

This file was deleted.

3 changes: 0 additions & 3 deletions removeme2.py

This file was deleted.

1 change: 1 addition & 0 deletions tests/ignoreme.py
@@ -1,3 +1,4 @@
class X:
def __init__(self, x) -> None:
"""x"""
pass

0 comments on commit 91e2621

Please sign in to comment.