Skip to content
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

Fixing: Work title "not found", "fail" etc. #426

Merged
merged 10 commits into from
Oct 11, 2024

Conversation

riedde
Copy link
Contributor

@riedde riedde commented Sep 11, 2024

Description, Context and related Issue

I introduced a function for joining strings and normalizing space because this combination is used several times and not consistent.

Refs #103 #337 #118

How Has This Been Tested?

Test have been done with the dataset of Baumann-Digital (Cantata, see https://doi.org/10.5281/zenodo.10072485) and WeGA-Klarinettenquintett. As no fail could be reproduced, the code snippets from the refered issues have been implemented and the upcoming errors have been fixed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

@riedde riedde requested a review from bwbohl September 11, 2024 08:56
@bwbohl bwbohl modified the milestone: 1.0.0 Sep 11, 2024
@bwbohl bwbohl added Type: bugfix A pull request providing a bugfix labels Sep 11, 2024
Copy link
Member

@peterstadler peterstadler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested in detail yet but only looked through the code. Except from one typo I would only complain about all the extra node selectors and would recommend to introduce yet another convenience function, i.e. a 1-arity version of eutil:joindAndNormalize following the model of string-join: https://www.w3.org/TR/xpath-functions-31/#func-string-join

add/data/xqm/util.xqm Outdated Show resolved Hide resolved
add/data/xqm/util.xqm Outdated Show resolved Hide resolved
@bwbohl
Copy link
Member

bwbohl commented Sep 26, 2024

I have not tested in detail yet but only looked through the code. Except from one typo I would only complain about all the extra node selectors and would recommend to introduce yet another convenience function, i.e. a 1-arity version of eutil:joindAndNormalize following the model of string-join: https://www.w3.org/TR/xpath-functions-31/#func-string-join

Indeed,when at it a 1-arity version would be a good idea!

@riedde
Copy link
Contributor Author

riedde commented Oct 4, 2024

I have not tested in detail yet but only looked through the code. Except from one typo I would only complain about all the extra node selectors and would recommend to introduce yet another convenience function, i.e. a 1-arity version of eutil:joindAndNormalize following the model of string-join: https://www.w3.org/TR/xpath-functions-31/#func-string-join

I did some approvements. Not tested yet, because of bad internet connection. I'll tell when this is done!

@riedde riedde self-assigned this Oct 4, 2024
@riedde
Copy link
Contributor Author

riedde commented Oct 4, 2024

Works on my machine ;-)

Copy link
Member

@peterstadler peterstadler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the 1-arity version of eutil:joinedAndNormalize#2!

It might be nitpicking but I would prefer to have an imperative function name, i.e. eutil:joinAndNormalize. While there does not seem to be guidelines concerning camelCase or hyphens (see function names eutil:sort-as-numeric-alpha and eutil:getLanguage), it seems to be consensus that the names are imperative rather than in the past tense.

@riedde
Copy link
Contributor Author

riedde commented Oct 9, 2024

@peterstadler I understand your intention and have switched the functions name.

Copy link
Member

@peterstadler peterstadler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the fixes! I have tested briefly on my machine with the WeGA Klarinettenquintett and it did not fail ;)

@peterstadler
Copy link
Member

My suggestion for merging here would be to squash and merge since that'd get rid of several unnecessary commits (including the merge from dev). But if the policy is to keep everything I'm fine with that too …

@peterstadler
Copy link
Member

I see that "squash and merge" is not enabled for this repo. That's probably on purpose?

@roewenstrunk roewenstrunk merged commit 49e4764 into develop Oct 11, 2024
1 check passed
@roewenstrunk roewenstrunk deleted the fix/337-work-title-not-found branch October 11, 2024 08:48
@bwbohl
Copy link
Member

bwbohl commented Dec 4, 2024

with this merged, can we consider the referenced issues (#103, #118, #337) closed?

@riedde
Copy link
Contributor Author

riedde commented Dec 4, 2024

I'll check that and if the issues are outdated I'll close them.

Diginaut pushed a commit to korngold-werkausgabe/Edirom-Online_EWK-WA that referenced this pull request Dec 16, 2024
* introducing function for joining strings and normalizing the output

* applying new function

* Update add/data/xqm/util.xqm

Co-authored-by: Peter Stadler <[email protected]>

* removing text selectors, reordering cases and updating xpath

* create 1-arity function

* switch to new function

* fixing typo

* switch to imperative function name

---------

Co-authored-by: Peter Stadler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bugfix A pull request providing a bugfix
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants