-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into alasql_data_type_improvement
- Loading branch information
Showing
41 changed files
with
1,137 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
grep -rn --include=\*.md "\!\[\s*\]" | # search for lines with "![]" empty alt tag, only in markdown files | ||
grep -v "ISSUE_TEMPLATE" > issues #return only lines in files that are NOT in the issue template folder | ||
#bc QA issue templates include example code block showing empty tag for illustration | ||
|
||
if [[ -s issues ]] # if file size > 0, ie there are issues with any of the markdown files | ||
then | ||
echo "File paths + lines with missing alt text" | ||
cat issues # for end user clarity on what needs to be fixed in each file -- when fails, they can go look at output to see what the issue is. | ||
false | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
awk 'BEGIN { RS = "diff --git" } # splits diff file such that each file represented in the diff is treated as an individual record. each record is processed individually with the below statements | ||
{ | ||
if (system("bash .github/scripts/is_module.sh " $1 " || bash .github/scripts/is_docs_or_macros.sh " $1 ) == 0) | ||
{ | ||
if ( $0 ~ /\/dev\/null/ ) # is this a module file being uploaded for the first time? | ||
{ | ||
version_line_index=match ($0, /\+version:[^\n]+/) # gets the starting index of where the pattern is matched, sets RSTART to that value, and RLENGTH to the length of pattern match. | ||
extracted_version_line=substr($0, RSTART, RLENGTH) # pulls out the substring that matches. | ||
system( "version_number=$(echo " extracted_version_line " | tr -d \"\\+version:\"); if [ $version_number != \"1.0.0\" ]; then echo \"New module "$1" version number needs to be 1.0.0\" >> version_issues ; fi " ) | ||
# trims the extracted version line to now just contain the version number itself. Checks if it is equal to 1.0.0, and adds message to list of issues if not. | ||
} | ||
else if ( $0 ~ /\+version:/) # is there a new version line? | ||
{ | ||
version_line_index=match ($0, /(-version:.*\+version:[^\n]+)/) # gets the starting index of where the pattern is matched, sets RSTART to that value | ||
# regex used above accounts for the fact that there may be other lines displayed in the diff in between old and new version lines | ||
extracted_version_lines=substr($0,RSTART,RLENGTH) # pulls out the substring that matches. | ||
system("bash -c '\''issue=$(grep \"[+-]version:\" <<< \""extracted_version_lines "\"| sed \"s/[+-]version://g\"| bash .github/scripts/version_values_comparison.sh); if [ -n \"$issue\" ]; then echo \""$1": $issue\" >> version_issues ; fi'\''") | ||
# removes any extra lines from diff by grepping for only lines with +/- version, then trims the line to just contain version number itself. if issue string is not null (ie, value comparison script returns issue messages), adds messages to list of issues. | ||
} | ||
else | ||
{ | ||
print $1 " does not have an updated version number" >> "version_issues" | ||
} | ||
} | ||
else | ||
{ | ||
#do nothing, as only modules need to be checked for version number incrementation. | ||
} | ||
} ' "$1" | ||
|
||
if [[ -s version_issues ]] # if file size > 0, ie there are issues with any of the modules | ||
then | ||
echo "Issues with version numbers:" | ||
cat version_issues # for end user clarity on what needs to be fixed in each module -- when fails, they can go look at output to see what the issue is. | ||
false | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
grep -q -P "(macros.*|docs)\.md$" <<< "$1" # checks for docs.md and any files matching the macro naming pattern. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
grep -q -P "([^\/]+)\/\1.md" <<< "$1" # checks for the module naming pattern. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
awk -F "." 'BEGIN {FS="\\.|\n."; RS = "\n\n" } | ||
{ | ||
if ( NF != 6 ) # if more or less than 6 fields are parsed, that means there is something wrong either with the formatting of the version numbers, or there is more than one version line being added to the module. | ||
{ | ||
print "There is something unexpected happening with the version numbers. Ensure that the current version of the file only has one version field listed in the header, and that the appropriate number structure is followed." | ||
} | ||
else | ||
{ | ||
if ( $1 == $4 ) #if old major = new major | ||
{ | ||
if ($2==$5) # if old minor = new minor | ||
{ | ||
if ( $3==$6) # old revision = new revision | ||
{ | ||
print "The version numbers are identical. Appropriately increment the number" # realistically, shouldnt ever actually happen unless the only edit is to add or remove whitespace. | ||
} | ||
else | ||
{ | ||
if ( $3+1==$6) # old revision plus one = new revision | ||
{ | ||
# do nothing | ||
} | ||
else | ||
{ | ||
print "Revision does not equal old revision plus one. Please review the versioning guidelines and update this module accordingly. " | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
if ( $2+1==$5 && $6 == 0 ) | ||
{ | ||
#do nothing | ||
} | ||
else | ||
{ | ||
print "Seems like minor was not incremented by just one, or revision was not set back to zero. Please review the versioning guidelines and update this module accordingly." | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
if ($1+1==$4 && $5 == 0 && $6 == 0) | ||
{ | ||
#do nothing | ||
} | ||
else | ||
{ | ||
print "Major either changed by something other than one, or the other numbers did not reset to zero. Please review the versioning guidelines and update this module accordingly." | ||
} | ||
} | ||
} | ||
} ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Missing alt text | ||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
check-alt-text: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check markdown for alt text presence | ||
run: bash .github/scripts/alt_text.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Check modules in PR for version incrementation | ||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
check-versions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Get git diff to feed to script | ||
run: | | ||
git fetch origin main | ||
git diff origin/main HEAD > git_diff.txt | ||
- name: check git diff | ||
run: cat git_diff.txt | ||
- name: Check version numbers | ||
run: bash .github/scripts/check_versions.sh git_diff.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.