<commit_before>####
#### Testing and release procedures for AmiGO JS.
####
#### A report-mistakes-only testing run can be done as:
####   make test | grep -i fail
####

METADATA ?= $(wildcard metadata/*.yaml)
TEST_JS ?= rhino # or smjs
## Use our local bbop-js.
TEST_JS_FLAGS ?= -modules external/bbop.js -modules javascript/staging/amigo2.js -opt -1
#JSENGINES = node smjs rhino
BBOP_JS ?= ../bbop-js/
JS_TESTS = \
 $(wildcard javascript/lib/amigo/*.js.tests) \
 $(wildcard javascript/lib/amigo/data/*.js.tests) \
 $(wildcard javascript/lib/amigo/ui/*.js.tests) \
 $(wildcard javascript/lib/amigo/handlers/*.js.tests)
#BENCHMARKS = $(wildcard _benchmark/*.js)

## Target setup for Makefile CLI unit testing
AMIGO ?= http://amigo.geneontology.org

## Perl lib test setup.
TEST_PERL ?= perl
TEST_PERL_FLAGS ?= -I ./perl/lib/
PERL_TESTS = \
 $(wildcard perl/lib/t/*.t)

## JSs for (currently) non-core purposes.
RINGO_JS ?= /usr/bin/ringo
NODE_JS ?= /usr/bin/node

## Handle versioning. The patch level is automatically incremented on
## after every release.
AMIGO_BASE_VERSION ?= 2.2
AMIGO_PATCH_LEVEL ?= `cat version-patch.lvl`
AMIGO_VERSION_TAG ?= "" # e.g. -alpha
AMIGO_VERSION ?= $(AMIGO_BASE_VERSION).$(AMIGO_PATCH_LEVEL)$(AMIGO_VERSION_TAG)

all:
	@echo "Default JS engine: $(TEST_JS)"
	@echo "See: http://wiki.geneontology.org/index.php/AmiGO_2_Manual:_Installation"
	@echo "for more details."
#	@echo "All JS engines: $(JSENGINES)"
#	@echo "Try make: 'test', 'docs', 'install', 'bundle', 'data', or 'release'"

###
### Tests.
###

.PHONY: test $(JS_TESTS)
test: $(JS_TESTS)<commit_msg>make labs the app testing default<commit_after>####
#### Testing and release procedures for AmiGO JS.
####
#### A report-mistakes-only testing run can be done as:
####   make test | grep -i fail
####

METADATA ?= $(wildcard metadata/*.yaml)
TEST_JS ?= rhino # or smjs
## Use our local bbop-js.
TEST_JS_FLAGS ?= -modules external/bbop.js -modules javascript/staging/amigo2.js -opt -1
#JSENGINES = node smjs rhino
BBOP_JS ?= ../bbop-js/
JS_TESTS = \
 $(wildcard javascript/lib/amigo/*.js.tests) \
 $(wildcard javascript/lib/amigo/data/*.js.tests) \
 $(wildcard javascript/lib/amigo/ui/*.js.tests) \
 $(wildcard javascript/lib/amigo/handlers/*.js.tests)
#BENCHMARKS = $(wildcard _benchmark/*.js)

## Target setup for Makefile CLI unit testing
#AMIGO ?= http://amigo.geneontology.org
AMIGO ?= http://amigo2.berkeleybop.org

## Perl lib test setup.
TEST_PERL ?= perl
TEST_PERL_FLAGS ?= -I ./perl/lib/
PERL_TESTS = \
 $(wildcard perl/lib/t/*.t)

## JSs for (currently) non-core purposes.
RINGO_JS ?= /usr/bin/ringo
NODE_JS ?= /usr/bin/node

## Handle versioning. The patch level is automatically incremented on
## after every release.
AMIGO_BASE_VERSION ?= 2.2
AMIGO_PATCH_LEVEL ?= `cat version-patch.lvl`
AMIGO_VERSION_TAG ?= "" # e.g. -alpha
AMIGO_VERSION ?= $(AMIGO_BASE_VERSION).$(AMIGO_PATCH_LEVEL)$(AMIGO_VERSION_TAG)

all:
	@echo "Default JS engine: $(TEST_JS)"
	@echo "See: http://wiki.geneontology.org/index.php/AmiGO_2_Manual:_Installation"
	@echo "for more details."
#	@echo "All JS engines: $(JSENGINES)"
#	@echo "Try make: 'test', 'docs', 'install', 'bundle', 'data', or 'release'"

###
### Tests.
###

.PHONY: test $(JS_TESTS)
test: $(JS_TESTS)
{'fraction_non_alphanumeric': 0.17262638717632553, 'fraction_numerical': 0.0033908754623921083, 'mean_word_length': 4.381426202321725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '7495265', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1245, 'n_words': 292}