<commit_before>#
# Simple Makefile for conviently testing, building and deploying experiment.
#
PROJECT = eprinttools

VERSION = $(shell grep -m 1 'Version =' $(PROJECT).go | cut -d\`  -f 2)

BRANCH = $(shell git branch | grep '* ' | cut -d\  -f 2)

OS = $(shell uname)

EXT = 
ifeq ($(OS), Windows)
        EXT = .exe
endif

QUICK =
ifeq ($(quick), true)
	QUICK = quick=true
endif

PROJECT_LIST = ep eputil epfmt doi2eprintxml eprintxml2json

build: package $(PROJECT_LIST)

package: eprinttools.go harvest/harvest.go eprint3x.go
	go build

ep: bin/ep$(EXT)

eputil: bin/eputil$(EXT)

epfmt: bin/epfmt$(EXT)

doi2eprintxml: bin/doi2eprintxml$(EXT) 

eprintxml2json: bin/eprintxml2json$(EXT)

bin/ep$(EXT): eprinttools.go harvest/harvest.go cmd/ep/ep.go
	go build -o bin/ep$(EXT) cmd/ep/ep.go

bin/eputil$(EXT): eprinttools.go harvest/harvest.go eprint3x.go cmd/eputil/eputil.go
	go build -o bin/eputil$(EXT) cmd/eputil/eputil.go

bin/epfmt$(EXT): eprinttools.go harvest/harvest.go eprint3x.go cmd/epfmt/epfmt.go
	go build -o bin/epfmt$(EXT) cmd/epfmt/epfmt.go

bin/doi2eprintxml$(EXT): eprinttools.go crossref.go datacite.go clsrules/clsrules.go cmd/doi2eprintxml/doi2eprintxml.go 
	go build -o bin/doi2eprintxml$(EXT) cmd/doi2eprintxml/doi2eprintxml.go

bin/eprintxml2json$(EXT): eprinttools.go eprint3x.go cmd/eprintxml2json/eprintxml2json.go 
	go build -o bin/eprintxml2json$(EXT) cmd/eprintxml2json/eprintxml2json.go

install: 
	env GOBIN=$(GOPATH)/bin go install cmd/ep/ep.go
	env GOBIN=$(GOPATH)/bin go install cmd/eputil/eputil.go
	env GOBIN=$(GOPATH)/bin go install cmd/epfmt/epfmt.go
	env GOBIN=$(GOPATH)/bin go install cmd/doi2eprintxml/doi2eprintxml.go
	env GOBIN=$(GOPATH)/bin go install cmd/eprintxml2json/eprintxml2json.go


website: page.tmpl README.md nav.md INSTALL.md LICENSE css/site.css docs/index.md docs/ep.md docs/eputil.md
	./mk-website.bash

test:
	go test -timeout 45m
	cd harvest && go test
	cd py && $(MAKE) test $(QUICK)
	./test_cmds.bash

clean:<commit_msg>depreciated both libeprint3 sub package and the py wrapper because of shared library issues on Mac OS X, use Caltech Library's AMES instead<commit_after>#
# Simple Makefile for conviently testing, building and deploying experiment.
#
PROJECT = eprinttools

VERSION = $(shell grep -m 1 'Version =' $(PROJECT).go | cut -d\`  -f 2)

BRANCH = $(shell git branch | grep '* ' | cut -d\  -f 2)

OS = $(shell uname)

EXT = 
ifeq ($(OS), Windows)
        EXT = .exe
endif

QUICK =
ifeq ($(quick), true)
	QUICK = quick=true
endif

PROJECT_LIST = ep eputil epfmt doi2eprintxml eprintxml2json

build: package $(PROJECT_LIST)

package: eprinttools.go harvest/harvest.go eprint3x.go
	go build

ep: bin/ep$(EXT)

eputil: bin/eputil$(EXT)

epfmt: bin/epfmt$(EXT)

doi2eprintxml: bin/doi2eprintxml$(EXT) 

eprintxml2json: bin/eprintxml2json$(EXT)

bin/ep$(EXT): eprinttools.go harvest/harvest.go cmd/ep/ep.go
	go build -o bin/ep$(EXT) cmd/ep/ep.go

bin/eputil$(EXT): eprinttools.go harvest/harvest.go eprint3x.go cmd/eputil/eputil.go
	go build -o bin/eputil$(EXT) cmd/eputil/eputil.go

bin/epfmt$(EXT): eprinttools.go harvest/harvest.go eprint3x.go cmd/epfmt/epfmt.go
	go build -o bin/epfmt$(EXT) cmd/epfmt/epfmt.go

bin/doi2eprintxml$(EXT): eprinttools.go crossref.go datacite.go clsrules/clsrules.go cmd/doi2eprintxml/doi2eprintxml.go 
	go build -o bin/doi2eprintxml$(EXT) cmd/doi2eprintxml/doi2eprintxml.go

bin/eprintxml2json$(EXT): eprinttools.go eprint3x.go cmd/eprintxml2json/eprintxml2json.go 
	go build -o bin/eprintxml2json$(EXT) cmd/eprintxml2json/eprintxml2json.go

install: 
	env GOBIN=$(GOPATH)/bin go install cmd/ep/ep.go
	env GOBIN=$(GOPATH)/bin go install cmd/eputil/eputil.go
	env GOBIN=$(GOPATH)/bin go install cmd/epfmt/epfmt.go
	env GOBIN=$(GOPATH)/bin go install cmd/doi2eprintxml/doi2eprintxml.go
	env GOBIN=$(GOPATH)/bin go install cmd/eprintxml2json/eprintxml2json.go


website: page.tmpl README.md nav.md INSTALL.md LICENSE css/site.css docs/index.md docs/ep.md docs/eputil.md
	./mk-website.bash

test:
	go test -timeout 45m
	cd harvest && go test
	./test_cmds.bash

clean:
{'fraction_non_alphanumeric': 0.12972972972972974, 'fraction_numerical': 0.01547911547911548, 'mean_word_length': 4.370712401055409, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 44}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2285489', 'n_tokens_mistral': 1744, 'n_tokens_neox': 1667, 'n_words': 368}