From 6fc1269a89b587f8c2fd66056d05bb5fcfeb0f51 Mon Sep 17 00:00:00 2001
From: Philipp Gualdi
Date: Fri, 26 Apr 2024 18:02:31 +0200
Subject: [PATCH] modifciation: documentation for statistic
---
README.rst | 40 ++++++++++++++++++++++++++++++++++------
1 file changed, 34 insertions(+), 6 deletions(-)
diff --git a/README.rst b/README.rst
index 7d03bc9d..7f81b5ce 100644
--- a/README.rst
+++ b/README.rst
@@ -1,5 +1,5 @@
..
- Copyright (C) 2021 Graz University of Technology.
+ Copyright (C) 2021-2024 Graz University of Technology.
Invenio-Records-Marc21 is free software; you can redistribute it and/or modify it
under the terms of the MIT License; see LICENSE file for more details.
@@ -35,20 +35,48 @@ Install
Choose a version of elasticsearch and a DB, then run:
.. code-block:: console
-
+
pipenv run pip install -e .[all]
pipenv run pip install invenio-search[elasticsearch7]
pipenv run pip install invenio-db[postgresql,versioning]
-Service
-=========
+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`:
+
+.. code-block:: console
+ 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:
+
+.. code-block:: console
+ CELERY_BEAT_SCHEDULE.update(MARC21_STATS_CELERY_TASKS)
+
+
+Update Events, Aggregations, and Queries:
+
+Merge MARC21 statistics configurations with the global statistics settings:
+
+.. code-block:: console
+ STATS_EVENTS.update(MARC21_STATS_EVENTS)
+ STATS_AGGREGATIONS.update(MARC21_STATS_AGGREGATIONS)
+ STATS_QUERIES.update(MARC21_STATS_QUERIES)
-** Create Marc21 Record**
Tests
=========
.. code-block:: console
- pipenv run ./run-tests.sh
\ No newline at end of file
+ pipenv run ./run-tests.sh