<commit_before># all will build and install developer binaries, which have debugging enabled
# and much faster mining and block constants.
all: install

# dependencies installs all of the dependencies that are required for building
# Sia.
dependencies:
	# Consensus Dependencies
	go get -u github.com/NebulousLabs/demotemutex
	go get -u github.com/NebulousLabs/ed25519
	go get -u github.com/NebulousLabs/merkletree
	go get -u github.com/NebulousLabs/bolt
	go get -u github.com/dchest/blake2b
	# Module + Daemon Dependencies
	go get -u github.com/NebulousLabs/entropy-mnemonics
	go get -u github.com/NebulousLabs/go-upnp
	go get -u github.com/NebulousLabs/muxado
	go get -u github.com/klauspost/reedsolomon
	go get -u github.com/julienschmidt/httprouter
	# Frontend Dependencies
	go get -u github.com/bgentry/speakeasy
	go get -u github.com/spf13/cobra
	# Developer Dependencies
	go install -race std
	go get -u github.com/golang/lint/golint
	go get -u github.com/laher/goxc

# pkgs changes which packages the makefile calls operate on. run changes which
# tests are run during testing.
run = Test
pkgs = ./api ./build ./compatibility ./crypto ./encoding ./modules ./modules/consensus \
       ./modules/explorer ./modules/gateway ./modules/host ./modules/host/storagemanager \
	   ./modules/renter/hostdb ./modules/renter/contractor ./modules/miner ./modules/renter \
	   ./modules/wallet ./modules/transactionpool ./persist ./siac ./siad ./sync ./types

# fmt calls go fmt on all packages.
fmt:
	gofmt -s -l -w $(pkgs)

# vet calls go vet on all packages.
# NOTE: go vet requires packages to be built in order to obtain type info.
vet: release-std
	go vet $(pkgs)

# will always run on some packages for a while.
lintpkgs = ./modules/host ./modules ./modules/renter/hostdb ./modules/renter/contractor ./persist
lint:
	@for package in $(lintpkgs); do                           \
		golint -min_confidence=1.0 $$package                  \
		&& test -z $$(golint -min_confidence=1.0 $$package) ; \
	done

# install builds and installs developer binaries.
install:
	go install -race -tags='dev debug profile' $(pkgs)

# release builds and installs release binaries.
release:
	go install -tags='debug profile' $(pkgs)
release-race:
	go install -race -tags='debug profile' $(pkgs)
release-std:
	go install $(pkgs)

# xc builds and packages release binaries for all systems by using goxc.
# Cross Compile - makes binaries for windows, linux, and mac, 32 and 64 bit.
xc: dependencies test test-long
	goxc -arch="386 amd64 arm" -bc="darwin linux windows" -d=release \
	     -pv=v0.6.0 -br=beta -include=LICENSE,README.md,doc/API.md   \
	     -tasks-=archive,rmbin,deb,deb-dev,deb-source,go-test -n=Sia

# clean removes all directories that get automatically created during
# development.
clean:
	rm -rf release doc/whitepaper.aux doc/whitepaper.log doc/whitepaper.pdf

test:
	go test -short -tags='debug testing' -timeout=5s $(pkgs) -run=$(run)
test-v:
	go test -race -v -short -tags='debug testing' -timeout=15s $(pkgs) -run=$(run)
test-long: clean fmt vet lint
	go test -v -race -tags='testing debug' -timeout=300s $(pkgs) -run=$(run)
bench: clean fmt
	go test -tags='testing' -timeout=300s -run=XXX -bench=. $(pkgs)
cover: clean
	@mkdir -p cover/modules
	@mkdir -p cover/modules/renter
	@mkdir -p cover/modules/host
	@for package in $(pkgs); do                                                                                     \
		go test -tags='testing debug' -timeout=360s -covermode=atomic -coverprofile=cover/$$package.out ./$$package \
		&& go tool cover -html=cover/$$package.out -o=cover/$$package.html                                          \
		&& rm cover/$$package.out ;                                                                                 \
	done
cover-integration: clean
	@mkdir -p cover/modules
	@mkdir -p cover/modules/renter
	@mkdir -p cover/modules/host
	@for package in $(pkgs); do                                                                                     \
		go test -run=TestIntegration -tags='testing debug' -timeout=360s -covermode=atomic -coverprofile=cover/$$package.out ./$$package \
		&& go tool cover -html=cover/$$package.out -o=cover/$$package.html                                          \
		&& rm cover/$$package.out ;                                                                                 \
	done
cover-unit: clean
	@mkdir -p cover/modules
	@mkdir -p cover/modules/renter
	@mkdir -p cover/modules/host
	@for package in $(pkgs); do                                                                                     \
		go test -run=TestUnit -tags='testing debug' -timeout=360s -covermode=atomic -coverprofile=cover/$$package.out ./$$package \
		&& go tool cover -html=cover/$$package.out -o=cover/$$package.html                                          \
		&& rm cover/$$package.out ;                                                                                 \
	done

# whitepaper builds the whitepaper from whitepaper.tex. pdflatex has to be
# called twice because references will not update correctly the first time.
whitepaper:
	@pdflatex -output-directory=doc whitepaper.tex > /dev/null
	pdflatex -output-directory=doc whitepaper.tex

.PHONY: all dependencies fmt install release release-std xc clean test test-v test-long cover cover-integration cover-unit whitepaper
<commit_msg>give 10 mninutes for long tests<commit_after># all will build and install developer binaries, which have debugging enabled
# and much faster mining and block constants.
all: install

# dependencies installs all of the dependencies that are required for building
# Sia.
dependencies:
	# Consensus Dependencies
	go get -u github.com/NebulousLabs/demotemutex
	go get -u github.com/NebulousLabs/ed25519
	go get -u github.com/NebulousLabs/merkletree
	go get -u github.com/NebulousLabs/bolt
	go get -u github.com/dchest/blake2b
	# Module + Daemon Dependencies
	go get -u github.com/NebulousLabs/entropy-mnemonics
	go get -u github.com/NebulousLabs/go-upnp
	go get -u github.com/NebulousLabs/muxado
	go get -u github.com/klauspost/reedsolomon
	go get -u github.com/julienschmidt/httprouter
	# Frontend Dependencies
	go get -u github.com/bgentry/speakeasy
	go get -u github.com/spf13/cobra
	# Developer Dependencies
	go install -race std
	go get -u github.com/golang/lint/golint
	go get -u github.com/laher/goxc

# pkgs changes which packages the makefile calls operate on. run changes which
# tests are run during testing.
run = Test
pkgs = ./api ./build ./compatibility ./crypto ./encoding ./modules ./modules/consensus \
       ./modules/explorer ./modules/gateway ./modules/host ./modules/host/storagemanager \
	   ./modules/renter/hostdb ./modules/renter/contractor ./modules/miner ./modules/renter \
	   ./modules/wallet ./modules/transactionpool ./persist ./siac ./siad ./sync ./types

# fmt calls go fmt on all packages.
fmt:
	gofmt -s -l -w $(pkgs)

# vet calls go vet on all packages.
# NOTE: go vet requires packages to be built in order to obtain type info.
vet: release-std
	go vet $(pkgs)

# will always run on some packages for a while.
lintpkgs = ./modules/host ./modules ./modules/renter/hostdb ./modules/renter/contractor ./persist
lint:
	@for package in $(lintpkgs); do                           \
		golint -min_confidence=1.0 $$package                  \
		&& test -z $$(golint -min_confidence=1.0 $$package) ; \
	done

# install builds and installs developer binaries.
install:
	go install -race -tags='dev debug profile' $(pkgs)

# release builds and installs release binaries.
release:
	go install -tags='debug profile' $(pkgs)
release-race:
	go install -race -tags='debug profile' $(pkgs)
release-std:
	go install $(pkgs)

# xc builds and packages release binaries for all systems by using goxc.
# Cross Compile - makes binaries for windows, linux, and mac, 32 and 64 bit.
xc: dependencies test test-long
	goxc -arch="386 amd64 arm" -bc="darwin linux windows" -d=release \
	     -pv=v0.6.0 -br=beta -include=LICENSE,README.md,doc/API.md   \
	     -tasks-=archive,rmbin,deb,deb-dev,deb-source,go-test -n=Sia

# clean removes all directories that get automatically created during
# development.
clean:
	rm -rf release doc/whitepaper.aux doc/whitepaper.log doc/whitepaper.pdf

test:
	go test -short -tags='debug testing' -timeout=5s $(pkgs) -run=$(run)
test-v:
	go test -race -v -short -tags='debug testing' -timeout=15s $(pkgs) -run=$(run)
test-long: clean fmt vet lint
	go test -v -race -tags='testing debug' -timeout=600s $(pkgs) -run=$(run)
bench: clean fmt
	go test -tags='testing' -timeout=600s -run=XXX -bench=. $(pkgs)
cover: clean
	@mkdir -p cover/modules
	@mkdir -p cover/modules/renter
	@mkdir -p cover/modules/host
	@for package in $(pkgs); do                                                                                     \
		go test -tags='testing debug' -timeout=360s -covermode=atomic -coverprofile=cover/$$package.out ./$$package \
		&& go tool cover -html=cover/$$package.out -o=cover/$$package.html                                          \
		&& rm cover/$$package.out ;                                                                                 \
	done
cover-integration: clean
	@mkdir -p cover/modules
	@mkdir -p cover/modules/renter
	@mkdir -p cover/modules/host
	@for package in $(pkgs); do                                                                                     \
		go test -run=TestIntegration -tags='testing debug' -timeout=360s -covermode=atomic -coverprofile=cover/$$package.out ./$$package \
		&& go tool cover -html=cover/$$package.out -o=cover/$$package.html                                          \
		&& rm cover/$$package.out ;                                                                                 \
	done
cover-unit: clean
	@mkdir -p cover/modules
	@mkdir -p cover/modules/renter
	@mkdir -p cover/modules/host
	@for package in $(pkgs); do                                                                                     \
		go test -run=TestUnit -tags='testing debug' -timeout=360s -covermode=atomic -coverprofile=cover/$$package.out ./$$package \
		&& go tool cover -html=cover/$$package.out -o=cover/$$package.html                                          \
		&& rm cover/$$package.out ;                                                                                 \
	done

# whitepaper builds the whitepaper from whitepaper.tex. pdflatex has to be
# called twice because references will not update correctly the first time.
whitepaper:
	@pdflatex -output-directory=doc whitepaper.tex > /dev/null
	pdflatex -output-directory=doc whitepaper.tex

.PHONY: all dependencies fmt install release release-std xc clean test test-v test-long cover cover-integration cover-unit whitepaper

{'fraction_non_alphanumeric': 0.1085820895522388, 'fraction_numerical': 0.008022388059701492, 'mean_word_length': 2.2448547215496366, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 44, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1899423', 'n_tokens_mistral': 3318, 'n_tokens_neox': 3150, 'n_words': 999}