IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Verified Commit 6f2a1991 authored by Emi Simpson's avatar Emi Simpson
Browse files

Merge branch 'main' into api

parents 184a6e05 6b2368b4
Pipeline #1061 passed with stage
in 46 seconds
......@@ -85,7 +85,7 @@ class Dashboard(ABC):
return any(
True
for parent_source in project.get_data_sources(c)
for parent_source in project.get_data_sources(c, True)
for source in parent_source.expand_source()
for pattern in required_types
if match_types(source.source_type, pattern)
......@@ -197,7 +197,7 @@ class CommittersDashboard(Dashboard):
@staticmethod
def produce_for(c: Cursor, project: Project) -> Optional['CommittersDashboard']:
if Dashboard._validate_source_types(c, project, {'git'}):
return CommittersDashboard([source.url for source in project.get_data_sources(c) if type(source) == Git])
return CommittersDashboard([source.url for source in project.get_data_sources(c, True) if type(source) == Git])
else:
return None
......@@ -239,7 +239,7 @@ class CommitsDashboard(Dashboard):
@staticmethod
def produce_for(c: Cursor, project: Project) -> Optional['CommitsDashboard']:
if Dashboard._validate_source_types(c, project, {'git'}):
return CommitsDashboard([source.url for source in project.get_data_sources(c) if type(source) == Git])
return CommitsDashboard([source.url for source in project.get_data_sources(c, True) if type(source) == Git])
else:
return None
......@@ -287,7 +287,7 @@ class OsfActivityDashboard(Dashboard):
@staticmethod
def produce_for(c: Cursor, project: Project) -> Optional['OsfActivityDashboard']:
if Dashboard._validate_source_types(c, project, {'osf'}):
return OsfActivityDashboard([source.url for source in project.get_data_sources(c) if type(source) == Git])
return OsfActivityDashboard([source.url for source in project.get_data_sources(c, True) if source.source_type == 'osf'])
else:
return None
......@@ -355,7 +355,7 @@ class IssuesDashboard(Dashboard):
@staticmethod
def produce_for(c: Cursor, project: Project) -> Optional['IssuesDashboard']:
if Dashboard._validate_source_types(c, project, {'gitlab:issue', 'github'}):
return IssuesDashboard([source.url for source in project.get_data_sources(c) if type(source) == Git])
return IssuesDashboard([source.url for source in project.get_data_sources(c, True) if 'issue' in source.source_type or source.source_type == 'github'])
else:
return None
......
......@@ -119,7 +119,7 @@ class CommitsByAuthor(Query[List[str], Dict[str, int]]):
"""
@staticmethod
def perform_query(es: Elasticsearch, args: List[str]) -> Dict[str, int]:
results: _QueryResult = es.search(index="git_demo_enriched", body = {
results: _QueryResult = es.search(index="git_enriched", body = {
'size': 0,
"query": {
"bool": {
......@@ -159,7 +159,7 @@ class CommitsByDate(Query[List[str], Dict[str, int]]):
"""
@staticmethod
def perform_query(es: Elasticsearch, args: List[str]) -> Dict[str, int]:
results: _QueryResult = es.search(index="git_demo_enriched", body = {
results: _QueryResult = es.search(index="git_enriched", body = {
'size': 0,
"query": {
"bool": {
......@@ -202,13 +202,13 @@ class IssuesByOpenTime(Query[List[str], Dict[float, int]]):
@staticmethod
def perform_query(es: Elasticsearch, args: List[str]) -> Dict[float, int]:
DEGREE: int = 2
results: _QueryResult = es.search(index="github_issues,gitlab", body = {
results: _QueryResult = es.search(index="github_enriched,gitlab_issues_enriched", body = {
'size': 3,
"query": {
"bool": {
"should": [
{
"match": {"repo_name": repo}
"match": {"repository": repo}
}
for repo in args
],
......@@ -259,7 +259,7 @@ class OsfActivityByDate(Query[List[str], Dict[str, int]]):
"""
@staticmethod
def perform_query(es: Elasticsearch, args: List[str]) -> Dict[str, int]:
results: _QueryResult = es.search(index="osf_nodes_demo_enriched", body = {
results: _QueryResult = es.search(index="osf_nodes_enriched", body = {
'size': 0,
"query": {
"bool": {
......
{% block title %} {{dashboard.title()}} {% endblock %}
{% block head %}
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.4.1/dist/chart.min.js" integrity="sha256-GMN9UIJeUeOsn/Uq4xDheGItEeSpI5Hcfp/63GclDZk=" crossorigin="anonymous"></script>
<script src="/static/chart.min.js"></script>
<style>
body {
display: flex;
align-content: center;
align-items: center;
color: transparent;
}
canvas {
position: absolute;
z-index: 999;
max-width: 100vw;
max-height: 100vh;
}
</style>
{% endblock %}
{% block main %}
<canvas style="height: 100%; width: 100%;" id="{{dashboard.title()|lower|replace(' ', '-')|safe}}"></canvas>
<script>
new Chart(
document.getElementById("{{dashboard.title()|lower|replace(' ', '-')|safe}}"),
{{dashboard.get_json()|safe}}
);
</script>
{% endblock %}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.4.1/dist/chart.min.js" integrity="sha256-GMN9UIJeUeOsn/Uq4xDheGItEeSpI5Hcfp/63GclDZk=" crossorigin="anonymous"></script>
<script src="/static/chart.min.js"></script>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
}
canvas {
width: 100%;
height: 100%;
max-width: 100vw;
max-height: 100vh;
}
</style>
</head>
<body>
<canvas id="{{dashboard.title()|lower|replace(' ', '-')|safe}}"></canvas>
<script>
new Chart(
document.getElementById("{{dashboard.title()|lower|replace(' ', '-')|safe}}"),
{{dashboard.get_json()|safe}}
);
</script>
</body>
</html
......@@ -47,108 +47,41 @@ reset_on_load = false
identities_file = [{{COORDINATOR_DATA_DIR}}configs/identities.yml]
identities_format = grimoirelab
#[bugzillarest]
#raw_index = bugzillarest_demo_raw
#enriched_index = bugzillarest_demo_enriched
#no-archive = true
#base-path = "{{COORDINATOR_DATA_DIR}}cache/bugzilla/"
#[confluence]
#no-archive = true
#raw_index = confluence_demo_raw
#enriched_index = confluence_demo_enriched
#base-path = "{{COORDINATOR_DATA_DIR}}cache/confluence/"
[git]
raw_index = git_demo_raw
enriched_index = git_demo_enriched
raw_index = git_raw
enriched_index = git_enriched
latest-items = true
studies = [enrich_demography:git, enrich_onion:git]
base-path = "{{COORDINATOR_DATA_DIR}}cache/git/"
#[github]
#api-token = <YOUR_API_TOKEN_WHERE>
#raw_index = github_demo_raw
#raw_index = github_raw
#sleep-for-rate = true
#sleep-time = "300"
#enriched_index = github_demo_enriched
#enriched_index = github_enriched
#base-path = "{{COORDINATOR_DATA_DIR}}cache/github/"
#[gitlab:gitlab.com:issue]
#api-token = <YOUR_API_TOKEN_WHERE>
#raw_index = gitlab_issues_demo_raw
#enriched_index = gitlab_issues_demo_enriched
#raw_index = gitlab_issues_raw
#enriched_index = gitlab_issues_enriched
#no-archive = true
#sleep-for-rate = true
#base-path = "{{COORDINATOR_DATA_DIR}}cache/gitlab/"
#[gitlab:gitlab.com:merge]
#api-token = <YOUR_API_TOKEN_WHERE>
#raw_index = gitlab_merges_demo_raw
#enriched_index = gitlab_merges_demo_enriched
#raw_index = gitlab_merges_raw
#enriched_index = gitlab_merges_enriched
#no-archive = true
#category = merge_request
#sleep-for-rate = true
#base-path = "{{COORDINATOR_DATA_DIR}}cache/gitlab/"
#[jira]
#raw_index = jira_demo_raw
#enriched_index = jira_demo_enriched
#no-archive = true
#base-path = "{{COORDINATOR_DATA_DIR}}cache/jira/"
#[pipermail]
#raw_index = pipermail_demo_raw
#enriched_index = pipermail_demo_enriched
#no-verify = true
#base-path = "{{COORDINATOR_DATA_DIR}}cache/pipermail/"
#[mediawiki]
#raw_index = mediawiki_demo_raw
#enriched_index = mediawiki_demo_enriched
#no-archive = true
#base-path = "{{COORDINATOR_DATA_DIR}}cache/mediawiki/"
#[meetup]
#raw_index = meetup_demo_raw
#enriched_index = meetup_demo_enriched
#api-token = <YOUR_API_TOKEN_WHERE>
#no-archive = true
#sleep-for-rate = true
#sleep-time = "300"
#base-path = "{{COORDINATOR_DATA_DIR}}cache/meetup/"
#[stackexchange]
#raw_index = stackexchange_demo_raw
#enriched_index = stackexchange_demo_enriched
#api-token = <YOUR_API_TOKEN_WHERE>
#no-archive = true
#base-path = "{{COORDINATOR_DATA_DIR}}cache/stackexchange/"
#[slack]
#raw_index = slack_demo_raw
#enriched_index = slack_demo_enriched
#api-token = <YOUR_API_TOKEN_WHERE>
#no-archive = true
#base-path = "{{COORDINATOR_DATA_DIR}}cache/slack/"
#[supybot]
#raw_index = supybot_demo_raw
#enriched_index = supybot_demo_enriched
#base-path = "{{COORDINATOR_DATA_DIR}}cache/supybot/"
#[twitter]
#raw_index = twitter_demo_raw
#enriched_index = twitter_demo_enriched
#api-token = <YOUR_API_TOKEN_WHERE>
#no-archive = true
#sleep-for-rate = true
#sleep-time = 300
#base-path = "{{COORDINATOR_DATA_DIR}}cache/twitter/"
#[osf]
#raw_index = osf_nodes_demo_raw
#enriched_index = osf_nodes_demo_enriched
#raw_index = osf_nodes_raw
#enriched_index = osf_nodes_enriched
#category = log
#sleep-for-rate = true
#sleep-time = 300
......@@ -170,10 +103,10 @@ base-path = "{{COORDINATOR_DATA_DIR}}cache/rss/"
[enrich_demography:git]
[enrich_areas_of_code:git]
in_index = git_demo_raw
out_index = git-aoc_demo_enriched
in_index = git_raw
out_index = git-aoc_enriched
[enrich_onion:git]
in_index = git
out_index = git-onion_demo_enriched
out_index = git-onion_enriched
contribs_field = hash
......@@ -61,7 +61,7 @@ services:
environment:
- ES_JAVA_OPTS=-Xms2g -Xmx2g
volumes:
- ./elasticsearch/data:/elasticsearch/data
- ./elasticsearch/data:/usr/share/elasticsearch/data
- ./elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
# {% if DEVELOPMENT %}
ports:
......
Supports Markdown
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