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

Pivotal ID # 187133668: DOI Last Name #832

Merged
merged 4 commits into from
May 15, 2024

Conversation

jhoanmanuelms
Copy link
Contributor

Register the DOI without contributors when the authors name is not complete

Register the DOI without contributors when the authors name is not complete
@jhoanmanuelms jhoanmanuelms self-assigned this May 1, 2024
@jhoanmanuelms jhoanmanuelms requested a review from Juan-EBI May 1, 2024 10:15
Copy link
Contributor

@Juan-EBI Juan-EBI left a comment

Choose a reason for hiding this comment

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

LGTM please consider minor comments

private fun getContributors(submission: Submission): List<Contributor> {
fun isNameValid(author: Section): Boolean {
val name = author.findAttr(NAME_ATTR)
return name.isNotBlank() && name!!.contains(" ")
Copy link
Contributor

Choose a reason for hiding this comment

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

white spaes are part of blank definition so I think that is not neded.

public actual fun CharSequence.isBlank(): Boolean = length == 0 || indices.all { this[it].isWhitespace() }

val contributors =
submission
.allSections()
.filter { it.type.lowercase() == AUTHOR_TYPE.lowercase() }
Copy link
Contributor

Choose a reason for hiding this comment

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

what about it.type.equals(AUTHOR_TYPE, ignoreCase = true)

@jhoanmanuelms jhoanmanuelms merged commit de9df32 into master May 15, 2024
1 check passed
@jhoanmanuelms jhoanmanuelms deleted the bugfix/pivotal-#187133668-doi-last-name branch May 15, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants