Skip to content

Commit

Permalink
Deleted duplicated tabular tools (PolusAI#551)
Browse files Browse the repository at this point in the history
* chore: deleting duplicate clustering tools

* chore: deleted csv stats plugin

* chore: deleted duplicated formats tools

* chore: deleted duplicate transforms tools

* chore: deleted duplicated visualization tool

* chore: deleted duplicated util tool

* ci: ignoring files that were deleted

* ci: ignoring tests if not tools were updated

* ci: fixing early exit in package filter
  • Loading branch information
nishaq503 authored and hamshkhawar committed Aug 15, 2024
1 parent 0518ee3 commit 1d0e69c
Show file tree
Hide file tree
Showing 152 changed files with 50 additions and 10,860 deletions.
69 changes: 47 additions & 22 deletions .github/workflows/package-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
list:
description: "The list of directories containing the updated packages"
value: ${{ jobs.package-filter.outputs.list }}
num_packages:
description: "The number of updated packages"
value: ${{ jobs.package-filter.outputs.num_packages }}

permissions:
contents: read
Expand All @@ -31,6 +34,7 @@ jobs:
outputs:
matrix: ${{ steps.package-filter.outputs.matrix }}
list: ${{ steps.package-filter.outputs.list }}
num_packages: ${{ steps.package-filter.outputs.num_packages }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -41,6 +45,7 @@ jobs:
- name: Find Updated Packages
id: package-filter
run: |
NUM_PACKAGES=0
PACKAGE_DIRS=""
COMPANION_FILES="VERSION .bumpversion.cfg"
Expand All @@ -63,7 +68,17 @@ jobs:
echo "The comparison point is ${comparison_point}"
# Get the changed files
changed_files=$(git diff --name-only ${comparison_point}...)
# the `--diff-filter=ACMR` flag filters out deleted files. The filters are as follows:
# A: Added
# C: Copied
# M: Modified
# R: Renamed
# D: Deleted
# T: Type changed (for example, regular file or symlink or submodule)
# U: Unmerged
# X: Unknown
# B: Broken pairing
changed_files=$(git diff --diff-filter=ACMR --name-only ${comparison_point}...)
# echo the changed files
echo "The changed files are $changed_files"
Expand Down Expand Up @@ -113,6 +128,7 @@ jobs:
fi
fi
NUM_PACKAGES=$((NUM_PACKAGES+1))
PACKAGE_DIRS="$PACKAGE_DIRS ${pkg_dir}"
fi
done
Expand All @@ -124,29 +140,38 @@ jobs:
echo "The updated packages are $PACKAGE_DIRS"
if [ -z "$PACKAGE_DIRS" ]
then
echo "::error::No updated packages were found" && exit 1
fi
echo "::warning::No updated packages were found"
# Convert the package directories to JSON for the output matrix
JSON="{\"include\": ["
for package_dir in $PACKAGE_DIRS
do
package_name=$(basename $package_dir)
JSON_LINE="{\"package_dir\": \"${package_dir}\", \"package_name\": \"${package_name}\"},"
# Add the JSON line to the JSON string if it is not already included
if [ ! "$JSON" == *"$JSON_LINE"* ]
echo "matrix={\"include\": []}" >> $GITHUB_OUTPUT
echo "list=" >> $GITHUB_OUTPUT
echo "num_packages=0" >> $GITHUB_OUTPUT
else
echo "The number of updated packages is $NUM_PACKAGES"
# Convert the package directories to JSON for the output matrix
JSON="{\"include\": ["
for package_dir in $PACKAGE_DIRS
do
package_name=$(basename $package_dir)
JSON_LINE="{\"package_dir\": \"${package_dir}\", \"package_name\": \"${package_name}\"},"
# Add the JSON line to the JSON string if it is not already included
if [ ! "$JSON" == *"$JSON_LINE"* ]
then
JSON="$JSON$JSON_LINE"
fi
done
# Remove trailing comma and add closing brackets
if [ "$JSON" == *"," ]
then
JSON="$JSON$JSON_LINE"
JSON="${JSON%?}"
fi
done
JSON="$JSON]}"
# Remove trailing comma and add closing brackets
if [ "$JSON" == *"," ]
then
JSON="${JSON%?}"
fi
JSON="$JSON]}"
# Set the output
echo "matrix=$( echo "$JSON" )" >> $GITHUB_OUTPUT
echo "list=$( echo "$PACKAGE_DIRS" )" >> $GITHUB_OUTPUT
echo "num_packages=$NUM_PACKAGES" >> $GITHUB_OUTPUT
# Set the output
echo "matrix=$( echo "$JSON" )" >> $GITHUB_OUTPUT
echo "list=$( echo "$PACKAGE_DIRS" )" >> $GITHUB_OUTPUT
fi
3 changes: 3 additions & 0 deletions .github/workflows/package-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
pre-commit:
name: Pre-commit | ${{ matrix.package_name }}
needs: package-filter
if: ${{ needs.package-filter.outputs.num_packages > 0 }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.package-filter.outputs.matrix) }}
Expand Down Expand Up @@ -56,6 +57,7 @@ jobs:
docker:
name: Docker | Build ${{ matrix.package_name }}
needs: package-filter
if: ${{ needs.package-filter.outputs.num_packages > 0 }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.package-filter.outputs.matrix) }}
Expand Down Expand Up @@ -106,6 +108,7 @@ jobs:
tests:
name: Test | ${{ matrix.package_name }}
needs: package-filter
if: ${{ needs.package-filter.outputs.num_packages > 0 }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.package-filter.outputs.matrix) }}
Expand Down
30 changes: 0 additions & 30 deletions clustering/K-NN/Distributed-Memory/Dockerfile-Distributed

This file was deleted.

Loading

0 comments on commit 1d0e69c

Please sign in to comment.