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
b9de097e
Commit
b9de097e
authored
Jan 08, 2021
by
LE GAC Renaud
Browse files
Update RecordThesis to work with attirbute df_authors
parent
c6872f3b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
modules/store_tools/recordthesis.py
modules/store_tools/recordthesis.py
+11
-11
No files found.
modules/store_tools/recordthesis.py
View file @
b9de097e
...
...
@@ -35,7 +35,7 @@ class RecordThesis(RecordPubli):
"""
# for a thesis, the authors field contains names of author
# as well as those of directors. The latter have to be removed.
df
=
self
[
u
"
authors
"
]
df
=
self
.
df_
authors
if
"relator_name"
in
df
:
df
=
df
[
df
.
relator_name
!=
THESIS_DIR
]
...
...
@@ -60,46 +60,46 @@ class RecordThesis(RecordPubli):
"""The defence date for a master/phd thesis.
Returns:
unicode
:
str
:
* The pattern is not standardise
and can varies between records and between stores.
* The filter CLEAN_THESIS_DEFENSE is applied.
"""
val
=
self
.
_get
(
u
"dissertation_note"
,
u
"defense_date"
)
val
=
self
.
_get
(
"dissertation_note"
,
"defense_date"
)
return
CLEAN_THESIS_DEFENSE
(
val
)
def
these_level
(
self
):
"""The level of the thesis.
Returns:
unicode
:
str
:
* The value is ``master`` or ``PhD``.
* The value is not standardise and can varies
between records and between stores.
* Empty string when not defined
"""
return
self
.
_get
(
u
"dissertation_note"
,
u
"diploma"
)
return
self
.
_get
(
"dissertation_note"
,
"diploma"
)
def
these_directors
(
self
,
sep
=
u
", "
):
def
these_directors
(
self
,
sep
=
", "
):
"""The list of director(s)
Returns:
unicode
:
str
:
* Names are separated by the ``sep`` argument.
* Empty string when it is not defined.
"""
# for a thesis, the author field 700 field contains
# names of the director as well as the name of authors
df
=
self
[
u
"
authors
"
]
df
=
self
.
df_
authors
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
""
)
else
:
return
""
...
...
@@ -108,9 +108,9 @@ class RecordThesis(RecordPubli):
"""The university(ies) delivering the thesis diploma.
Returns:
unicode
:
str
:
- empty when university(ies) is not defined
- several university are separated by ``&`` character.
"""
return
self
.
_get
(
u
"dissertation_note"
,
u
"university"
)
return
self
.
_get
(
"dissertation_note"
,
"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