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
adf646a7
Commit
adf646a7
authored
Sep 21, 2015
by
LE GAC Renaud
Browse files
Rename the method Automaton.check_publisher to get_create_publisher.
parent
f826351d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
13 deletions
+10
-13
modules/harvest_tools/articles.py
modules/harvest_tools/articles.py
+2
-4
modules/harvest_tools/automaton.py
modules/harvest_tools/automaton.py
+3
-2
modules/harvest_tools/preprints.py
modules/harvest_tools/preprints.py
+1
-1
modules/harvest_tools/proceedings.py
modules/harvest_tools/proceedings.py
+2
-4
modules/harvest_tools/reports.py
modules/harvest_tools/reports.py
+1
-1
modules/harvest_tools/talks.py
modules/harvest_tools/talks.py
+1
-1
No files found.
modules/harvest_tools/articles.py
View file @
adf646a7
...
...
@@ -243,10 +243,8 @@ class Articles(Automaton):
volume
=
record
.
paper_volume
()
year
=
record
.
paper_year
()
# check the publisher
id_publisher
=
self
.
check_publisher
(
editor
)
# check the collaboration
# get the publisher / collaboration identifier
id_publisher
=
self
.
get_create_publisher
(
editor
)
id_collaboration
=
self
.
get_create_collaboration
(
record
.
collaboration
())
# check against already published articles or preprint
...
...
modules/harvest_tools/automaton.py
View file @
adf646a7
...
...
@@ -350,8 +350,9 @@ class Automaton(object):
return
get_create_id
(
self
.
db
.
collaborations
,
collaboration
=
value
)
def
check_publisher
(
self
,
value
):
"""Check that publisher exit in the database, create it if not.
def
get_create_publisher
(
self
,
value
):
"""Get the database publisher identifier.
Create it, if it does not exit.
@type value: str or None
@param value: the abbreviation of the publisher name.
...
...
modules/harvest_tools/preprints.py
View file @
adf646a7
...
...
@@ -95,7 +95,7 @@ class Preprints(Automaton):
submitted
=
record
.
submitted
()[
0
]
year
=
record
.
year
()
#
check
the collaboration
#
get
the collaboration
identifier
id_collaboration
=
self
.
get_create_collaboration
(
record
.
collaboration
())
# check against preprint or article already published
...
...
modules/harvest_tools/proceedings.py
View file @
adf646a7
...
...
@@ -97,11 +97,9 @@ class Proceedings(Automaton):
first_author
=
record
.
first_author
()
id_country
=
get_id
(
db
.
countries
,
country
=
record
.
conference_country
())
#
check
the collaboration
#
get
the collaboration
/publisher identifier
id_collaboration
=
self
.
get_create_collaboration
(
record
.
collaboration
())
# check the publisher
id_publisher
=
self
.
check_publisher
(
editor
)
id_publisher
=
self
.
get_create_publisher
(
editor
)
# check against an already published proceeding
rec_id
,
status
=
self
.
check_by_fields
(
authors
=
authors
,
...
...
modules/harvest_tools/reports.py
View file @
adf646a7
...
...
@@ -87,7 +87,7 @@ class Reports(Automaton):
authors_institute
=
UNKNOWN
id_status
=
get_id
(
db
.
status
,
code
=
UNKNOWN
)
#
check
the collaboration
#
get
the collaboration
identifier
id_collaboration
=
self
.
get_create_collaboration
(
record
.
collaboration
())
# check against already published reports
...
...
modules/harvest_tools/talks.py
View file @
adf646a7
...
...
@@ -80,7 +80,7 @@ class Talks(Automaton):
submitted
=
record
.
submitted
()[
0
]
title
=
record
.
title
()
#
check
the collaboration
#
get
the collaboration
identifier
id_collaboration
=
self
.
get_create_collaboration
(
record
.
collaboration
())
# check against already published talk using fields
...
...
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