-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check for duplicate keys in Java properties files, fix CodeMeta displayName #9176
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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