-
Notifications
You must be signed in to change notification settings - Fork 502
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
Duplicate property key in Bundle.properties file V5.12.1 #9169
Comments
@stevenferey thanks! Yes, confirmed in the develop branch as of 26afd10
Interestingly, both lines are from the same commit (98acdca):
|
FWIW dataverse/src/main/java/propertyFiles/Bundle.properties Lines 2222 to 2225 in 26afd10
|
Looks like in the pull request for improving the tooltips in the Citation metadata block, I left both lines there? Sorry about that. About the duplicate advanced.search.datasets.persistentId.tip lines, the second one on line 937 was the one we decided to use, but since later changes to Dataverse facilitate the use of PIDs other than DOIs and Handles, I think we should avoid mentioning specific PIDs, and something like the first one on line 935 would be better. Should I create a PR so that only one advanced.search.datasets.persistentId.tip exists? I don't understand how those ingest.csv... lines are mismatches, but I'm happy to help with that, too if you could write more about it @qqmyers. Or if I create a PR, could you fix that duplicate issue? |
They are copies of dataverse/src/main/java/propertyFiles/Bundle.properties Lines 2116 to 2119 in 26afd10
|
Ah, thanks! I'll wait for this to be prioritized before creating a PR that removes from the Bundle.properties file:
|
Should we add an action that runs a duplicate detection check on the properties files when they are changed? |
I played with a little shell script (on Linux - no idea if this works on non-GNU MacOS, but it would in a Github Action): for PF in $(find . -wholename '*/src/*.properties'); do
FILTER=$(grep -a -v -E "^(#.*|\s*$)" "$PF" | cut -d"=" -f1 | sort | uniq -c | tr -s " " | grep -v "^ 1 ")
if [ -n "$FILTER" ]; then
echo "$PF"
echo "$FILTER"
echo ""
fi
done And it shows we have more problems with duplicates:
It would be very easy to put this into an Action which runs on PRs that change properties files: FAIL=0
for PF in $(find . -wholename '*/src/*.properties'); do
FILTER=$(grep -a -v -E "^(#.*|\s*$)" "$PF" | cut -d"=" -f1 | sort | uniq -c | tr -s " " | grep -v "^ 1 ")
if [ -n "$FILTER" ]; then
echo "$PF"
echo "$FILTER"
echo ""
FAIL=1
fi
done
if [ "$FAIL" -eq 1 ]; then
echo "Duplicate keys found, please check output."
exit 1
fi |
Just because I was feeling like it, I went ahead and created #9176 Some fun leisure time hacking! |
Hello, Can we follow the result of the execution of the git workflow in order to propose a PR and remove key duplications? Thank you so much, |
@stevenferey I may be misunderstanding but if you go to https://github.com/IQSS/dataverse/pull/9176/files you can see the reports of the duplicates (at the bottom). (Good work, @poikilotherm!) Here's a screenshot: |
Just noting a comment I updated last week about one of the duplicate keys:
It looks like the PR keeps the other key instead, the one with the value "The Dataset's unique persistent identifier, either a DOI or Handle". I think this is okay for now. I've been hoping to continue improving and applying the metadata text guide, and the tooltip for persistentId field can be reviewed and improved then. |
Thanks for your feedback, I modified this key to insert the first proposal. Steven. |
Yes it is. I also propose to modify this label to align the two keys:
I note that this formulation is also present for the keys:
do you want me to change these keys? |
I'm not sure if this should be changed in the PR for this issue. It feels like scope creep to me, if that makes sense. Do you know if your PR is for the next Dataverse release, 5.14? I'm wondering if there would be time to create a new issue to make sure these tooltips are consistent and create a new PR for that issue. |
I was talking @scolapasta and it sounds like this PR was not planned to be in the next Dataverse release (v5.14). We're thinking it would be better to leave the tooltip for the persistent ID field on the advanced search page as it is in 5.13, so it reads "The Dataset's unique persistent identifier, either a DOI or Handle" and leave the other tooltips that you found so far as they are. Then @scolapasta wrote that this PR could go into QA, although it may not be included in 5.14. And then I'd open a separate GitHub issue about improving these tooltips and include the ones you listed. That way we can maintain the scope of this issue and PR and make sure we're not missing anything else when changing those other tooltips. Does that sound okay? If so, could you change dataset.metadata.persistentId.tip back to "The Dataset's unique persistent identifier, either a DOI or Handle"? |
Thank you for your reply, Absolutely, so I modify the key to display the initial value. Steven. |
Awesome! And thanks for spotting those other tooltips! |
…ayName (#9176) * ci: add workflow to check for duplicate keys in Java properties files #9169 * ci: add metadata blocks properties file check 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. * feat,ci: move check scripts to separate files - 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! * fix,ci: remove shellspec tests on CentOS 7 as it is EOL * test: add a stupid change to test checks run and find problems * ci: fix JBang setup in properties check * fix: make properties check script dir-safe * fix: escape square brackets in pattern * refactor: move CV mangling (lowercase, spaces) to Java * fix(metadata): typo and missing property for CodeMeta * Revert "test: add a stupid change to test checks run and find problems" This reverts commit 33731ad. * file for QA only. DO NOT CHECK IN * file for QA only. DO NOT CHECK IN * file for QA only. DO NOT CHECK IN * Removing QA test files. Safe to merge --------- Co-authored-by: Philip Durbin <[email protected]> Co-authored-by: Steven Winship <[email protected]>
Hi Dataverse Community,
We detected a duplicate keys in the Bundle.properties file :
advanced.search.datasets.persistentId.tip=The persistent identifier for the Dataset.
advanced.search.datasets.persistentId.tip=The Dataset's unique persistent identifier, either a DOI or Handle
best regards
Steven Ferey.
The text was updated successfully, but these errors were encountered: