check for duplicate keys in Java properties files, fix CodeMeta displayName#9176
check for duplicate keys in Java properties files, fix CodeMeta displayName#9176stevenwinship merged 16 commits intoIQSS:developfrom
Conversation
2a4636f to
446c0f2
Compare
As creating the properties files for metadata blocks is a tedious manual process, this script ensures in CI everything is present. It adds to checking for duplicates.
- Easier to run and debug as separate files - Can be used locally, too - Use GraalVM to compile native binary for accents removal with same Java code as used in application (also uses JBang as build system) - "Just" using JBang is not fast enough, JVM startup times are making it sluggish!
ac6f296 to
f4b61bf
Compare
3254f92 to
470b490
Compare
|
This PR now contains a test commit (33731ad), which needs to be reverted before merging. Here is the output of the verification job: |
|
As you can see, it already detected a missing property in CodeMeta and a typo - fixed with 1aeb665. |
This reverts commit 33731ad.
pdurbin
left a comment
There was a problem hiding this comment.
I can't run this on my Mac, but that's ok. I ran the check_duplicate_properties.sh script on Linux and it worked fine.
I didn't install jbang and Graal to run the other script. We only need these to work in CI.
Approved.
| FAIL=1 | ||
|
|
||
| echo "::group::$FILE" | ||
| for KEY in $(echo "$FILTER" | cut -d" " -f3); do |
There was a problem hiding this comment.
On Mac I get cut: stdin: Illegal byte sequence when it reaches lines like datasetfieldtype.titulo.title=T?tulo
There's a long discussion at https://stackoverflow.com/questions/19242275/re-error-illegal-byte-sequence-on-mac-os-x
I dunno, I'm ok with this only working on Linux and in our CI.
| @@ -1,5 +1,6 @@ | |||
| metadatablock.name=codeMeta20 | |||
| metadatablock.displayName=Software Metadata (CodeMeta 2.0) | |||
| metadatablock.displayName=Software Metadata (CodeMeta v2.0) | |||
There was a problem hiding this comment.
This is a good fix, making it the same as what's in scripts/api/data/metadatablocks/codemeta.tsv
|
We're having a wee problem with this script. See the Slack thread and this issue: |



What this PR does / why we need it:
Fix duplicated keys in all
*.properties. Add Github Action to check for no re-introduction of dups.Which issue(s) this PR closes:
Closes #9169
Special notes for your reviewer:
Feel free to push to this branch for fixing all of the dups in the same go. I don't mind!
Suggestions on how to test this:
Look at the PRs Action log
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope
Is there a release notes update needed for this change?:
Nope
Additional documentation:
None