Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 0028fb1c authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update AuthorsMixin.is_affiliation_for_all to add a threshold

parent 813338e7
......@@ -15,6 +15,8 @@ AUTHOR_FORMATS = [
"Last, First",
"Last F."]
MSG_FAUTHOR_COLLABORATION = "Reject first author is a Collaboration"
MSG_INVALID_FMT = "Invalid format for author"
MSG_NO_AUTHOR = "Reject no author(s)"
......@@ -373,7 +375,12 @@ class AuthorsMixin(object):
return True
def is_affiliation_for_all(self):
"""``True`` when affiliation are defined for all authors.
"""``True`` when affiliation are defined for almost all authors.
Very often affiliation are missing. Therefore, if the number
of affiliation is at least define for 99% of authors we
consider that the publication is OK.
......@@ -382,7 +389,9 @@ class AuthorsMixin(object):
df = self.df_authors
query = df.affiliation.isin(["", NaN])
return df.affiliation[query].size == 0
frac = df.affiliation[query].size / df.affiliation.size
return frac <= AFF_THRESHOLD
def is_authors(self):
"""``True`` when authors are defined.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment