server icon indicating copy to clipboard operation
server copied to clipboard

feat(collection): generate a timeline when patch collection

Open TWT233 opened this issue 3 years ago • 15 comments

TWT233 avatar Sep 03 '22 06:09 TWT233

Deploy Preview for bangumi-org-server ready!

Name Link
Latest commit 55512a9fb9bb0fd3998fc4636e1807e555734a1c
Latest deploy log https://app.netlify.com/sites/bangumi-org-server/deploys/635650cc0c5b3100093214ea
Deploy Preview https://deploy-preview-217--bangumi-org-server.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Sep 03 '22 06:09 netlify[bot]

我不熟这里的逻辑,不知道patch collection req怎么转progress memo,有以前的代码看看不

TWT233 avatar Sep 03 '22 06:09 TWT233

Codecov Report

Base: 49.68% // Head: 50.04% // Increases project coverage by +0.35% :tada:

Coverage data is based on head (9074bdd) compared to base (d07f426). Patch coverage: 82.45% of modified lines in pull request are covered.

:exclamation: Current head 9074bdd differs from pull request most recent head 55512a9. Consider uploading reports for the commit 55512a9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #217      +/-   ##
==========================================
+ Coverage   49.68%   50.04%   +0.35%     
==========================================
  Files         197      198       +1     
  Lines        7797     7847      +50     
==========================================
+ Hits         3874     3927      +53     
+ Misses       3467     3461       -6     
- Partials      456      459       +3     
Impacted Files Coverage Δ
internal/model/subject.go 44.44% <ø> (ø)
internal/model/timeline.go 32.35% <ø> (+32.35%) :arrow_up:
internal/pkg/generic/math.go 0.00% <ø> (ø)
main.go 0.00% <ø> (ø)
internal/pkg/generic/conv.go 62.50% <62.50%> (ø)
internal/ctrl/update_subject_collection.go 68.14% <82.50%> (+6.04%) :arrow_up:
internal/ctrl/ctrl.go 100.00% <100.00%> (ø)
internal/subject/mysql_repository.go 58.08% <100.00%> (+0.25%) :arrow_up:
internal/timeline/image/image.go 73.64% <100.00%> (ø)
internal/timeline/mysql_repository.go 50.40% <100.00%> (ø)
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 03 '22 07:09 codecov[bot]

https://gist.github.com/Trim21/efcaad5233b08019b292615bd146b8a1 https://gist.github.com/Trim21/b930f98e000c7024b41de74f92d192aa

trim21 avatar Sep 03 '22 16:09 trim21

旧站好像不只检查上一条,会检查上一条同类的时间线然后修改。

在x集上点看到 image

设置完成度,会改写上一条时间线,就算中间插一条非同类时间线(吐槽)也会这样。 image

(忽略截图里的时间)

trim21 avatar Sep 03 '22 18:09 trim21

原来之前做的检查上一条timeline功能不止是为了dedupe,还为了这里的重新修改吗

TWT233 avatar Sep 05 '22 06:09 TWT233

是的,而且还会生成batch时间线

trim21 avatar Sep 05 '22 09:09 trim21

写错commit message了,force push了一下master

trim21 avatar Sep 07 '22 11:09 trim21

/ping

trim21 avatar Oct 03 '22 13:10 trim21

在旅游 国庆节后再动(

TWT233 avatar Oct 04 '22 12:10 TWT233

https://gist.github.com/Trim21/efcaad5233b08019b292615bd146b8a1

这里只有 subject 中插入 timeline 的代码,有没有 collection 的?

TWT233 avatar Oct 10 '22 07:10 TWT233

我之前是不是理解错了 这里应该生成的是 model.TimeLineSubjectMemo 而非 model.TimeLineProgressMemo

TWT233 avatar Oct 10 '22 07:10 TWT233

https://gist.github.com/Trim21/b930f98e000c7024b41de74f92d192aa#file-timeline-php-L668-L688

这里的获取用户端类型在重构版中有对应的函数吗

TWT233 avatar Oct 15 '22 08:10 TWT233

现在做完了patch collection时伴生的时间线,不过还没测,我补下测试

TWT233 avatar Oct 15 '22 09:10 TWT233

旧站好像不只检查上一条,会检查上一条同类的时间线然后修改。

这个逻辑还没补,不过应该新开一个PR做

TWT233 avatar Oct 15 '22 09:10 TWT233

/ping

TWT233 avatar Oct 20 '22 09:10 TWT233

能review了吗?我看还是draft就没看

trim21 avatar Oct 20 '22 09:10 trim21

https://gist.github.com/Trim21/b930f98e000c7024b41de74f92d192aa#file-timeline-php-L668-L688

这里的获取用户端类型在重构版中有对应的函数吗

没有

trim21 avatar Oct 20 '22 09:10 trim21

/pong (

trim21 avatar Oct 20 '22 22:10 trim21

还有些函数命名之类的要修修,剩下的都挪到后续的 mr 里做比较好:type progress 的时间线 / timeline.Create 合并 batch 时间线

TWT233 avatar Oct 21 '22 06:10 TWT233

先转 ready 好了,命名正好 review 的时候一起看看(

TWT233 avatar Oct 21 '22 06:10 TWT233

应该ok了,等一下ci

trim21 avatar Oct 24 '22 08:10 trim21