Skip to content

Commit

Permalink
Merge 234b036 into 1a78bce
Browse files Browse the repository at this point in the history
  • Loading branch information
jjmerchante committed Mar 15, 2022
2 parents 1a78bce + 234b036 commit 51b5cb8
Show file tree
Hide file tree
Showing 18 changed files with 1,816 additions and 83 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/ci.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: build
name: tests

on: [push, pull_request]
on:
push:
branches:
- '**'
tags:
- '!**'
pull_request:
branches:
- '**'

jobs:
tests:
Expand All @@ -18,7 +26,7 @@ jobs:
name: Python ${{ matrix.python-version }} for ES ${{ matrix.elasticsearch-version }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.7, 3.8]
elasticsearch-version: [6.8.6]

steps:
Expand All @@ -41,16 +49,17 @@ jobs:
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: ${{ matrix.elasticsearch-version }}


- name: Install and set up Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install --upgrade pip==18.1
pip install --upgrade setuptools==49.6.0
pip install --upgrade wheel
pip install -r "requirements.txt"
pip install -r "requirements_tests.txt"
pip install flake8 coveralls
poetry install -vvv
poetry add -D coveralls
- name: Verify MySQL connection
run: |
sudo apt-get install -y mysql-client libmysqlclient-dev
Expand All @@ -62,14 +71,13 @@ jobs:
curl -fsSL "http://localhost:9200/_cat/health?h=status"
- name: Lint with flake8
run: flake8 . --exclude ./src

run: |
poetry run flake8
- name: Tests and Coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd tests
coverage run --source=sirmordred run_tests.py
# --service=github is a workaround for bug
# https://github.com/coveralls-clients/coveralls-python/issues/251
coveralls --service=github
poetry run coverage run --source=sirmordred run_tests.py
poetry run coveralls --service=github
6 changes: 3 additions & 3 deletions Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ The final results should be something similar to the image below.

Now that you have the ElasticSearch, Kibiter and MariaDB running on your system and the project configured in the PyCharm, we can execute micro-mordred/sirmordred.

To execute micro-mordred, define a [setup.cfg](https://github.com/chaoss/grimoirelab-sirmordred/blob/master/utils/setup.cfg) and [projects.json](https://github.com/chaoss/grimoirelab-sirmordred/blob/master/utils/projects.json), and
To execute micro-mordred, define a [setup.cfg](https://github.com/chaoss/grimoirelab-sirmordred/blob/master/sirmordred/utils/setup.cfg) and [projects.json](https://github.com/chaoss/grimoirelab-sirmordred/blob/master/sirmordred/utils/projects.json), and
run the following commands, which will collect and enrich the data coming from the git sections and upload the corresponding panels to Kibiter:
```
micro.py --raw --enrich --cfg ./setup.cfg --backends git cocom
Expand Down Expand Up @@ -286,7 +286,7 @@ Following is a list of common problems encountered while setting up GrimoireLab
#### Empty Index [↑](#troubleshooting-)

* Indications and Diagnosis:
Check for the following error after executing [Micro Mordred](https://github.com/chaoss/grimoirelab-sirmordred/tree/master/utils/micro.py)
Check for the following error after executing [Micro Mordred](https://github.com/chaoss/grimoirelab-sirmordred/tree/master/sirmordred/utils/micro.py)
using ```micro.py --raw --enrich --panels --cfg ./setup.cfg --backends git```(Here, using git as backend)
```
[git] Problem executing study enrich_areas_of_code:git, RequestError(400, 'search_phase_execution_exception', 'No mapping
Expand All @@ -299,7 +299,7 @@ Following is a list of common problems encountered while setting up GrimoireLab

There are 2 methods to solve this problem:

Method 1: Disable the param [latest-items](https://github.com/chaoss/grimoirelab-sirmordred/blob/master/utils/setup.cfg#L78) by setting it to false.
Method 1: Disable the param [latest-items](https://github.com/chaoss/grimoirelab-sirmordred/blob/master/sirmordred/utils/setup.cfg#L78) by setting it to false.

Method 2: Delete the local clone of the repo (which is stored in ```~/.perceval/repositories```).

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SirMordred [![Build Status](https://github.com/chaoss/grimoirelab-sirmordred/workflows/build/badge.svg)](https://github.com/chaoss/grimoirelab-sirmordred/actions?query=workflow:build+branch:master+event:push) [![Coverage Status](https://coveralls.io/repos/github/chaoss/grimoirelab-sirmordred/badge.svg?branch=master)](https://coveralls.io/github/chaoss/grimoirelab-sirmordred?branch=master)
# SirMordred [![Build Status](https://github.com/chaoss/grimoirelab-sirmordred/workflows/tests/badge.svg)](https://github.com/chaoss/grimoirelab-sirmordred/actions?query=workflow:tests+branch:master+event:push) [![Coverage Status](https://coveralls.io/repos/github/chaoss/grimoirelab-sirmordred/badge.svg?branch=master)](https://coveralls.io/github/chaoss/grimoirelab-sirmordred?branch=master)

SirMordred is the tool used to coordinate the execution of the GrimoireLab platform, via two main configuration files, the `setup.cfg` and `projects.json`, which are summarized in their corresponding sections.

Expand Down Expand Up @@ -1434,7 +1434,7 @@ studies = [enrich_demography:weblate] (optional)

Micro Mordred is a simplified version of Mordred which omits the use of its scheduler. Thus, Micro Mordred allows running single Mordred tasks (e.g., raw collection, enrichment) per execution.

Micro Mordred is located in the [/utils](https://github.com/chaoss/grimoirelab-sirmordred/tree/master/utils/micro.py) folder of this same repository. It can be executed via command line, its parameters are summarized below:
Micro Mordred is located in the [sirmordred/utils](https://github.com/chaoss/grimoirelab-sirmordred/tree/master/sirmordred/utils/micro.py) folder of this same repository. It can be executed via command line, its parameters are summarized below:
```
--debug: execute Micro Mordred in debug mode
Expand All @@ -1455,7 +1455,7 @@ Micro Mordred is located in the [/utils](https://github.com/chaoss/grimoirelab-s

Examples of possible executions are shown below:
```
cd .../grimoirelab-sirmordred/utils/
cd .../grimoirelab-sirmordred/sirmordred/utils/
micro.py --raw --enrich --cfg ./setup.cfg --backends git # execute the Raw and Enrich tasks for the Git cfg section
micro.py --panels # execute the Panels task to load the Sigils panels to Kibiter
micro.py --raw --enrich --debug --cfg ./setup.cfg --backends groupsio --logs-dir logs # execute the raw and enriched tasks for the groupsio cfg section with debug mode on and logs being saved in the folder logs in the same directory as micro.py
Expand Down
Loading

0 comments on commit 51b5cb8

Please sign in to comment.