Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

GrimoireLab Core

GrimoireLab scheduler to fetch data from software repositories.

The scheduler is a distributed job queue that schedules and executes Perceval. The platform has one or more workers that will run each Perceval job.

The repositories whose data will be fetched are added to the platform using a REST API. Then, the server transforms these repositories into Perceval jobs and schedules them between its job queues.

Workers are waiting for new jobs checking these queues. Workers only execute a job at a time. When a new job arrives, an idle worker will take and run it. Once a job is finished, if the result is successful, the server will re-schedule it to retrieve new data.

By default, items fetched by each job will be published using a Redis queue.

Requirements

  • Python >= 3.11
  • Redis database
  • MySQL database

You will also need some other libraries for running the tool, you can find the whole list of dependencies in pyproject.toml file.

Installation

There are several ways to install GrimoireLab core on your system: packages or source code using Poetry or pip.

mysql_config

Before you install GrimoireLab core you might need to install mysql_config command. If you are using a Debian based distribution, this command can be found either in libmysqlclient-dev or libmariadbclient-dev packages (depending on if you are using MySQL or MariaDB database server). You can install these packages in your system with the next commands:

  • MySQL
$ apt install libmysqlclient-dev
  • MariaDB
$ apt install libmariadbclient-dev-compat

PyPI

GrimoireLab core can be installed using pip, a tool for installing Python packages. To do it, run the next command:

$ pip install grimoirelab-core

Source code

To install from the source code you will need to clone the repository first:

$ git clone https://github.com/grimoirelab/grimoirelab-core
$ cd grimoirelab-core

Then use pip or Poetry to install the package along with its dependencies.

Pip

To install the package from local directory run the following command:

$ pip install .

In case you are a developer, you should install grimoirelab-core in editable mode:

$ pip install -e .

Poetry

We use poetry for dependency management and packaging. You can install it following its documentation. Once you have installed it, you can install grimoirelab-core and the dependencies in a project isolated environment using:

$ poetry install

To spaw a new shell within the virtual environment use:

$ poetry shell

To build the static files automatically you can install the pre-hook plugin included in the project. Each time you run poetry install or poetry build the static files will be built automatically:

$ poetry self add "$PWD/build/poetry-prehook"

If you prefer to build the static files manually, you can run:

$ poetry run python build/build-ui.py

Usage

$ grimoirelab
Usage: grimoirelab [OPTIONS] COMMAND [ARGS]...

  Toolset for software development analytics.

  GrimoireLab is a set of tools and a platform to retrieve, analyze, and
  provide insights about data coming from software development repositories.
  With this command, you'll be able to configure and run its different
  services.

  It requires to pass a configuration file module using the Python path syntax
  (e.g. grimoirelab.core.config.settings). Take into account the configuration
  should be accessible by your PYTHON_PATH. You can also use the environment
  variable GRIMOIRELAB_CONFIG to define the config location.

Options:
  --config TEXT  Configuration module in Python path syntax  [default:
                 grimoirelab.core.config.settings]
  --help         Show this message and exit.

Commands:
  admin  GrimoireLab administration tool.
  run    Run a GrimoireLab service.

Configuration

The first step is to run a Redis server, a MySQL database and an OpenSearch container that will be used for communicating components and storing results. Please refer to their documentation to know how to install and run them.

Configuration variables

By default, GrimoireLab runs using a configuration file defined at grimoirelab.core.config.settings. You can update that file or use environment variables to override the default values.

Configure the database

This command will create the database tables and the initial admin user.

grimoirelab admin setup

Run eventizer workers

Run the eventizer workers that will fetch data from the repositories and insert it into a Redis Stream.

grimoirelab run eventizers

Run archivist workers

Run the archivist workers that will read data from the Redis Stream and store it into OpenSearch.

grimoirelab run archivists

Run identities storage workers

Run the identities storage workers that will read data from the Redis Stream and store it into SortingHat database.

grimoirelab run ushers

Run SortingHat workers

Run the SortingHat workers that will run jobs related to identities management. Like affiliate, unify, genderize, recommendations and identities importers.

grimoirelab run sortinghat-workers

Run the backend API

Run the backend API server that will provide a REST API to manage the repositories, jobs and identities.

It also provides a web interface to manage the platform.

grimoirelab run server --dev

Running tests

GrimoireLab core comes with a comprehensive list of unit and integration tests.

  • Unitary tests requires a SQL database running (MySQL or MariaDB).

  • Integration tests uses testcontainers to spawn temporary containers (MariaDB, Valkey, and OpenSearch).

(.venv)$ pytest

Set the environment variable GRIMOIRELAB_TESTING_VERBOSE to activate the verbose mode.

Metadata

Release files for grimoirelab-core 1.0.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grimoirelab-core 1.0.0a2
File Size Uploaded Provenance Actions
grimoirelab_core-1.0.0a2.tar.gz 72.3 MB Without provenance Details for grimoirelab_core-1.0.0a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for grimoirelab-core 1.0.0a2
File Interpreter ABI Platform Actions
grimoirelab_core-1.0.0a2-py3-none-any.whl Python 3 none any Details for grimoirelab_core-1.0.0a2-py3-none-any.whl

Total release size: 75.3 MB

Release files / grimoirelab_core-1.0.0a2.tar.gz

Download URL grimoirelab_core-1.0.0a2.tar.gz
Size 72.3 MB
Tags Source
SHA-256 checksum
How to use checksums
117039f375dffd010b2b29c8131d9c49c8a56565140745c429e3bbed48df24cc
BLAKE2b-256 checksum
How to use checksums
1d3ef9b2d88be9567c069f1718ed70975c1114e385acedcb2ce9e52ad1c17ce9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.4 Linux/7.0.0-1017-azure

Release files / grimoirelab_core-1.0.0a2-py3-none-any.whl

Download URL grimoirelab_core-1.0.0a2-py3-none-any.whl
Size 3.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d8227c80db4624d119ebd5756f784db90ec94207c5bbc91b3f368137797258dd
BLAKE2b-256 checksum
How to use checksums
16570c090eee7b57080973ffd0a5f8a8a4a3a750de24943e42eb7b3ea7eff440
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.4 Linux/7.0.0-1017-azure

Security for grimoirelab-core 1.0.0a2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page