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
fd4bd999
Commit
fd4bd999
authored
Apr 15, 2020
by
LE GAC Renaud
Browse files
Rename InveniStore.interogate to interrogate.
parent
280a0bfe
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
16 deletions
+14
-16
controllers/wizards.py
controllers/wizards.py
+1
-3
docs/api/generated/invenio_tools.inveniostore.InvenioStore.rst
...api/generated/invenio_tools.inveniostore.InvenioStore.rst
+1
-1
docs/api/generated/inveniostore/invenio_tools.inveniostore.InvenioStore.interogate.rst
...re/invenio_tools.inveniostore.InvenioStore.interogate.rst
+0
-6
docs/api/generated/inveniostore/invenio_tools.inveniostore.InvenioStore.interrogate.rst
...e/invenio_tools.inveniostore.InvenioStore.interrogate.rst
+6
-0
modules/invenio_tools/inveniostore.py
modules/invenio_tools/inveniostore.py
+4
-4
scripts/citations.py
scripts/citations.py
+2
-2
No files found.
controllers/wizards.py
View file @
fd4bd999
...
...
@@ -4,7 +4,6 @@
import
json
import
re
from
check_tools
import
check_publication
from
gluon.storage
import
Storage
from
harvest_tools
import
DRY_RUN
...
...
@@ -18,7 +17,6 @@ from plugin_dbui import (CALLBACK_ERRORS,
Selector
,
to_fields
)
MODE_DRY_RUN
=
T
(
DRY_RUN
)
MSG_NO_AUTHORS
=
"<br><br>Removing affiliation failed.<br>"
\
"Use INSPIRES instead with the tool 'insert RECJSON'"
...
...
@@ -475,7 +473,7 @@ def update_citations():
# interrogate inspirehep.net
try
:
url
=
rex_ins
.
search
(
row
.
origin
).
group
(
1
)
rep
=
store
.
interogate
(
url
,
timeout
=
60
,
**
kwargs
)
rep
=
store
.
inter
r
ogate
(
url
,
timeout
=
60
,
**
kwargs
)
lst
=
rep
.
json
()
if
not
isinstance
(
lst
,
list
):
...
...
docs/api/generated/invenio_tools.inveniostore.InvenioStore.rst
View file @
fd4bd999
...
...
@@ -12,7 +12,7 @@ invenio_tools.inveniostore.InvenioStore
~InvenioStore.get_ids
~InvenioStore.get_record
~InvenioStore.interogate
~InvenioStore.inter
r
ogate
~InvenioStore.last_search_url
...
...
docs/api/generated/inveniostore/invenio_tools.inveniostore.InvenioStore.interogate.rst
deleted
100644 → 0
View file @
280a0bfe
invenio_tools.inveniostore.InvenioStore.interogate
==================================================
.. currentmodule:: invenio_tools.inveniostore
.. automethod:: InvenioStore.interogate
\ No newline at end of file
docs/api/generated/inveniostore/invenio_tools.inveniostore.InvenioStore.interrogate.rst
0 → 100644
View file @
fd4bd999
invenio_tools.inveniostore.InvenioStore.interrogate
===================================================
.. currentmodule:: invenio_tools.inveniostore
.. automethod:: InvenioStore.interrogate
modules/invenio_tools/inveniostore.py
View file @
fd4bd999
...
...
@@ -41,7 +41,7 @@ class InvenioStore(object):
or ``inspirehep.net``
shelf (str):
section of the store. It depends on the host.
section of the store
containing records
. It depends on the host.
Possible values are ``None``, ``literature``, ``conferences``
and ``institutions``
...
...
@@ -96,7 +96,7 @@ class InvenioStore(object):
# close the session
self
.
_session
.
close
()
def
interogate
(
self
,
url
,
timeout
=
10
,
**
kwargs
):
def
inter
r
ogate
(
self
,
url
,
timeout
=
10
,
**
kwargs
):
"""Interrogate the store using the *URL*.
It is retry several time when the service is not available.
...
...
@@ -461,7 +461,7 @@ class InvenioStore(object):
while
scan
:
kwargs
[
"jrec"
]
+=
N_IDS
rep
=
self
.
interogate
(
self
.
_api_search
,
timeout
=
30
,
**
kwargs
)
rep
=
self
.
inter
r
ogate
(
self
.
_api_search
,
timeout
=
30
,
**
kwargs
)
try
:
li
=
rep
.
json
()
...
...
@@ -506,7 +506,7 @@ class InvenioStore(object):
if
self
.
_host
in
(
"cds.cern.ch"
,
"old.inspirehep.net"
):
kwargs
=
{
"of"
:
"recjson"
}
rep
=
self
.
interogate
(
url
,
timeout
=
30
,
**
kwargs
)
rep
=
self
.
inter
r
ogate
(
url
,
timeout
=
30
,
**
kwargs
)
try
:
li
=
rep
.
json
()
...
...
scripts/citations.py
View file @
fd4bd999
...
...
@@ -95,7 +95,7 @@ def get_citations(store, url):
number of citations
"""
kwargs
=
dict
(
of
=
"recjson"
,
ot
=
"number_of_citations"
)
rep
=
store
.
interogate
(
url
,
timeout
=
10
,
**
kwargs
)
rep
=
store
.
inter
r
ogate
(
url
,
timeout
=
10
,
**
kwargs
)
return
rep
.
json
()[
0
].
get
(
"number_of_citations"
)
...
...
@@ -252,4 +252,4 @@ if __name__ == "__main__":
import
sys
cli
()
sys
.
exit
(
0
)
\ No newline at end of file
sys
.
exit
(
0
)
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