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
f826351d
Commit
f826351d
authored
Sep 21, 2015
by
LE GAC Renaud
Browse files
Rename the method Automaton.check_collaboration to get_create_collaboration.
parent
7f717b16
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
7 deletions
+8
-7
modules/harvest_tools/articles.py
modules/harvest_tools/articles.py
+1
-1
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
+1
-1
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 @
f826351d
...
...
@@ -247,7 +247,7 @@ class Articles(Automaton):
id_publisher
=
self
.
check_publisher
(
editor
)
# check the collaboration
id_collaboration
=
self
.
check
_collaboration
(
record
.
collaboration
())
id_collaboration
=
self
.
get_create
_collaboration
(
record
.
collaboration
())
# check against already published articles or preprint
# A preprint is transform itno an article.
...
...
modules/harvest_tools/automaton.py
View file @
f826351d
...
...
@@ -334,8 +334,9 @@ class Automaton(object):
self
.
logs
[
-
1
].
idle
(
MSG_IN_DB
,
kwargs
[
"year"
])
return
(
rec_id
,
0
)
def
check_collaboration
(
self
,
value
):
"""Check that the collaboration exit in the database, create it if not.
def
get_create_collaboration
(
self
,
value
):
"""Get the database collaboration identifier.
Create it, if if does not exist.
@type value: str or None
@param value: the name of the collaboration.
...
...
modules/harvest_tools/preprints.py
View file @
f826351d
...
...
@@ -96,7 +96,7 @@ class Preprints(Automaton):
year
=
record
.
year
()
# check the collaboration
id_collaboration
=
self
.
check
_collaboration
(
record
.
collaboration
())
id_collaboration
=
self
.
get_create
_collaboration
(
record
.
collaboration
())
# check against preprint or article already published
rec_id
,
status
=
self
.
check_by_fields
(
first_author
=
first_author
,
...
...
modules/harvest_tools/proceedings.py
View file @
f826351d
...
...
@@ -98,7 +98,7 @@ class Proceedings(Automaton):
id_country
=
get_id
(
db
.
countries
,
country
=
record
.
conference_country
())
# check the collaboration
id_collaboration
=
self
.
check
_collaboration
(
record
.
collaboration
())
id_collaboration
=
self
.
get_create
_collaboration
(
record
.
collaboration
())
# check the publisher
id_publisher
=
self
.
check_publisher
(
editor
)
...
...
modules/harvest_tools/reports.py
View file @
f826351d
...
...
@@ -88,7 +88,7 @@ class Reports(Automaton):
id_status
=
get_id
(
db
.
status
,
code
=
UNKNOWN
)
# check the collaboration
id_collaboration
=
self
.
check
_collaboration
(
record
.
collaboration
())
id_collaboration
=
self
.
get_create
_collaboration
(
record
.
collaboration
())
# check against already published reports
rec_id
,
status
=
self
.
check_by_fields
(
id_categories
=
self
.
id_category
,
...
...
modules/harvest_tools/talks.py
View file @
f826351d
...
...
@@ -81,7 +81,7 @@ class Talks(Automaton):
title
=
record
.
title
()
# check the collaboration
id_collaboration
=
self
.
check
_collaboration
(
record
.
collaboration
())
id_collaboration
=
self
.
get_create
_collaboration
(
record
.
collaboration
())
# check against already published talk using fields
rec_id
,
status
=
self
.
check_by_fields
(
conference_title
=
conference_title
,
...
...
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