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
fbddce74
Commit
fbddce74
authored
Jan 12, 2021
by
LE GAC Renaud
Browse files
Rename InvenioStore as CdsStore
parent
689bd1c5
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
72 additions
and
72 deletions
+72
-72
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.get_field.rst
...ated/cdsstore/store_tools.cdsstore.CdsStore.get_field.rst
+6
-0
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.get_ids.rst
...erated/cdsstore/store_tools.cdsstore.CdsStore.get_ids.rst
+6
-0
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.get_record.rst
...ted/cdsstore/store_tools.cdsstore.CdsStore.get_record.rst
+6
-0
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.interrogate.rst
...ed/cdsstore/store_tools.cdsstore.CdsStore.interrogate.rst
+6
-0
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.last_search_url.rst
...dsstore/store_tools.cdsstore.CdsStore.last_search_url.rst
+6
-0
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.search.rst
...nerated/cdsstore/store_tools.cdsstore.CdsStore.search.rst
+6
-0
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.get_field.rst
...store/store_tools.inveniostore.InvenioStore.get_field.rst
+0
-6
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.get_ids.rst
...iostore/store_tools.inveniostore.InvenioStore.get_ids.rst
+0
-6
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.get_record.rst
...tore/store_tools.inveniostore.InvenioStore.get_record.rst
+0
-6
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.interrogate.rst
...ore/store_tools.inveniostore.InvenioStore.interrogate.rst
+0
-6
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.last_search_url.rst
...store_tools.inveniostore.InvenioStore.last_search_url.rst
+0
-6
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.search.rst
...niostore/store_tools.inveniostore.InvenioStore.search.rst
+0
-6
docs/api/generated/store_tools.cdsstore.CdsStore.rst
docs/api/generated/store_tools.cdsstore.CdsStore.rst
+23
-0
docs/api/generated/store_tools.inveniostore.InvenioStore.rst
docs/api/generated/store_tools.inveniostore.InvenioStore.rst
+0
-23
docs/api/invenio.rst
docs/api/invenio.rst
+2
-2
modules/store_tools/__init__.py
modules/store_tools/__init__.py
+1
-1
modules/store_tools/cdsstore.py
modules/store_tools/cdsstore.py
+2
-2
modules/store_tools/factory.py
modules/store_tools/factory.py
+3
-3
scripts/citations.py
scripts/citations.py
+3
-3
tests/basis/test_01_store.py
tests/basis/test_01_store.py
+2
-2
No files found.
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.get_field.rst
0 → 100644
View file @
fbddce74
store_tools.cdsstore.CdsStore.get_field
=======================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.get_field
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.get_ids.rst
0 → 100644
View file @
fbddce74
store_tools.cdsstore.CdsStore.get_ids
=====================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.get_ids
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.get_record.rst
0 → 100644
View file @
fbddce74
store_tools.cdsstore.CdsStore.get_record
========================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.get_record
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.interrogate.rst
0 → 100644
View file @
fbddce74
store_tools.cdsstore.CdsStore.interrogate
=========================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.interrogate
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.last_search_url.rst
0 → 100644
View file @
fbddce74
store_tools.cdsstore.CdsStore.last_search_url
=============================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.last_search_url
docs/api/generated/cdsstore/store_tools.cdsstore.CdsStore.search.rst
0 → 100644
View file @
fbddce74
store_tools.cdsstore.CdsStore.search
====================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.search
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.get_field.rst
deleted
100644 → 0
View file @
689bd1c5
store_tools.inveniostore.InvenioStore.get_field
===============================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.get_field
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.get_ids.rst
deleted
100644 → 0
View file @
689bd1c5
store_tools.inveniostore.InvenioStore.get_ids
=============================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.get_ids
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.get_record.rst
deleted
100644 → 0
View file @
689bd1c5
store_tools.inveniostore.InvenioStore.get_record
================================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.get_record
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.interrogate.rst
deleted
100644 → 0
View file @
689bd1c5
store_tools.inveniostore.InvenioStore.interrogate
=================================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.interrogate
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.last_search_url.rst
deleted
100644 → 0
View file @
689bd1c5
store_tools.inveniostore.InvenioStore.last_search_url
=====================================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.last_search_url
docs/api/generated/inveniostore/store_tools.inveniostore.InvenioStore.search.rst
deleted
100644 → 0
View file @
689bd1c5
store_tools.inveniostore.InvenioStore.search
============================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.search
docs/api/generated/store_tools.cdsstore.CdsStore.rst
0 → 100644
View file @
fbddce74
store_tools.cdsstore.CdsStore
=============================
.. currentmodule:: store_tools.cdsstore
.. autoclass:: CdsStore
.. rubric:: Methods
.. autosummary::
:toctree: cdsstore/
~CdsStore.get_field
~CdsStore.get_ids
~CdsStore.get_record
~CdsStore.interrogate
~CdsStore.last_search_url
~CdsStore.search
docs/api/generated/store_tools.inveniostore.InvenioStore.rst
deleted
100644 → 0
View file @
689bd1c5
store_tools.inveniostore.InvenioStore
=====================================
.. currentmodule:: store_tools.inveniostore
.. autoclass:: InvenioStore
.. rubric:: Methods
.. autosummary::
:toctree: inveniostore/
~InvenioStore.get_field
~InvenioStore.get_ids
~InvenioStore.get_record
~InvenioStore.interrogate
~InvenioStore.last_search_url
~InvenioStore.search
docs/api/invenio.rst
View file @
fbddce74
...
...
@@ -7,7 +7,7 @@ store and to retrieve the publications according to user search criteria.
The main classes are:
* :class:`.
Invenio
Store` to search publications in the store,
* :class:`.
Cds
Store` to search publications in the store,
* :class:`.RecordPubli`, :class:`.RecordConf`, :class:`.RecordThesis`
Constants
...
...
@@ -57,7 +57,7 @@ Classes
.. autosummary::
:toctree: generated/
~
inveniostore.Invenio
Store
~
cdsstore.Cds
Store
~record.Record
~recordconf.RecordConf
~recordinst.RecordInst
...
...
modules/store_tools/__init__.py
View file @
fbddce74
...
...
@@ -26,7 +26,7 @@ from .exception import (StoreException,
from
.factory
import
build_record
,
build_store
from
.inspirehepstore
import
InspirehepStore
from
.invenio
store
import
Invenio
Store
from
store_tools.cds
store
import
Cds
Store
from
.record
import
Record
from
.recordconf
import
RecordConf
from
.recordhep
import
RecordHep
...
...
modules/store_tools/
invenio
store.py
→
modules/store_tools/
cds
store.py
View file @
fbddce74
""" store_tools.
invenio
store
""" store_tools.
cds
store
"""
from
.basestore
import
(
BaseStore
,
...
...
@@ -22,7 +22,7 @@ MSG_WRONG_KEYWORD = "Invalid keyword argument"
N_IDS
=
200
class
Invenio
Store
(
BaseStore
):
class
Cds
Store
(
BaseStore
):
"""Interface to invenio store cds.cern.ch and old.inspirehep.net.
Note:
...
...
modules/store_tools/factory.py
View file @
fbddce74
...
...
@@ -14,7 +14,7 @@ from .base import (CDS,
from
datetime
import
datetime
from
.exception
import
RecordException
,
StoreException
from
.invenio
store
import
Invenio
Store
from
store_tools.cds
store
import
Cds
Store
from
.inspirehepstore
import
InspirehepStore
,
SHELFS
from
.recordconf
import
RecordConf
from
.recordhepconf
import
RecordHepConf
...
...
@@ -255,11 +255,11 @@ def build_store(host=None, shelf=None):
+----------------+--------------+-----------------------------+
Returns:
Invenio
Store or InspirehepStore
Cds
Store or InspirehepStore
"""
if
host
in
CDS
:
store
=
Invenio
Store
(
host
=
"cds.cern.ch"
)
store
=
Cds
Store
(
host
=
"cds.cern.ch"
)
elif
host
in
INS
and
shelf
in
SHELFS
:
store
=
InspirehepStore
(
host
=
host
,
shelf
=
shelf
)
...
...
scripts/citations.py
View file @
fbddce74
...
...
@@ -31,7 +31,7 @@ import re
from
graph_tools
import
mplstyle
from
matplotlib.backends.backend_pdf
import
PdfPages
from
plugin_dbui
import
get_id
from
store_tools
import
Invenio
Store
,
StoreException
from
store_tools
import
Cds
Store
,
StoreException
CSVFN
=
"/opt/web2py/applications/limbra/scripts/citations.csv"
PDFFN
=
"/opt/web2py/applications/limbra/scripts/citations.pdf"
...
...
@@ -53,7 +53,7 @@ def collect_citations():
logger
.
info
(
"start collect citations..."
)
publications
=
db
.
publications
store
=
Invenio
Store
(
"inspirehep.net"
)
store
=
Cds
Store
(
"inspirehep.net"
)
# get the list of article stored in inspirehep
id_acl
=
get_id
(
db
.
categories
,
code
=
"ACL"
)
...
...
@@ -86,7 +86,7 @@ def collect_citations():
def
get_citations
(
store
,
url
):
"""
Args:
store (
Invenio
Store)
store (
Cds
Store)
url (str):
Returns:
...
...
tests/basis/test_01_store.py
View file @
fbddce74
"""test_
invenio
store
"""test_
01_
store
Test methods of
the
class
Inveni
Store
Test methods of class
es CdsStore and Inspirehep
Store
"""
import
pytest
...
...
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