wengsy150943 / opensodaexcitingt2 Goto Github PK
View Code? Open in Web Editor NEWRepo for OpenSODA T2, team Exciting
License: Apache License 2.0
Repo for OpenSODA T2, team Exciting
License: Apache License 2.0
大家在这个issue里向上游要求接口吧。
应该包含:
需求函数的函数签名,返回的数据接口类型,哪些内容可以是nil,如果是string之类的不明确编码需要约定格式。
然后直接@对应的上游。
计划采取多协程并发读取,将metrics划分为n个不交叉的子集,每个协程访问对应的子集合并读取对应的metric数据,主进程等待协程同步完成,输出结果
请大家确认一下现在的文档,看看有没有什么地方是不对的或者要修改的。
除了标准要求的功能以外,这个CLI工具还可以提供什么功能?
下面是标准要求的功能:
讨论一下项目logo用什么,https://www.designevo.com/logo-maker/ 有这样的网站可以生成,有好的图可以在此分享
目前设计文档的主体已经基本完工,请大家阅读一下内容,然后提一下修改的意见。
请大家先回复一下是否完成了自己部分的内容,然后提一下对其他已完成部分的建议。请大家在周日中午前处理完对应的意见,我会在周日下午导出md文件并上传到仓库中。
基本功能都实现了,用真实数据测试时如果有bug请在此讨论
GetCertainUser接口返回UserInfo结构体
Username | Dates | Data |
---|---|---|
string | []string | map[string](map[string]interface{}) |
Data字段和repoinfo的Data字段一样
utils/parseusermetric中可以Parseuser将User中的Data解析为
Openrank | Activity | Developernetwork | Reponetwork |
---|---|---|---|
map[string](float64) | map[string](float64) | map[string]([]interface{}) | map[string]([]interface{}) |
这里[]interface{}其实还要再转换一下成[]interface{},但go不支持转换成[][]interface{} | 同Developernetwork | ||
如题
确定一下batch的开发目标:读csv文件,将读出来的数据转换成repoinfolist,然后经过filter/sort,将结果再写回文件?
@wengsy150943 @lh123cha
报错信息:panic: interface conversion: interface {} is []interface {}, not float32
问一下batch部分进度如何,传入的指标是否需要修改?请及时提醒我前端需要做什么调整,谢谢!
@lh123cha @YinZheng-Sun
以issue_response_time为例:{"avg":{"2020-08":149.29,"2020-09":1.5,"2020-10":0,"2020-11":114.11,"2020-12":74.67,"2021-01":294.67,"2021-02":0,"2021-03":3,"2021-04":55.92,"2021-05":9.5,"2021-06":405.2,"2021-07":55.25,"2021-08":155.6,"2021-11":1,"2021-12":161.36,"2022-01":84.12,"2022-02":0.6,"2022-03":76.47,"2022-04":1,"2022-05":34.5,"2022-06":40,"2022-07":0.33,"2022-08":0.33,"2022-09":24.78,"2022-10":2.12,"2022-11":55.96,"2022-12":53.17,"2023-01":27.5,"2023-02":68.93,"2023-03":30.12,"2023-04":8.88,"2023-05":8.45,"2023-06":6.12},"levels":{"2020-08":[6,0,0,1],"2020-09":[5,0,1,0],"2020-10":[3,0,0,0],"2020-11":[3,1,1,4],"2020-12":[5,0,0,1],"2021-01":[2,0,0,1],"2021-02":[3,0,0,0],"2021-03":[2,1,0,0],"2021-04":[9,1,1,2],"2021-05":[2,0,0,2],"2021-06":[8,1,0,26],"2021-07":[0,1,0,3],"2021-08":[1,0,0,4],"2021-11":[3,0,0,0],"2021-12":[5,0,2,4],"2022-01":[3,0,1,4],"2022-02":[5,0,0,0],"2022-03":[16,0,0,3],"2022-04":[4,1,0,0],"2022-05":[4,1,0,1],"2022-06":[13,0,0,2],"2022-07":[9,0,0,0],"2022-08":[3,0,0,0],"2022-09":[6,1,0,2],"2022-10":[14,1,0,1],"2022-11":[15,2,1,8],"2022-12":[7,0,0,5],"2023-01":[8,2,0,2],"2023-02":[6,1,0,7],"2023-03":[4,1,1,2],"2023-04":[8,5,2,2],"2023-05":[6,1,2,2],"2023-06":[3,2,2,1]}}
月份对应的metric value为 map哈希表{"avg":149.29, "levels":[6,0,0,1]...}
如题,对于issue_response_time的均值以及n分位数我采用了多折线图来表示,差个level
sqlite中存储的查询结果数据格式:
Uid | CreatedAt | Reponame | Repourl | Data |
---|---|---|---|---|
int | time | string | string | map |
sqlite中存储的历史查询数据格式:
Uid | CreatedAt | Log |
---|---|---|
int | time | string |
之前那个issue讨论的楼层太多了,哪些修复哪些没修复看不清,建议这个issue提出问题,解决后标注已解决,讨论在 #67 中讨论
@wengsy150943 @lh123cha @YinZheng-Sun
由于查询模块返回为map,downloadService.setData不再与数据类型一致,可能需要修改。
或由交互模块转换为string再调用setData?哪种方案更有利于输出模块的实现? @qkgoalkeeper
有大问题,repoinfoservice所有函数都需要metric作为参数,download在用户角度还需要可以实现查询一个repo迄今为止的全部metric的数据即全部数据(能在html中画几十张图那种),downloadservice中的图横坐标皆为dates:[2020-01,2020-02...],只传一个月根本画不出图就是个点
建议特定月份查询只适用于show没必要download,即使download了其内容也和show无区别
因此需要从getResult开始修改添加一个获取全部数据,month和metrics皆为空时获取全部数据,repoinfoservice实现相应函数
比如类似这个写一个全部月份的获取getrepoinfo(repo string)
(P.S.这个问题是我在测试downloadservicetest时发现的,发现没有api能画一系列图)
<img width="973" alt="image" src="https://github.com/wengsy150943/OpenSODAExcitingT2/assets/57783174/b86e1b56-c420-4eb0-8a21-3980cdf16934">
repoinfo 的 仓库名 RepoName似乎在用户只填写month不填写metric时会丢失用户信息,
例如go run ./main.go download -p all -r X-lab2017/open-digger
此时的reponame为X-lab2017/open-digger
go run ./main.go download -p metric1 -r X-lab2017/open-digger -m active_dates_and_times
此时的reponame为open-digger,这导致了仓库名不对
请检查repoinfoservice获取reponame的过程
Originally posted by @qkgoalkeeper in #78 (comment)
openrank | activity | developernetwork | reponetwork |
---|---|---|---|
map[string]float | map[string]float | map[string]([]interface{}) | map[string]([]interface{}) |
用户在每个月份的openrank值 | 用户在每个月份的activity值 | 用户与其他用户的网络关系 | 用户与仓库的网络关系 |
其中包含"nodes":[["username1",17.123],...] "edges":[["username1","username2","45.4564"]] |
同developernetwork |
问题:
发现11月开始,opendigger的api返回的日期不止有“2023-11”这样的“xxxx-xx”结构,其新添加了“2023”以及“2023Q1”这样的年度总结和季度总结,目前的代码中日期统一以“xxxx-xx”进行解析,因此现有的download功能及整体查询功能会受到影响,运行时会有日期错误的提示
解决方案:
获取RepoInfo的时候将不符合“xxxx-xx”的数据进行过滤,需要过滤Dates和Data中的日期数据
RepoInfo的位置为getrepoinfoservice.go line 16,各个获取RepoInfo的函数也在getrepoinfoservice.go中
根据测试结果可写个测试文档在doc/test.md中,测试格式大致如下:
测试1:(测试的功能)
示例输入:(命令行语句)
测试结果:(一张测试的图片)
issue_response_time:{"avg":{"2020-08":149.29,"2020-09":1.5,"2020-10":0,"2020-11":114.11,"2020-12":74.67,"2021-01":294.67,"2021-02":0,"2021-03":3,"2021-04":55.92,"2021-05":9.5,"2021-06":405.2,"2021-07":55.25,"2021-08":155.6,"2021-11":1,"2021-12":161.36,"2022-01":84.12,"2022-02":0.6,"2022-03":76.47,"2022-04":1,"2022-05":34.5,"2022-06":40,"2022-07":0.33,"2022-08":0.33,"2022-09":24.78,"2022-10":2.12,"2022-11":55.96,"2022-12":53.17,"2023-01":27.5,"2023-02":68.93,"2023-03":30.12,"2023-04":8.88,"2023-05":8.45,"2023-06":6.12},"levels":{"2020-08":[6,0,0,1],"2020-09":[5,0,1,0],"2020-10":[3,0,0,0],"2020-11":[3,1,1,4],"2020-12":[5,0,0,1],"2021-01":[2,0,0,1],"2021-02":[3,0,0,0],"2021-03":[2,1,0,0],"2021-04":[9,1,1,2],"2021-05":[2,0,0,2],"2021-06":[8,1,0,26],"2021-07":[0,1,0,3],"2021-08":[1,0,0,4],"2021-11":[3,0,0,0],"2021-12":[5,0,2,4],"2022-01":[3,0,1,4],"2022-02":[5,0,0,0],"2022-03":[16,0,0,3],"2022-04":[4,1,0,0],"2022-05":[4,1,0,1],"2022-06":[13,0,0,2],"2022-07":[9,0,0,0],"2022-08":[3,0,0,0],"2022-09":[6,1,0,2],"2022-10":[14,1,0,1],"2022-11":[15,2,1,8],"2022-12":[7,0,0,5],"2023-01":[8,2,0,2],"2023-02":[6,1,0,7],"2023-03":[4,1,1,2],"2023-04":[8,5,2,2],"2023-05":[6,1,2,2],"2023-06":[3,2,2,1]}}
月份对应的metric value为 map哈希表{"avg":149.29, "levels":[6,0,0,1]...}
大部分特殊的metric都有echart实现的思路,还剩这种value为map[string]interface{}要怎么画图,avg倒是可以画个柱状图,特别这个levels是每月一个list是什么意思,如何展示
git提交规范可以按照这个示例来,企业里都是这样的,看起来没那么乱 https://blog.csdn.net/qq_41444226/article/details/126846545
GetCertainMonth函数目前查询某些metric时存在bug,因为存在hash表里面又嵌套了hash表的情况,所以应该DFS所有hashtable,例如下面这种情况,如果只是简单遍历第一层的hashtable,最后会返回空值。此外,还有一些metric的结果是列表而并不是数值,应该做单独处理。
例如:查找
map[avg:map[2020-08:0.58 2020-09:0.09 2020-10:0.33 2020-11:0 2020-12:0.83 2021-01:0.18 2021-03:0.5 2021-04:0.47 2021-05:151.6 2021-06:1.43 2021-07:1 2021-11:0.33 2021-12:13 2022-01:2 2022-02:0 2022-03:0.07 2022-04:0.56 2022-05:52.57 2022-06:18.24 2022-07:22.07 2022-08:0.42 2022-09:1.2 2022-10:0.82 2022-11:1.11 2022-12:0.82 2023-01:51.24 2023-02:29.52 2023-03:0.67 2023-04:2 2023-05:1.92] levels:map[2020-08:[11 1 0 0] 2020-09:[11 0 0 0] 2020-10:[3 0 0 0] 2020-11:[4 0 0 0] 2020-12:[22 0 1 0] 2021-01:[17 0 0 0] 2021-03:[2 0 0 0] 2021-04:[14 1 0 0] 2021-05:[4 0 0 1] 2021-06:[6 0 1 0] 2021-07:[1 0 0 0] 2021-11:[3 0 0 0] 2021-12:[1 1 1 1] 2022-01:[3 0 1 0] 2022-02:[4 0 0 0] 2022-03:[28 0 0 0] 2022-04:[8 1 0 0] 2022-05:[6 0 0 1] 2022-06:[19 0 0 2] 2022-07:[14 0 0 1] 2022-08:[11 1 0 0] 2022-09:[8 2 0 0] 2022-10:[11 0 0 0] 2022-11:[17 2 0 0] 2022-12:[16 1 0 0] 2023-01:[18 0 0 11] 2023-02:[19 1 0 7] 2023-03:[8 1 0 0] 2023-04:[10 2 0 0] 2023-05:[10 2 1 0]] quantile_0:map[2020-08:0 2020-09:0 2020-10:0 2020-11:0 2020-12:0 2021-01:0 2021-03:0 2021-04:0 2021-05:0 2021-06:0 2021-07:1 2021-11:0 2021-12:0 2022-01:0 2022-02:0 2022-03:0 2022-04:0 2022-05:0 2022-06:0 2022-07:0 2022-08:0 2022-09:0 2022-10:0 2022-11:0 2022-12:0 2023-01:0 2023-02:0 2023-03:0 2023-04:0 2023-05:0] quantile_1:map[2020-08:0 2020-09:0 2020-10:0 2020-11:0 2020-12:0 2021-01:0 2021-03:0.25 2021-04:0 2021-05:0 2021-06:0 2021-07:1 2021-11:0 2021-12:3.75 2022-01:0 2022-02:0 2022-03:0 2022-04:0 2022-05:0 2022-06:0 2022-07:0 2022-08:0 2022-09:0 2022-10:0 2022-11:0 2022-12:0 2023-01:0 2023-02:0 2023-03:0 2023-04:1 2023-05:0] quantile_2:map[2020-08:0 2020-09:0 2020-10:0 2020-11:0 2020-12:0 2021-01:0 2021-03:0.5 2021-04:0 2021-05:0 2021-06:0 2021-07:1 2021-11:0 2021-12:6.5 2022-01:0 2022-02:0 2022-03:0 2022-04:0 2022-05:0 2022-06:0 2022-07:0 2022-08:0 2022-09:0 2022-10:0 2022-11:0 2022-12:0 2023-01:1 2023-02:0 2023-03:0 2023-04:2 2023-05:1] quantile_3:map[2020-08:1 2020-09:0 2020-10:0.5 2020-11:0 2020-12:0.5 2021-01:0 2021-03:0.75 2021-04:0 2021-05:3 2021-06:1 2021-07:1 2021-11:0.5 2021-12:15.75 2022-01:2 2022-02:0 2022-03:0 2022-04:0 2022-05:1 2022-06:1 2022-07:0 2022-08:0 2022-09:0 2022-10:1.5 2022-11:1 2022-12:1 2023-01:126 2023-02:51.5 2023-03:1 2023-04:3 2023-05:3] quantile_4:map[2020-08:4 2020-09:1 2020-10:1 2020-11:0 2020-12:12 2021-01:1 2021-03:1 2021-04:5 2021-05:755 2021-06:8 2021-07:1 2021-11:1 2021-12:39 2022-01:8 2022-02:0 2022-03:1 2022-04:5 2022-05:366 2022-06:355 2022-07:329 2022-08:4 2022-09:7 2022-10:3 2022-11:7 2022-12:4 2023-01:148 2023-02:120 2023-03:4 2023-04:4 2023-05:8]]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.