Skip to content

Commit

Permalink
ci(check-fixtures): check also record skeletons for persistent IDs
Browse files Browse the repository at this point in the history
Check also record skeletons with respect to the record ID and the DOI
uniqueness.

Closes #3667
  • Loading branch information
tiborsimko committed Jan 10, 2025
1 parent b884ce5 commit 952b104
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ check_fixtures () {
find data/ -name "*.json" -exec jsonlint -q {} \;

# check record ID uniqueness:
dupes=$(jq '.[].recid' data/records/*.json | sort | uniq -d)
dupes=$(jq '.[].recid' data/{records,skeletons}/*.json | sort | uniq -d)
if [ "x${dupes}" != "x" ]; then
echo "[ERROR] Found duplicate record IDs:"
echo "${dupes}"
exit 1
fi

# check DOI uniqueness:
dupes=$(jq '.[].doi' data/records/*.json | sort | grep -v null | uniq -d)
dupes=$(jq '.[].doi' data/{records,skeletons}/*.json | sort | grep -v null | uniq -d)
if [ "x${dupes}" != "x" ]; then
echo "[ERROR] Found duplicate record DOIs:"
echo "${dupes}"
Expand Down

0 comments on commit 952b104

Please sign in to comment.