Closed Zzzzzhuzhiwei closed 1 year ago
Now I put the testdata
folder under the test
folder and first generate the SQL and results of issueClosed
.
Yes, this is exactly that I mean. And we definitely should design the naming rule here. I think we can all use underscore naming style. And all the parameters should be included in the file name to make sure no file data conflicts.
Do the file names and parameters in the file both need to use underscore naming style,and does the file name need to contain the parameters: OrgID, limit, startyear, startmonth, endyear, endmonth and groupTimeRange?
Do the file names and parameters in the file both need to use underscore naming style,and does the file name need to contain the parameters: OrgID, limit, startyear, startmonth, endyear, endmonth and groupTimeRange?
It depends on what we need to test. Org id is not necessary, year and month may not need to be included, just set to a constant is OK. But groupTimeRange is surely needed, and order, limit, limit type, group type(repo, org, label) are all needed.
issueClosed_desc_3_all_repo_month.json
,from front to back are metric, order, limit, limitoption, groupby, groupTimeRange. Is this file naming format acceptable?
issue_closed_...
is better, I think the metrics naming can be changed to underscore style too.
I will temporarily set the order
to desc
and the limitOption
to all
to generate the metric results, in order to avoid uncertainty in the results.
That's OK, actually for some metrics with the problem, we can skip for now.
I have added the testdata with determined results into files.
Hi @frank-zsy , could you please review my PR? Your feedback would be greatly appreciated!
@Zzzzzhuzhiwei Sure, I will review this PR today.
@Zzzzzhuzhiwei Actually we are already now using mocha
and ts
extension to run the unit tests, so can you change the js
file to ts
, because right now your test file are not running in npm test
command.
Thank you for your suggestion, I will change the js
file to ts
today.
hi @frank-zsy, I have changed the js
file to ts
, and my test file are running in npm test
command. Thank you for your guidance very much!
@Zzzzzhuzhiwei The result looks good, I think you can delete the old metrics.test.ts
and rename the new file to metrics.test.ts
.
All looks good now, thanks for the contribution~
/approve
In this issue #1266, I get the data of these seven metrics, and write the script to make sure the data is right.