File: use-new-mpb.patch

package info (click to toggle)
seqkit 2.10.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 72,284 kB
  • sloc: sh: 940; perl: 114; makefile: 14
file content (81 lines) | stat: -rw-r--r-- 2,451 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Author: Maytham Alsudany <maytha8thedev@gmail.com>
Forwarded: no
Description: Use latest version of mpb
 Upstream uses v5 of mpb, whereas Debian packages the latest v8.

--- a/seqkit/cmd/stat.go
+++ b/seqkit/cmd/stat.go
@@ -43,8 +43,8 @@
 	mathutil "github.com/shenwei356/util/math"
 	"github.com/shenwei356/xopen"
 	"github.com/spf13/cobra"
-	"github.com/vbauerster/mpb/v5"
-	"github.com/vbauerster/mpb/v5/decor"
+	"github.com/vbauerster/mpb/v8"
+	"github.com/vbauerster/mpb/v8/decor"
 )
 
 // statCmd represents the stat command
@@ -155,9 +155,8 @@
 		if !config.Quiet && len(files) > 1 {
 			pbs = mpb.New(mpb.WithWidth(40), mpb.WithOutput(os.Stderr))
 			bar = pbs.AddBar(int64(len(files)),
-				mpb.BarStyle("[=>-]<+"),
 				mpb.PrependDecorators(
-					decor.Name("processed files: ", decor.WC{W: len("processed files: "), C: decor.DidentRight}),
+					decor.Name("processed files: ", decor.WC{W: len("processed files: "), C: decor.DindentRight}),
 					decor.Name("", decor.WCSyncSpaceR),
 					decor.CountersNoUnit("%d / %d", decor.WCSyncWidth),
 				),
@@ -173,7 +172,7 @@
 			go func() {
 				for t := range chDuration {
 					bar.Increment()
-					bar.DecoratorEwmaUpdate(t)
+					bar.EwmaIncrement(t)
 				}
 				doneDuration <- 1
 			}()
--- a/seqkit/cmd/sum.go
+++ b/seqkit/cmd/sum.go
@@ -27,7 +27,6 @@
 	"encoding/hex"
 	"fmt"
 	"io"
-	"os"
 	"path/filepath"
 	"runtime"
 	"sync"
@@ -39,8 +38,8 @@
 	"github.com/shenwei356/xopen"
 	"github.com/spf13/cobra"
 	"github.com/twotwotwo/sorts/sortutil"
-	"github.com/vbauerster/mpb/v5"
-	"github.com/vbauerster/mpb/v5/decor"
+	"github.com/vbauerster/mpb/v8"
+	"github.com/vbauerster/mpb/v8/decor"
 )
 
 // sumCmd represents the sum command
@@ -118,11 +117,9 @@
 		var doneDuration chan int
 
 		if !config.Quiet && len(files) > 1 {
-			pbs = mpb.New(mpb.WithWidth(40), mpb.WithOutput(os.Stderr))
 			bar = pbs.AddBar(int64(len(files)),
-				mpb.BarStyle("[=>-]<+"),
 				mpb.PrependDecorators(
-					decor.Name("processed files: ", decor.WC{W: len("processed files: "), C: decor.DidentRight}),
+					decor.Name("processed files: ", decor.WC{W: len("processed files: "), C: decor.DindentRight}),
 					decor.Name("", decor.WCSyncSpaceR),
 					decor.CountersNoUnit("%d / %d", decor.WCSyncWidth),
 				),
@@ -138,7 +135,7 @@
 			go func() {
 				for t := range chDuration {
 					bar.Increment()
-					bar.DecoratorEwmaUpdate(t)
+					bar.EwmaIncrement(t)
 				}
 				doneDuration <- 1
 			}()