Skip to content

Commit

Permalink
updated pr.yaml and import order
Browse files Browse the repository at this point in the history
1 for pr.yaml: commend checking file-size for now
2. import order again
  • Loading branch information
qchiujunhao committed Jul 16, 2024
1 parent ebfd3df commit 35a79da
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,32 +181,32 @@ jobs:
name: 'Python linting output'
path: pylint_report.txt

file_sizes:
name: Check file sizes
needs: setup
if: ${{ github.event_name == 'pull_request' && needs.setup.outputs.repository-list != '' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check file sizes
run: |
touch file_size_report.txt
git diff --diff-filter=d --name-only ${{ needs.setup.outputs.commit-range }} > git.diff
while read line; do
find "$line" -type f -size +${{ env.MAX_FILE_SIZE }} >> file_size_report.txt
done < git.diff
if [[ -s file_size_report.txt ]]; then
echo "Files larger than ${{ env.MAX_FILE_SIZE }} found"
cat file_size_report.txt
exit 1
fi
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: 'File size report'
path: file_size_report.txt
# file_sizes:
# name: Check file sizes
# needs: setup
# if: ${{ github.event_name == 'pull_request' && needs.setup.outputs.repository-list != '' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Check file sizes
# run: |
# touch file_size_report.txt
# git diff --diff-filter=d --name-only ${{ needs.setup.outputs.commit-range }} > git.diff
# while read line; do
# find "$line" -type f -size +${{ env.MAX_FILE_SIZE }} >> file_size_report.txt
# done < git.diff
# if [[ -s file_size_report.txt ]]; then
# echo "Files larger than ${{ env.MAX_FILE_SIZE }} found"
# cat file_size_report.txt
# exit 1
# fi
# - uses: actions/upload-artifact@v4
# if: ${{ failure() }}
# with:
# name: 'File size report'
# path: file_size_report.txt

# Planemo test the changed repositories, each chunk creates an artifact
# containing HTML and JSON reports for the executed tests
Expand Down Expand Up @@ -383,7 +383,7 @@ jobs:

determine-success:
name: Check workflow success
needs: [setup, lint, flake8, file_sizes, combine_outputs]
needs: [setup, lint, flake8, combine_outputs]
if: ${{ always() && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
Expand All @@ -393,9 +393,9 @@ jobs:
- name: Indicate Python script lint status
if: ${{ needs.flake8.result != 'success' && needs.flake8.result != 'skipped' }}
run: exit 1
- name: Indicate file size check status
if: ${{ needs.file_sizes.result != 'success' && needs.file_sizes.result != 'skipped' }}
run: exit 1
# - name: Indicate file size check status
# if: ${{ needs.file_sizes.result != 'success' && needs.file_sizes.result != 'skipped' }}
# run: exit 1
- name: Check tool test status
if: ${{ needs.combine_outputs.result != 'success' && needs.combine_outputs.result != 'skipped' }}
run: exit 1
Expand Down
4 changes: 2 additions & 2 deletions tools/pycaret_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from base_model_trainer import BaseModelTrainer

from pycaret.classification import ClassificationExperiment

from dashboard import generate_classifier_explainer_dashboard

from pycaret.classification import ClassificationExperiment

LOG = logging.getLogger(__name__)


Expand Down
4 changes: 2 additions & 2 deletions tools/pycaret_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from base_model_trainer import BaseModelTrainer

from pycaret.regression import RegressionExperiment

from dashboard import generate_regression_explainer_dashboard

from pycaret.regression import RegressionExperiment

LOG = logging.getLogger(__name__)


Expand Down

0 comments on commit 35a79da

Please sign in to comment.