New Upstream Release - golang-github-vividcortex-ewma

Ready changes

Summary

Merged new upstream version: 1.2.0 (was: 1.1.1).

Resulting package

Built on 2023-04-30T11:03 (took 10m24s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases golang-github-vividcortex-ewma-dev

Lintian Result

Diff

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..a63f405
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,56 @@
+name: build
+
+on:
+  push:
+    branches:
+      - master
+    paths-ignore:
+      - .github/**
+      - .gitignore
+      - .whitesource
+      - codecov.yml
+      - README.md
+  pull_request:
+    paths-ignore:
+      - .github/**
+      - .gitignore
+      - .whitesource
+      - codecov.yml
+      - README.md
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - go: 1.15
+            build-with: true
+          - go: 1.16
+            build-with: false
+    continue-on-error: ${{ matrix.build-with == false }}
+    name: Build with ${{ matrix.go }}
+    env:
+      GO111MODULE: on
+
+    steps:
+    - name: Set up Go
+      uses: actions/setup-go@v1
+      with:
+        go-version: ${{ matrix.go }}
+
+    - name: Checkout code
+      uses: actions/checkout@v2
+
+    - name: Vet
+      run: go vet ./...
+
+    - name: Test
+      run: go test -vet=off -race -coverprofile=coverage.txt -covermode=atomic ./...
+
+    - name: Upload code coverage report
+      if: matrix.build-with == true
+      env:
+        CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
+      run: bash <(curl -s https://raw.githubusercontent.com/VividCortex/codecov-bash/master/codecov)
diff --git a/.gitignore b/.gitignore
index 6c7104a..c66769f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 .DS_Store
 .*.sw?
+/coverage.txt
\ No newline at end of file
diff --git a/.whitesource b/.whitesource
new file mode 100644
index 0000000..d7eebc0
--- /dev/null
+++ b/.whitesource
@@ -0,0 +1,3 @@
+{
+  "settingsInheritedFrom": "VividCortex/whitesource-config@master"
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 7aab61b..87b4a3c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,8 @@
-# EWMA [![GoDoc](https://godoc.org/github.com/VividCortex/ewma?status.svg)](https://godoc.org/github.com/VividCortex/ewma) ![Build Status](https://circleci.com/gh/VividCortex/moving_average.png?circle-token=1459fa37f9ca0e50cef05d1963146d96d47ea523)
+# EWMA
+
+[![GoDoc](https://godoc.org/github.com/VividCortex/ewma?status.svg)](https://godoc.org/github.com/VividCortex/ewma)
+![build](https://github.com/VividCortex/ewma/workflows/build/badge.svg)
+[![codecov](https://codecov.io/gh/VividCortex/ewma/branch/master/graph/badge.svg)](https://codecov.io/gh/VividCortex/ewma)
 
 This repo provides Exponentially Weighted Moving Average algorithms, or EWMAs for short, [based on our
 Quantifying Abnormal Behavior talk](https://vividcortex.com/blog/2013/07/23/a-fast-go-library-for-exponential-moving-averages/).
@@ -103,23 +107,24 @@ View the GoDoc generated documentation [here](http://godoc.org/github.com/VividC
 
 ```go
 package main
+
 import "github.com/VividCortex/ewma"
 
 func main() {
-  samples := [100]float64{
-    4599, 5711, 4746, 4621, 5037, 4218, 4925, 4281, 5207, 5203, 5594, 5149,
-  }
+	samples := [100]float64{
+		4599, 5711, 4746, 4621, 5037, 4218, 4925, 4281, 5207, 5203, 5594, 5149,
+	}
 
-  e := ewma.NewMovingAverage()       //=> Returns a SimpleEWMA if called without params
-  a := ewma.NewMovingAverage(5)      //=> returns a VariableEWMA with a decay of 2 / (5 + 1)
+	e := ewma.NewMovingAverage()  //=> Returns a SimpleEWMA if called without params
+	a := ewma.NewMovingAverage(5) //=> returns a VariableEWMA with a decay of 2 / (5 + 1)
 
-  for _, f := range samples {
-    e.Add(f)
-    a.Add(f)
-  }
+	for _, f := range samples {
+		e.Add(f)
+		a.Add(f)
+	}
 
-  e.Value() //=> 13.577404704631077
-  a.Value() //=> 1.5806140565521463e-12
+	e.Value() //=> 13.577404704631077
+	a.Value() //=> 1.5806140565521463e-12
 }
 ```
 
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 0000000..0d36d90
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,6 @@
+coverage:
+  status:
+    project:
+      default:
+        threshold: 15%
+    patch: off
diff --git a/debian/changelog b/debian/changelog
index c379016..68c06ca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-github-vividcortex-ewma (1.2.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sun, 30 Apr 2023 10:53:30 -0000
+
 golang-github-vividcortex-ewma (1.1.1-2) unstable; urgency=medium
 
   [ Debian Janitor ]
diff --git a/ewma_test.go b/ewma_test.go
index 8060a85..a6cd37b 100644
--- a/ewma_test.go
+++ b/ewma_test.go
@@ -36,7 +36,7 @@ func TestSimpleEWMA(t *testing.T) {
 	}
 	e.Set(1.0)
 	if e.Value() != 1.0 {
-		t.Errorf("e.Value() is %d", e.Value())
+		t.Errorf("e.Value() is %v", e.Value())
 	}
 }
 
@@ -50,7 +50,7 @@ func TestVariableEWMA(t *testing.T) {
 	}
 	e.Set(1.0)
 	if e.Value() != 1.0 {
-		t.Errorf("e.Value() is %d", e.Value())
+		t.Errorf("e.Value() is %v", e.Value())
 	}
 }
 
@@ -80,7 +80,7 @@ func TestVariableEWMAWarmup(t *testing.T) {
 	e.Set(5)
 	e.Add(1)
 	if e.Value() >= 5 {
-		t.Errorf("e.Value() is %d, expected it to decay towards 0", e.Value())
+		t.Errorf("e.Value() is %v, expected it to decay towards 0", e.Value())
 	}
 }
 
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..e481e3d
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module github.com/VividCortex/ewma
+
+go 1.12

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/share/gocode/src/github.com/VividCortex/ewma/go.mod

No differences were encountered in the control files

More details

Full run details