Skip to content

Latest commit

 

History

History
85 lines (50 loc) · 2.67 KB

README.rst

File metadata and controls

85 lines (50 loc) · 2.67 KB

Invenio-Records-Marc21

Marc21 datamodel

Further documentation is available on https://invenio-records-marc21.readthedocs.io/

Development

Install

Choose a version of elasticsearch and a DB, then run:

pipenv run pip install -e .[all]
pipenv run pip install invenio-search[elasticsearch7]
pipenv run pip install invenio-db[postgresql,versioning]

Setting Up Statistics

To enable and configure the statistics feature using MARC21 records in Invenio, you need to update your invenio.cfg file with specific configurations that integrate MARC21 statistics with Invenio's standard statistics modules.

### Configuration Steps

  1. Import Required Configurations:

    Before updating the configuration values, ensure that you import the necessary settings from both the invenio_records_marc21 module and the invenio_app_rdm module. Add the following lines to your invenio.cfg:

from invenio_records_marc21.config import MARC21_STATS_CELERY_TASKS, MARC21_STATS_EVENTS, MARC21_STATS_AGGREGATIONS, MARC21_STATS_QUERIES
from invenio_app_rdm.config import CELERY_BEAT_SCHEDULE, STATS_EVENTS, STATS_AGGREGATIONS, STATS_QUERIES

Update Celery Beat Schedule:

Integrate MARC21-specific scheduled tasks with Invenio's scheduler:

CELERY_BEAT_SCHEDULE.update(MARC21_STATS_CELERY_TASKS)

Update Events, Aggregations, and Queries:

Merge MARC21 statistics configurations with the global statistics settings:

STATS_EVENTS.update(MARC21_STATS_EVENTS)
STATS_AGGREGATIONS.update(MARC21_STATS_AGGREGATIONS)
STATS_QUERIES.update(MARC21_STATS_QUERIES)

Tests

pipenv run ./run-tests.sh