Skip to content

Commit

Permalink
Including flake8 results
Browse files Browse the repository at this point in the history
Signed-off-by: Julio Faracco <[email protected]>
  • Loading branch information
jcfaracco committed Mar 12, 2024
1 parent 654150e commit 2ec6cd3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ jobs:
- name: Install dependencies
run: |
pip install isort flake8 interrogate
echo "## CI/CD Summary :rocket:\n--------------\n\n" >> $GITHUB_STEP_SUMMARY
echo "## CI/CD Summary :rocket:" >> $GITHUB_STEP_SUMMARY
echo "-------------------------" >> $GITHUB_STEP_SUMMARY
- name: Check imports with isort
run: |
# Show the diffs for debugging
isort -c dasf/
if [[ $? -ne 0 ]] ; then
echo "* isort results:\n\n```diff\n" >> $GITHUB_STEP_SUMMARY
echo "* **isort results:**" >> $GITHUB_STEP_SUMMARY
echo "```diff" >> $GITHUB_STEP_SUMMARY
isort -c --df dasf/ >> $GITHUB_STEP_SUMMARY
echo "\n```\n" >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "* isort results: :white_check_mark:\n" >> $GITHUB_STEP_SUMMARY
echo "* **isort results:** :white_check_mark:" >> $GITHUB_STEP_SUMMARY
exit 0
fi
- name: Lint with flake8
Expand All @@ -39,6 +41,16 @@ jobs:
flake8 dasf/ --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 dasf/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
if [[ $? -ne 0 ]] ; then
echo "* **flake8 results:**" >> $GITHUB_STEP_SUMMARY
echo "```python" >> $GITHUB_STEP_SUMMARY
flake8 dasf/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "* **flake8 results:** :white_check_mark:" >> $GITHUB_STEP_SUMMARY
exit 0
fi
- name: Doc lint with interrogate
run: |
# We should have at least 80% of docs covered
Expand Down
1 change: 1 addition & 0 deletions dasf/debug/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Debug:
"""
def display(self, X):
print(is_notebook())
if (is_dask_array(X) or is_dask_dataframe(X)) and is_notebook():
idisplay(iHTML(X._repr_html_()))
else:
Expand Down

0 comments on commit 2ec6cd3

Please sign in to comment.