-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 10517-dataset-types #10517
- Loading branch information
Showing
17 changed files
with
261 additions
and
52 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,32 @@ | ||
name: "Properties Check" | ||
on: | ||
pull_request: | ||
paths: | ||
- "src/**/*.properties" | ||
- "scripts/api/data/metadatablocks/*" | ||
jobs: | ||
duplicate_keys: | ||
name: Duplicate Keys | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run duplicates detection script | ||
shell: bash | ||
run: tests/check_duplicate_properties.sh | ||
|
||
metadata_blocks_properties: | ||
name: Metadata Blocks Properties | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup GraalVM + Native Image | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
java-version: '21' | ||
distribution: 'graalvm-community' | ||
- name: Setup JBang | ||
uses: jbangdev/setup-jbang@main | ||
- name: Run metadata block properties verification script | ||
shell: bash | ||
run: tests/verify_mdb_properties.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,3 @@ | ||
### Counter Processor 1.05 Support | ||
|
||
This release includes support for counter-processor-1.05 for processing Make Data Count metrics. If you are running Make Data Counts support, you should reinstall/reconfigure counter-processor as described in the latest Guides. (For existing installations, note that counter-processor-1.05 requires a Python3, so you will need to follow the full counter-processor install. Also note that if you configure the new version the same way, it will reprocess the days in the current month when it is first run. This is normal and will not affect the metrics in Dataverse.) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# This script will check Java *.properties files within the src dir for duplicates | ||
# and print logs with file annotations about it. | ||
|
||
set -euo pipefail | ||
|
||
FAIL=0 | ||
|
||
while IFS= read -r -d '' FILE; do | ||
|
||
# Scan the whole file for duplicates | ||
FILTER=$(grep -a -v -E "^(#.*|\s*$)" "$FILE" | cut -d"=" -f1 | sort | uniq -c | tr -s " " | { grep -vs "^ 1 " || true; }) | ||
|
||
# If there are any duplicates present, analyse further to point people to the source | ||
if [ -n "$FILTER" ]; then | ||
FAIL=1 | ||
|
||
echo "::group::$FILE" | ||
for KEY in $(echo "$FILTER" | cut -d" " -f3); do | ||
# Find duplicate lines' numbers by grepping for the KEY and cutting the number from the output | ||
DUPLICATE_LINES=$(grep -n -E -e "^$KEY=" "$FILE" | cut -d":" -f1) | ||
# Join the found line numbers for better error log | ||
DUPLICATE_NUMBERS=$(echo "$DUPLICATE_LINES" | paste -sd ',') | ||
|
||
# This form will make Github annotate the lines in the PR that changes the properties file | ||
for LINE_NUMBER in $DUPLICATE_LINES; do | ||
echo "::error file=$FILE,line=$LINE_NUMBER::Found duplicate for key '$KEY' in lines $DUPLICATE_NUMBERS" | ||
done | ||
done | ||
echo "::endgroup::" | ||
fi | ||
done < <( find "$(git rev-parse --show-toplevel)" -wholename "*/src/*.properties" -print0 ) | ||
|
||
if [ "$FAIL" -eq 1 ]; then | ||
exit 1 | ||
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
Oops, something went wrong.