Commit fbddce74 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Rename InvenioStore as CdsStore

parent 689bd1c5
store_tools.cdsstore.CdsStore.get_field
=======================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.get_field
store_tools.cdsstore.CdsStore.get_ids
=====================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.get_ids
store_tools.cdsstore.CdsStore.get_record
========================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.get_record
store_tools.cdsstore.CdsStore.interrogate
=========================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.interrogate
store_tools.cdsstore.CdsStore.last_search_url
=============================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.last_search_url
store_tools.cdsstore.CdsStore.search
====================================
.. currentmodule:: store_tools.cdsstore
.. automethod:: CdsStore.search
store_tools.inveniostore.InvenioStore.get_field
===============================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.get_field
store_tools.inveniostore.InvenioStore.get_ids
=============================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.get_ids
store_tools.inveniostore.InvenioStore.get_record
================================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.get_record
store_tools.inveniostore.InvenioStore.interrogate
=================================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.interrogate
store_tools.inveniostore.InvenioStore.last_search_url
=====================================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.last_search_url
store_tools.inveniostore.InvenioStore.search
============================================
.. currentmodule:: store_tools.inveniostore
.. automethod:: InvenioStore.search
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
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
......@@ -7,7 +7,7 @@ store and to retrieve the publications according to user search criteria.
The main classes are:
* :class:`.InvenioStore` to search publications in the store,
* :class:`.CdsStore` to search publications in the store,
* :class:`.RecordPubli`, :class:`.RecordConf`, :class:`.RecordThesis`
Constants
......@@ -57,7 +57,7 @@ Classes
.. autosummary::
:toctree: generated/
~inveniostore.InvenioStore
~cdsstore.CdsStore
~record.Record
~recordconf.RecordConf
~recordinst.RecordInst
......
......@@ -26,7 +26,7 @@ from .exception import (StoreException,
from .factory import build_record, build_store
from .inspirehepstore import InspirehepStore
from .inveniostore import InvenioStore
from store_tools.cdsstore import CdsStore
from .record import Record
from .recordconf import RecordConf
from .recordhep import RecordHep
......
""" store_tools.inveniostore
""" store_tools.cdsstore
"""
from .basestore import (BaseStore,
......@@ -22,7 +22,7 @@ MSG_WRONG_KEYWORD = "Invalid keyword argument"
N_IDS = 200
class InvenioStore(BaseStore):
class CdsStore(BaseStore):
"""Interface to invenio store cds.cern.ch and old.inspirehep.net.
Note:
......
......@@ -14,7 +14,7 @@ from .base import (CDS,
from datetime import datetime
from .exception import RecordException, StoreException
from .inveniostore import InvenioStore
from store_tools.cdsstore import CdsStore
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:
InvenioStore or InspirehepStore
CdsStore or InspirehepStore
"""
if host in CDS:
store = InvenioStore(host="cds.cern.ch")
store = CdsStore(host="cds.cern.ch")
elif host in INS and shelf in SHELFS:
store = InspirehepStore(host=host, shelf=shelf)
......
......@@ -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 InvenioStore, StoreException
from store_tools import CdsStore, 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 = InvenioStore("inspirehep.net")
store = CdsStore("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 (InvenioStore)
store (CdsStore)
url (str):
Returns:
......
"""test_inveniostore
"""test_01_store
Test methods of the class InveniStore
Test methods of classes CdsStore and InspirehepStore
"""
import pytest
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment