Skip to content
This repository was archived by the owner on Nov 5, 2019. It is now read-only.

Commit d255174

Browse files
committed
prep for org switch
1 parent 599445f commit d255174

File tree

250 files changed

+40916
-21031
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

250 files changed

+40916
-21031
lines changed

.circleci/config.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '2'
22
jobs:
33
build:
4-
working_directory: /go/src/github.com/archivers-space/coverage
4+
working_directory: /go/src/github.com/datatogether/coverage
55
docker:
66
- image: circleci/cci-demo-go-primary:0.0.2
77
environment:
@@ -29,18 +29,18 @@ jobs:
2929
echo Failed waiting for Postgres && exit 1
3030
- run:
3131
name: Make test results directory
32-
command: mkdir -p /tmp/test-reports/archivers-space
32+
command: mkdir -p /tmp/test-reports/datatogether
3333
- run:
3434
name: Install dependencies
3535
command: go-wrapper download && go-wrapper install && go get -v github.com/jstemmer/go-junit-report
3636
- run:
3737
name: Run tests
38-
command: go test -v -race ./... | tee /tmp/test-reports/archivers-space/original.txt ; test ${PIPESTATUS[0]} -eq 0
38+
command: go test -v -race ./... | tee /tmp/test-reports/datatogether/original.txt ; test ${PIPESTATUS[0]} -eq 0
3939
- run:
4040
name: Convert test output to junit-style xml
41-
command: cat /tmp/test-reports/archivers-space/original.txt | go-junit-report > /tmp/test-reports/archivers-space/junit.xml
41+
command: cat /tmp/test-reports/datatogether/original.txt | go-junit-report > /tmp/test-reports/datatogether/junit.xml
4242
- store_test_results:
43-
path: /tmp/test-reports/archivers-space/junit.xml
43+
path: /tmp/test-reports/datatogether/junit.xml
4444
- setup_remote_docker
4545
- run:
4646
name: Install Docker client
@@ -57,8 +57,8 @@ jobs:
5757
command: |
5858
if [ $CIRCLE_BRANCH = 'master' ]; then
5959
TAG=0.1.$CIRCLE_BUILD_NUM
60-
docker build -t archivers/coverage:latest -t archivers/coverage:$TAG .
60+
docker build -t datatogether/coverage:latest -t datatogether/coverage:$TAG .
6161
docker login -u $DOCKER_USER -p $DOCKER_PASS
62-
docker push archivers/coverage:$TAG
63-
docker push archivers/coverage:latest
62+
docker push datatogether/coverage:$TAG
63+
docker push datatogether/coverage:latest
6464
fi

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.DS_Store
22
gin-bin
3-
content
3+
coverage
44
coverage.out
55
config.*.json
66
*.env

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ EXPOSE 3000
77
# RUN go-wrapper install github.com/codegangsta/gin
88

99
# Copy the local package files to the container’s workspace.
10-
ADD . /go/src/github.com/archivers-space/coverage
11-
# WORKDIR /go/src/github.com/archivers-space/coverage
10+
ADD . /go/src/github.com/datatogether/coverage
11+
# WORKDIR /go/src/github.com/datatogether/coverage
1212
# CMD ["gin", "-i"]
1313

1414
# Install api binary globally within container
15-
RUN go install github.com/archivers-space/coverage
15+
RUN go install github.com/datatogether/coverage
1616
# Set binary as entrypoint
1717
ENTRYPOINT /go/bin/coverage

Godeps/Godeps.json

Lines changed: 74 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
"fmt"
5-
conf "github.com/archivers-space/config"
5+
conf "github.com/datatogether/config"
66
"os"
77
"path/filepath"
88
)
@@ -101,7 +101,7 @@ func initConfig(mode string) (cfg *config, err error) {
101101
}
102102

103103
func packagePath(path string) string {
104-
return filepath.Join(os.Getenv("GOPATH"), "src/github.com/archivers-space/coverage", path)
104+
return filepath.Join(os.Getenv("GOPATH"), "src/github.com/datatogether/coverage", path)
105105
}
106106

107107
// requireConfigStrings panics if any of the passed in values aren't set

coverage/coverage.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package coverage
22

33
import (
4-
"github.com/archivers-space/archive"
5-
"github.com/archivers-space/coverage/repositories"
6-
"github.com/archivers-space/coverage/tree"
4+
"github.com/datatogether/archive"
5+
"github.com/datatogether/coverage/repositories"
6+
"github.com/datatogether/coverage/tree"
77

88
"encoding/json"
99
"io/ioutil"

coverage/coverage_requests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package coverage
22

33
import (
44
"fmt"
5-
"github.com/archivers-space/archive"
6-
"github.com/archivers-space/coverage/tree"
5+
"github.com/datatogether/archive"
6+
"github.com/datatogether/coverage/tree"
77
"net/url"
88
"strings"
99
)

coverage_handlers.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package main
22

33
import (
4-
"github.com/archivers-space/api/apiutil"
5-
"github.com/archivers-space/coverage/coverage"
6-
"github.com/archivers-space/coverage/tree"
4+
"github.com/datatogether/api/apiutil"
5+
"github.com/datatogether/coverage/coverage"
6+
"github.com/datatogether/coverage/tree"
77
"net/http"
88
"strconv"
99
"strings"

cron.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package main
22

33
import (
44
"database/sql"
5-
"github.com/archivers-space/archive"
6-
"github.com/archivers-space/coverage/coverage"
5+
"github.com/datatogether/archive"
6+
"github.com/datatogether/coverage/coverage"
77
"time"
88
)
99

@@ -56,7 +56,7 @@ func calcSourceCoverage(db *sql.DB) error {
5656

5757
numPages := count / pageSize
5858
for page := 0; page <= numPages; page++ {
59-
sources, err := archive.ListSources(db, pageSize, pageSize*page)
59+
sources, err := archive.ListSources(store, pageSize, pageSize*page)
6060
if err != nil {
6161
return err
6262
}
@@ -75,7 +75,7 @@ func calcSourceCoverage(db *sql.DB) error {
7575
s.Stats.ArchivedUrlCount = summary.Archived
7676
s.Stats.UrlCount = summary.Descendants
7777
log.Infof("updating source: %s - %s: %f%%", s.Id, s.Title, float32(summary.Archived)/float32(summary.Descendants)*100)
78-
if err := s.Save(db); err != nil {
78+
if err := s.Save(store); err != nil {
7979
return err
8080
}
8181
}
@@ -95,7 +95,7 @@ func calcPrimerSourceCoverage(db *sql.DB) error {
9595

9696
numPages := int(count) / pageSize
9797
for page := 0; page <= numPages; page++ {
98-
primers, err := archive.ListPrimers(db, pageSize, pageSize*page)
98+
primers, err := archive.ListPrimers(store, pageSize, pageSize*page)
9999
if err != nil {
100100
return err
101101
}
@@ -123,7 +123,7 @@ func calcPrimerSourceCoverage(db *sql.DB) error {
123123
p.Stats.SourcesUrlCount = urlCount
124124
p.Stats.SourcesArchivedUrlCount = archivedCount
125125
log.Infof("updating primer sources: %s - %s: %f%%", p.Id, p.ShortTitle, float32(p.Stats.SourcesArchivedUrlCount)/float32(p.Stats.SourcesUrlCount)*100)
126-
if err := p.Save(appDB); err != nil {
126+
if err := p.Save(store); err != nil {
127127
return err
128128
}
129129
}

0 commit comments

Comments
 (0)