-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
020cbbb
to
eff1341
Compare
- 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
eff1341
to
49d04c1
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.
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, '.') |
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.
Why this?
self.name = "git" | ||
self.commits = Query(index) | ||
|
||
def get_section_metrics(self): |
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.
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.
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.
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 { |
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.
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.
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.
I am sorry, I don't get the reference here. What is JS like?
# | ||
|
||
import sys | ||
sys.path.insert(0, '..') |
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.
Same comment as above...
I forgot to say: please, in a separate PR, change also setup.py so that these files are installed when you run |
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! |
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?