Skip to content
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

Add initial infrastructure to generate a report using new functions and classes #73

Merged
merged 1 commit into from
Jul 15, 2018

Conversation

aswanipranjal
Copy link
Contributor

@aswanipranjal aswanipranjal commented Jul 13, 2018

This PR is adds the initial files to generate the reports.

Right now only one CSV file is being generated in a PERCEVAL_TEST folder in the grimoirelab-mansucripts dir (main dir)
The bin/manuscripts2 script has hard coded git, github_issues, github_prs data sources for commit, issues and pull requests data.

This PR is to discuss if the infrastructure I am proposing is okay or it requires some changes (it probably does).

@jgbarah please take a look at this?

- manuscripts2/metrics folder containing files for different metrics
- bin/manuscripts2 to generate report from new_functions
- manuscripts2/report.py to create the report using Report class
Copy link
Contributor

@jgbarah jgbarah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I think this is a good start. Please, have a look at the comments, and if you can, fix them in subsequent PRs. For now, I'm approving (and merging) this one. Please, produce also a PR with tests, and from now on, try to have tests in the same PR where you add new features.

#

import sys
sys.path.insert(0, '.')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this?

self.name = "git"
self.commits = Query(index)

def get_section_metrics(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're going to need parameters here... Maybe you could start with some, just to make it clear how that would work? For example, a since parameter, which would make all metrics to be computed since that date.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @jgbarah you are right, each class will need a start and end date to configure the range in which to search/query for data. Thanks for pointing it out!


def get_section_metrics(self):

return {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very much JavaScript-like ;-) I'm not completely sure yet, but I think we could improve it. But for now, that's ok with me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry, I don't get the reference here. What is JS like?

#

import sys
sys.path.insert(0, '..')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above...

@jgbarah jgbarah merged commit 051562a into chaoss:master Jul 15, 2018
@jgbarah
Copy link
Contributor

jgbarah commented Jul 15, 2018

I forgot to say: please, in a separate PR, change also setup.py so that these files are installed when you run pip install -e .

@aswanipranjal
Copy link
Contributor Author

Thank you for merging this PR! One reason I didn't write the tests because I wasn't sure if this was the right approach or not.

I'll keep the above comment in mind and include the tests in the future. Thanks again!

@aswanipranjal aswanipranjal changed the title [WIP] Add initial infrastructure to generate a report using new functions and classes Add initial infrastructure to generate a report using new functions and classes Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants