Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion csvutil/csvdriver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func TestCreateRollback(t *testing.T) {

func TestOpenDriver(t *testing.T) {
for _, fname := range []string{
"https://github.com/go-hep/hep/raw/main/csvutil/csvdriver/testdata/types.csv",
"https://codeberg.org/go-hep/hep/raw/branch/main/csvutil/csvdriver/testdata/types.csv",
"testdata/types.csv",
} {
t.Run(fname, func(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions fit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Fit a gaussian

![h1d-gaussian-example](https://github.com/go-hep/hep/raw/main/fit/testdata/h1d-gauss-plot_golden.png)
![h1d-gaussian-example](https://codeberg.org/go-hep/hep/raw/branch/main/fit/testdata/h1d-gauss-plot_golden.png)

[embedmd]:# (hist_example_test.go go /func ExampleH1D_gaussian/ /\n}/)
```go
Expand Down Expand Up @@ -96,7 +96,7 @@ func ExampleH1D_gaussian() {

### Fit a gaussian

![func1d-gaussian-example](https://github.com/go-hep/hep/raw/main/fit/testdata/gauss-plot_golden.png)
![func1d-gaussian-example](https://codeberg.org/go-hep/hep/raw/branch/main/fit/testdata/gauss-plot_golden.png)

[embedmd]:# (curve1d_example_test.go go /func ExampleCurve1D_gaussian/ /\n}/)
```go
Expand Down Expand Up @@ -168,7 +168,7 @@ func ExampleCurve1D_gaussian() {

### Fit a powerlaw (with Y-errors)

![func1d-powerlaw-example](https://github.com/go-hep/hep/raw/main/fit/testdata/powerlaw-plot_golden.png)
![func1d-powerlaw-example](https://codeberg.org/go-hep/hep/raw/branch/main/fit/testdata/powerlaw-plot_golden.png)

[embedmd]:# (curve1d_example_test.go go /func ExampleCurve1D_powerlaw/ /\n}/)
```go
Expand Down Expand Up @@ -251,7 +251,7 @@ func ExampleCurve1D_powerlaw() {

### Fit an exponential

![func1d-exp-example](https://github.com/go-hep/hep/raw/main/fit/testdata/exp-plot_golden.png)
![func1d-exp-example](https://codeberg.org/go-hep/hep/raw/branch/main/fit/testdata/exp-plot_golden.png)

[embedmd]:# (curve1d_example_test.go go /func ExampleCurve1D_exponential/ /\n}/)
```go
Expand Down Expand Up @@ -325,7 +325,7 @@ func ExampleCurve1D_exponential() {

### Fit a polynomial

![func1d-poly-example](https://github.com/go-hep/hep/raw/main/fit/testdata/poly-plot_golden.png)
![func1d-poly-example](https://codeberg.org/go-hep/hep/raw/branch/main/fit/testdata/poly-plot_golden.png)

[embedmd]:# (curve1d_example_test.go go /func ExampleCurve1D_poly/ /\n}/)
```go
Expand Down Expand Up @@ -396,7 +396,7 @@ func ExampleCurve1D_poly() {
## Fitting with more than one independent variable (x has more than one dimension)
### Fit a flat plane

![2d-example](https://github.com/go-hep/hep/raw/main/fit/testdata/2d-plane-plot_golden.png)
![2d-example](https://codeberg.org/go-hep/hep/raw/branch/main/fit/testdata/2d-plane-plot_golden.png)

[embedmd]:# (curve_nd_example_test.go go /func ExampleCurveND_plane/ /\n}/)
```go
Expand Down
64 changes: 32 additions & 32 deletions groot/rsrv/rsrv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestOpenFile(t *testing.T) {
uri string
status int
}{
{"https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root", http.StatusOK},
{"https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root", http.StatusOK},
{"root://ccxrootdgotest.in2p3.fr:9001/tmp/rootio/testdata/simple.root", http.StatusOK},
{"file://" + local, http.StatusOK},
} {
Expand All @@ -90,8 +90,8 @@ func TestDoubleOpenFile(t *testing.T) {
ts := newTestServer()
defer ts.Close()

testOpenFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root", 0)
testOpenFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root", http.StatusConflict)
testOpenFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root", 0)
testOpenFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root", http.StatusConflict)
}

func testOpenFile(t *testing.T, ts *httptest.Server, uri string, status int) {
Expand Down Expand Up @@ -201,10 +201,10 @@ func TestCloseFile(t *testing.T) {
ts := newTestServer()
defer ts.Close()

testOpenFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root", 0)
testCloseFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root")
testOpenFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root", http.StatusOK)
testCloseFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root")
testOpenFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root", 0)
testCloseFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root")
testOpenFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root", http.StatusOK)
testCloseFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root")
}

func testCloseFile(t *testing.T, ts *httptest.Server, uri string) {
Expand Down Expand Up @@ -238,14 +238,14 @@ func TestListFiles(t *testing.T) {
ts := newTestServer()
defer ts.Close()

testOpenFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root", 0)
testOpenFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root", http.StatusOK)
testOpenFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root", 0)
testOpenFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root", http.StatusOK)
testListFiles(t, ts, []File{
{"https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root", 60600},
{"https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root", 61400},
{"https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root", 60600},
{"https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root", 61400},
})
testCloseFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root")
testCloseFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root")
testCloseFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root")
testCloseFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root")
}

func testListFiles(t *testing.T, ts *httptest.Server, want []File) {
Expand Down Expand Up @@ -290,23 +290,23 @@ func TestDirent(t *testing.T) {
ts := newTestServer()
defer ts.Close()

testOpenFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root", http.StatusOK)
defer testCloseFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root")
testOpenFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root", http.StatusOK)
defer testCloseFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root")

testDirent(t, ts, DirentRequest{
URI: "https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root",
URI: "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root",
Dir: "/",
Recursive: false,
}, []string{
"/",
"/tree",
})

testOpenFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root", http.StatusOK)
defer testCloseFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root")
testOpenFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root", http.StatusOK)
defer testCloseFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root")

testDirent(t, ts, DirentRequest{
URI: "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root",
URI: "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root",
Dir: "/",
Recursive: false,
}, []string{
Expand All @@ -316,7 +316,7 @@ func TestDirent(t *testing.T) {
"/dir3",
})
testDirent(t, ts, DirentRequest{
URI: "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root",
URI: "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root",
Dir: "/",
Recursive: true,
}, []string{
Expand All @@ -328,15 +328,15 @@ func TestDirent(t *testing.T) {
"/dir3",
})
testDirent(t, ts, DirentRequest{
URI: "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root",
URI: "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root",
Dir: "/dir1",
Recursive: false,
}, []string{
"/dir1",
"/dir1/dir11",
})
testDirent(t, ts, DirentRequest{
URI: "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root",
URI: "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root",
Dir: "/dir1",
Recursive: true,
}, []string{
Expand Down Expand Up @@ -394,7 +394,7 @@ func TestTree(t *testing.T) {
ts := newTestServer()
defer ts.Close()

const uri = "https://github.com/go-hep/hep/raw/main/groot/testdata/small-flat-tree.root"
const uri = "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/small-flat-tree.root"
testOpenFile(t, ts, uri, http.StatusOK)
defer testCloseFile(t, ts, uri)

Expand Down Expand Up @@ -505,10 +505,10 @@ func TestPlotH1(t *testing.T) {
ts := newTestServer()
defer ts.Close()

testOpenFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root", http.StatusOK)
defer testCloseFile(t, ts, "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root")
testOpenFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root", http.StatusOK)
defer testCloseFile(t, ts, "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root")

const uri = "https://github.com/go-hep/hep/raw/main/hbook/rootcnv/testdata/gauss-h1.root"
const uri = "https://codeberg.org/go-hep/hep/raw/branch/main/hbook/rootcnv/testdata/gauss-h1.root"
testOpenFile(t, ts, uri, http.StatusOK)
defer testCloseFile(t, ts, uri)

Expand All @@ -525,7 +525,7 @@ func TestPlotH1(t *testing.T) {
},
{
req: PlotH1Request{
URI: "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root",
URI: "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root",
Dir: "/dir1/dir11",
Obj: "h1",
},
Expand All @@ -550,7 +550,7 @@ func TestPlotH1(t *testing.T) {
},
{
req: PlotH1Request{
URI: "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root",
URI: "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root",
Dir: "/dir1/dir11",
Obj: "h1",
Options: PlotOptions{
Expand All @@ -561,7 +561,7 @@ func TestPlotH1(t *testing.T) {
},
{
req: PlotH1Request{
URI: "https://github.com/go-hep/hep/raw/main/groot/testdata/dirs-6.14.00.root",
URI: "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/dirs-6.14.00.root",
Dir: "/dir1/dir11",
Obj: "h1",
Options: PlotOptions{
Expand Down Expand Up @@ -641,7 +641,7 @@ func TestPlotH2(t *testing.T) {
ts := newTestServer()
defer ts.Close()

const uri = "https://github.com/go-hep/hep/raw/main/hbook/rootcnv/testdata/gauss-h2.root"
const uri = "https://codeberg.org/go-hep/hep/raw/branch/main/hbook/rootcnv/testdata/gauss-h2.root"
testOpenFile(t, ts, uri, http.StatusOK)
defer testCloseFile(t, ts, uri)

Expand Down Expand Up @@ -774,7 +774,7 @@ func TestPlotS2(t *testing.T) {
ts := newTestServer()
defer ts.Close()

const uri = "https://github.com/go-hep/hep/raw/main/groot/testdata/graphs.root"
const uri = "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/graphs.root"
testOpenFile(t, ts, uri, http.StatusOK)
defer testCloseFile(t, ts, uri)

Expand Down Expand Up @@ -910,7 +910,7 @@ func TestPlotTree(t *testing.T) {
ts := newTestServer()
defer ts.Close()

const uri = "https://github.com/go-hep/hep/raw/main/groot/testdata/small-flat-tree.root"
const uri = "https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/small-flat-tree.root"
testOpenFile(t, ts, uri, http.StatusOK)
defer testCloseFile(t, ts, uri)

Expand Down
2 changes: 1 addition & 1 deletion groot/rtree/tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func TestSimpleTree(t *testing.T) {
func TestSimpleTreeOverHTTP(t *testing.T) {
t.Parallel()

f, err := riofs.Open("https://github.com/go-hep/hep/raw/main/groot/testdata/simple.root")
f, err := riofs.Open("https://codeberg.org/go-hep/hep/raw/branch/main/groot/testdata/simple.root")
if err != nil {
t.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions hbook/ntup/ntcsv/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ func ExampleOpen() {

func ExampleOpen_fromRemote() {
// Open a new n-tuple pointing at a remote CSV file
// "https://github.com/go-hep/hep/raw/main/hbook/ntup/ntcsv/testdata/simple.csv"
// "https://codeberg.org/go-hep/hep/raw/branch/main/hbook/ntup/ntcsv/testdata/simple.csv"
// whose field separator is ';'.
// We rename the columns v1, v2 and v3.
nt, err := ntcsv.Open(
"https://github.com/go-hep/hep/raw/main/hbook/ntup/ntcsv/testdata/simple.csv",
"https://codeberg.org/go-hep/hep/raw/branch/main/hbook/ntup/ntcsv/testdata/simple.csv",
ntcsv.Comma(';'),
ntcsv.Columns("v1", "v2", "v3"),
)
Expand Down
2 changes: 1 addition & 1 deletion hbook/ntup/ntcsv/ntcsv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestOpen(t *testing.T) {
ntcsv.Columns("v1", "v2", "v3"),
},
},
{"https://github.com/go-hep/hep/raw/main/hbook/ntup/ntcsv/testdata/simple-with-header.csv", `i64, f64, str`,
{"https://codeberg.org/go-hep/hep/raw/branch/main/hbook/ntup/ntcsv/testdata/simple-with-header.csv", `i64, f64, str`,
[]ntcsv.Option{
ntcsv.Header(),
ntcsv.Columns("i64", "f64", "str"),
Expand Down
Loading
Loading