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
4aac44ff
Commit
4aac44ff
authored
Jan 29, 2020
by
LE GAC Renaud
Browse files
Update thesis.py and recordthesis.py.
parent
58cb6d5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
modules/harvest_tools/thesis.py
modules/harvest_tools/thesis.py
+4
-2
modules/invenio_tools/recordthesis.py
modules/invenio_tools/recordthesis.py
+12
-7
No files found.
modules/harvest_tools/thesis.py
View file @
4aac44ff
...
...
@@ -10,6 +10,9 @@ from .checkandfix import CheckException
from
plugin_dbui
import
get_id
,
UNDEF_ID
T4
=
" "
*
4
class
Thesis
(
Automaton
):
"""Automaton for thesis.
...
...
@@ -30,8 +33,7 @@ class Thesis(Automaton):
if
not
Automaton
.
check_record
(
self
,
record
):
return
False
if
self
.
dbg
:
print
(
"check thesis record"
)
self
.
logger
.
debug
(
f
"
{
T4
}
check record (thesis)"
)
try
:
self
.
check
.
is_thesis
(
record
)
...
...
modules/invenio_tools/recordthesis.py
View file @
4aac44ff
...
...
@@ -36,16 +36,17 @@ class RecordThesis(RecordPubli):
# as well as those of directors. The latter have to be removed.
df
=
self
[
u
"authors"
]
query
=
df
.
relator_name
!=
THESIS_DIR
if
"relator_name"
in
df
:
df
=
df
[
df
.
relator_name
!=
THESIS_DIR
]
if
sort
:
li
=
(
df
.
loc
[
query
,
[
"last_name"
,
"fmt_name"
]]
li
=
(
df
[
[
"last_name"
,
"fmt_name"
]]
.
sort_values
(
by
=
"last_name"
)
.
fmt_name
.
tolist
())
else
:
li
=
(
df
.
loc
[
query
].
fmt_name
li
=
(
df
.
fmt_name
.
sort_index
()
.
tolist
())
...
...
@@ -93,10 +94,14 @@ class RecordThesis(RecordPubli):
# names of the director as well as the name of authors
df
=
self
[
u
"authors"
]
query
=
df
.
relator_name
==
THESIS_DIR
df
=
df
.
loc
[
query
]
if
"relator_name"
in
df
:
query
=
df
.
relator_name
==
THESIS_DIR
df
=
df
.
loc
[
query
]
return
(
sep
.
join
(
df
.
fmt_name
)
if
len
(
df
)
>
0
else
u
""
)
return
(
sep
.
join
(
df
.
fmt_name
)
if
len
(
df
)
>
0
else
u
""
)
else
:
return
""
def
these_universities
(
self
):
"""The university(ies) delivering the thesis diploma.
...
...
@@ -104,7 +109,7 @@ class RecordThesis(RecordPubli):
Returns:
unicode:
- empty when university(ies) is not defined
- several univer
i
sty are separated by ``&`` character.
- several univers
i
ty are separated by ``&`` character.
"""
return
self
.
_get
(
u
"dissertation_note"
,
u
"university"
)
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