-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[graal] Add support of Graal CoCom & CoLic Backend #672
[graal] Add support of Graal CoCom & CoLic Backend #672
Conversation
Signed-off-by: inishchith <[email protected]>
This commit adds support for Graal's CoCom & CoLic Backend data enricher along with their study implementation Signed-off-by: inishchith <[email protected]>
This commit adds connectors for Graal's CoCom & CoLic Backend. Segregates common methods into a separate utility file. Signed-off-by: inishchith <[email protected]>
955dbb9
to
8c64017
Compare
Pull Request Test Coverage Report for Build 1623
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @inishchith for the PR. It's really in good shape!
If you want to add a test for the studies, you can have a look at the code here: https://github.com/chaoss/grimoirelab-elk/blob/master/tests/test_git.py#L134.
As agreed, we can keep working on this PR and include the enhancements. We could close the old PRs (#664 #669), WDYT?
8c64017
to
20eb820
Compare
Signed-off-by: inishchith <[email protected]>
20eb820
to
7e79734
Compare
Thanks a lot. I'll work on the additions.
Yes. Agree with you. Done! |
Signed-off-by: inishchith <[email protected]>
ef8e5d0
to
31e87d1
Compare
Signed-off-by: inishchith <[email protected]>
31e87d1
to
e0430d1
Compare
313b39e
to
71dccf8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work @inishchith :)
I've tested the cocom analysis using the conf below (projects.json and setup.cfg):
"cocom": [
"https://github.com/chaoss/wg-value",
"https://github.com/chaoss/grimoirelab-elk",
"https://github.com/chaoss/augur",
"https://github.com/chaoss/grimoirelab-sirmordred",
"https://github.com/chaoss/grimoirelab-graal",
"https://github.com/chaoss/governance",
"https://github.com/chaoss/wg-evolution",
"https://github.com/chaoss/wg-common",
"https://github.com/chaoss/website",
"https://github.com/chaoss/augur-sbom",
"https://github.com/chaoss/wg-diversity-inclusion",
"https://github.com/chaoss/wg-risk",
"https://github.com/chaoss/metrics",
"https://github.com/chaoss/grimoirelab-perceval",
"https://github.com/chaoss/grimoirelab-kingarthur",
"https://github.com/chaoss/grimoirelab-tutorial",
"https://github.com/chaoss/grimoirelab",
"https://github.com/chaoss/grimoirelab-sigils",
"https://github.com/chaoss/grimoirelab-perceval-mozilla",
"https://github.com/chaoss/grimoirelab-perceval-opnfv",
"https://github.com/chaoss/grimoirelab-perceval-puppet",
"https://github.com/chaoss/grimoirelab-sortinghat",
"https://github.com/chaoss/grimoirelab-toolkit",
"https://github.com/chaoss/grimoirelab-kidash",
"https://github.com/chaoss/grimoirelab-hatstall",
"https://github.com/chaoss/grimoirelab-cereslib",
"https://github.com/chaoss/grimoirelab-manuscripts",
"https://github.com/chaoss/grimoirelab-bestiary",
"https://github.com/chaoss/grimoirelab-kibiter",
"https://github.com/chaoss/prospector",
"https://github.com/chaoss/whitepaper"
]
[cocom]
raw_index = cocom_raw_chaoss_file_level
enriched_index = cocom_enrich_chaoss_file_level
category = code_complexity_lizard_file
studies = [enrich_repo_analysis]
branches = master
[enrich_repo_analysis]
out_index = cocom_enrich_chaoss_repo_level
The raw, enriched and study data is available on the incubator. I had to restart the process a couple of times due problems with the checkout step performed by graal (I guess they were connection problems, since I wasn't able to replicate the issue). The cocom_enrich_chaoss_file_level
seems right, the values of grimoirelab_creation_date
are in line with last dates in the corresponding repos. On the other hand, cocom_enrich_chaoss_repo_level
doesn't seem right, since the repos listed are less than the one in cocom_enrich_chaoss_file_level
, you can check the following vizs:
- https://grimoirelab-incubator.biterg.io/goto/6226a203d35824f8acfdadf2f9a55db6
- https://grimoirelab-incubator.biterg.io/goto/be4edd82b969df37ea9ba21fded67b8d
Note that I also deleted the study index and relaunched the study, but the mismatch with the number of repos is still there.
To better understand what's going on, I would add some log info when processing the repos in the study, for instance before starting the study analysis and just after [1] [2]. WDYT?
Another comment is about the mapping of the study, we should probably make it explicit. For instance, before the CocomEnrich class declaration, we can add the object mapping:
class Mapping(BaseMapping):
@staticmethod
def get_elastic_mappings(es_major):
"""Get Elasticsearch mapping.
Ensure data.message is string, since it can be very large
:param es_major: major version of Elasticsearch, as string
:returns: dictionary with a key, 'items', with the mapping
"""
mapping = '''
{
"dynamic":true,
"properties": {
"id" : {
"type" : "keyword"
},
"interval_months" : {
"type" : "long"
},
"origin" : {
"type" : "keyword"
},
"study_creation_date" : {
"type" : "date"
},
"total_blanks" : {
"type" : "long"
},
"total_blanks_per_loc" : {
"type" : "float"
},
"total_ccn" : {
"type" : "long"
},
"total_comments" : {
"type" : "long"
},
"total_comments_per_loc" : {
"type" : "float"
},
"total_files" : {
"type" : "long"
},
"total_loc" : {
"type" : "long"
},
"total_loc_per_function" : {
"type" : "float"
},
"total_num_funs" : {
"type" : "long"
},
"total_tokens" : {
"type" : "long"
}
}
}
'''
return {"items": mapping}
This will require to add the import from grimoire_elk.elastic_mapping import Mapping as BaseMapping
. Then in the method enrich_repo_analysis
, the line where the es_out
is initialized should be changed to es_out = ElasticSearch(enrich_backend.elastic.url, out_index, mappings=Mapping)
Finally, a really tiny comment is about the headers of the files incuded in the PR, the third paragraph should be changed to:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
dd386b1
to
ab9bc49
Compare
ok, ping me when the PR is ready to review @inishchith , thanks |
I try to use the last PRs of @inishchith , but I think that I have a trouble with configuration. Where put this code ?
@valeriocos write In addition of two PR in grimoirelab-elk and grimoirelab-sirmordred and modified the projects.json and setup.cfg files, not other modification is needed ? NOTE : I have forked the the code on https://github.com/florentk to build a new docker-full image (see previous post chaoss/grimoirelab-graal#51 ) |
@florentk Sorry for the delayed response. The code in reference is part of the configuration section used to execute the raw and enriched tasks of grimoirelab-elk via micro-mordred. You can check out the link for more info. on how to execute it. This PR addresses the implementation of raw and enrich tasks( along with study) on Graal's CoCom & CoLic Backends.
Let me know if you have more questions. Thanks! |
Hi @florentk , sorry for the late reply. We are currently using micro-mordred to work on the graal integration. You just need to use the docker-compose at: https://github.com/chaoss/grimoirelab-sirmordred#source-code-and-docker (we omitted the mariadb section, since we have a mysql instance installed locally). The advantage of using micro-mordred is that you can focus on a single data source. |
almost the same timing @inishchith :) |
thanks @inishchith and @valeriocos for your quick responce. I have adapted existing
and I use this minimal
I run theses commands :
But on Kibiter I don't find the index patterns relative to cocom. I got this error : The complete log :
|
I used the grimoirelab-graal repos of chaoss, maybe I need to use that of inishchith ? |
@florentk we can try to setup the same environment @inishchith and myself are using to work on this feature. Please try following (please @inishchith check if I forgot something).
Optionally, you can create a configuration in PyCharm to speed up the executions (Run -> Edit configuration -> Let us know if you encounter any problem :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor fixes to make the data being visible in the dashboards, thanks :)
ab9bc49
to
5373bfd
Compare
@valeriocos Thanks for having a look. |
It's ok for me, maybe a no blocking bug in one of our repositories :
or :
|
Thank you @florentk for reporting this issue, would you mind to open an issue in graal repo? thanks |
Thank you @inishchith , I'm going to perform a test and report. |
@inishchith everything looks good. We should decide what to do with the default |
@valeriocos Thanks for testing the integration.
Sure. I'll get back to you on this, later today :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to ask you to modify the PR. When performing a full-chain test, I see that the index patterns weren't using the grimoirelab_creation_date
time field. Can you please add it? Thanks
Add appropriate logs for the enrichers Update CoCom Study method name Fix Tests Signed-off-by: inishchith <[email protected]>
5373bfd
to
effc887
Compare
@valeriocos Thanks. |
Thanks @inishchith |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @inishchith
@sduenas feel free to have a look at it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Address: inishchith/gsoc#9 & inishchith/gsoc#8
.csv
s of the CoLic and CoCom [ ref. git.csv ]