Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
70adb82b
Commit
70adb82b
authored
Jan 18, 2021
by
LE GAC Renaud
Browse files
Update automatons to improve reject messages
parent
2e0c065c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
15 deletions
+23
-15
languages/fr-fr.py
languages/fr-fr.py
+4
-0
modules/harvest_tools/articles.py
modules/harvest_tools/articles.py
+2
-3
modules/harvest_tools/base.py
modules/harvest_tools/base.py
+1
-0
modules/harvest_tools/notes.py
modules/harvest_tools/notes.py
+4
-3
modules/harvest_tools/preprints.py
modules/harvest_tools/preprints.py
+4
-3
modules/harvest_tools/proceedings.py
modules/harvest_tools/proceedings.py
+4
-3
modules/harvest_tools/thesis.py
modules/harvest_tools/thesis.py
+4
-3
No files found.
languages/fr-fr.py
View file @
70adb82b
...
...
@@ -14,6 +14,7 @@
"'et al.' in authors"
:
"'et al.' dans les authors"
,
"'last_name'"
:
"'nom de famille'"
,
"'RecordConf' object has no attribute 'country'"
:
"'RecordConf' object has no attribute 'country'"
,
"'str' object is not callable"
:
"'str' object is not callable"
,
'A report already exists with the same title'
:
'Un rapport existe deja avec le même titre'
,
'A talk/proceeding already exists with the same:'
:
'Un acte ou une présentation existe déja avec le même:'
,
'Abbreviation'
:
'Abréviation'
,
...
...
@@ -599,6 +600,9 @@
'Reject preprint is a published paper'
:
'Rejeté ce preprint est un article publié'
,
'Reject preprint is a thesis'
:
'Rejeté ce preprint est une thèse'
,
'Reject publication is a preprint'
:
'Rejeté la publication est un preprint'
,
'Reject publication is a proceeding'
:
'Rejeté la publication est un proceeding'
,
'Reject publication is not a preprint'
:
"Rejeté la publication n'est pas un preprint"
,
'Reject publication is not and article'
:
"Rejeté la publication n'est pas un article"
,
'Reject publisher is unknown.'
:
"Rejeté l'éditeur est inconnu."
,
'Reject publishers is not defined'
:
"Rejeté la revue n'est pas définie"
,
'Reject submission date is not well formed'
:
"Rejeté la date de soumission n'est pas correcte"
,
...
...
modules/harvest_tools/articles.py
View file @
70adb82b
...
...
@@ -6,13 +6,13 @@ from .base import (learn_my_authors,
MSG_CRASH
,
MSG_FIX_ORIGIN
,
MSG_IN_DB
,
MSG_IS
,
MSG_LOAD
,
T4
,
T6
)
from
plugin_dbui
import
get_id
,
UNDEF_ID
from
store_tools
import
CheckException
MSG_IS_PREPRINT
=
"Reject publication is a preprint"
MSG_NO_EDITOR
=
"Reject article is not published"
MSG_NOT_ARTICLE
=
"Reject publication is not and article"
MSG_TRANSFORM_PREPRINT
=
"Transform the preprint into an article"
...
...
@@ -58,8 +58,7 @@ class Articles(Automaton):
stype
=
record
.
subtype
()
if
stype
!=
"article"
:
msg
=
(
MSG_IS_PREPRINT
if
stype
==
"preprint"
else
MSG_NOT_ARTICLE
)
self
.
logs
[
-
1
].
reject
(
msg
,
record
)
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
return
False
try
:
...
...
modules/harvest_tools/base.py
View file @
70adb82b
...
...
@@ -6,6 +6,7 @@ DRY_RUN = "dry run"
MSG_CRASH
=
"Crash: %s"
MSG_FIX_ORIGIN
=
"Fixed the origin field"
MSG_IN_DB
=
"Already in the database"
MSG_IS
=
"Reject publication is a {}"
MSG_LOAD
=
"Load in the database"
T4
=
" "
*
4
...
...
modules/harvest_tools/notes.py
View file @
70adb82b
...
...
@@ -2,7 +2,7 @@
"""
from
.automaton
import
Automaton
from
.base
import
MSG_CRASH
,
MSG_LOAD
,
T4
from
.base
import
MSG_CRASH
,
MSG_IS
,
MSG_LOAD
,
T4
from
plugin_dbui
import
UNDEF_ID
from
store_tools
import
CheckException
...
...
@@ -35,8 +35,9 @@ class Notes(Automaton):
"""
self
.
logger
.
debug
(
f
"
{
T4
}
check and fix record (note)"
)
if
record
.
subtype
()
!=
"note"
:
self
.
logs
[
-
1
].
reject
(
MSG_NOT_NOTE
,
record
)
stype
=
record
.
subtype
()
if
stype
!=
"note"
:
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
return
False
try
:
...
...
modules/harvest_tools/preprints.py
View file @
70adb82b
...
...
@@ -2,7 +2,7 @@
"""
from
.automaton
import
Automaton
from
.base
import
MSG_CRASH
,
MSG_LOAD
,
T4
from
.base
import
MSG_CRASH
,
MSG_IS
,
MSG_LOAD
,
T4
from
plugin_dbui
import
get_id
,
UNDEF_ID
from
store_tools
import
(
CheckException
,
RecordCdsConfPaper
,
...
...
@@ -43,8 +43,9 @@ class Preprints(Automaton):
"""
self
.
logger
.
debug
(
f
"
{
T4
}
check and fix record (preprint)"
)
if
record
.
subtype
()
!=
"preprint"
:
self
.
logs
[
-
1
].
reject
(
MSG_NOT_PREPRINT
,
record
)
stype
=
record
.
subtype
()
if
stype
!=
"preprint"
:
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
return
False
if
record
.
is_published
():
...
...
modules/harvest_tools/proceedings.py
View file @
70adb82b
...
...
@@ -2,7 +2,7 @@
"""
from
.automaton
import
Automaton
from
.base
import
MSG_CRASH
,
MSG_LOAD
,
T4
from
.base
import
MSG_CRASH
,
MSG_IS
,
MSG_LOAD
,
T4
from
plugin_dbui
import
get_id
,
UNDEF_ID
from
store_tools
import
CheckException
...
...
@@ -41,8 +41,9 @@ class Proceedings(Automaton):
"""
self
.
logger
.
debug
(
f
"
{
T4
}
check and fix record (proceeding)"
)
if
record
.
subtype
()
!=
"proceeding"
:
self
.
logs
[
-
1
].
reject
(
MSG_NOT_PROCEEDING
,
record
)
stype
=
record
.
subtype
()
if
stype
!=
"proceeding"
:
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
return
False
try
:
...
...
modules/harvest_tools/thesis.py
View file @
70adb82b
...
...
@@ -4,7 +4,7 @@
import
re
from
.automaton
import
Automaton
from
.base
import
MSG_CRASH
,
MSG_LOAD
,
T4
from
.base
import
MSG_CRASH
,
MSG_IS
,
MSG_LOAD
,
T4
from
plugin_dbui
import
get_id
,
UNDEF_ID
from
store_tools
import
CheckException
...
...
@@ -31,8 +31,9 @@ class Thesis(Automaton):
"""
self
.
logger
.
debug
(
f
"
{
T4
}
check and fix record (thesis)"
)
if
record
.
subtype
()
!=
"thesis"
:
self
.
logs
[
-
1
].
reject
(
MSG_NOT_THESIS
,
record
)
stype
=
record
.
subtype
()
if
stype
!=
"thesis"
:
self
.
logs
[
-
1
].
reject
(
MSG_IS
.
format
(
stype
),
record
)
return
False
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment