<commit_before># Get phenopolis and its submodule.
git clone https://github.com/pontikos/phenopolis.git
cd phenopolis
git submodule update --init --remote --recursive
cd varnorm
python setup.py install --user
cd ../..

# python packages required
pip install Cython==0.25.2 --install-option="--no-cython-compile" --user 
pip install -r phenopolis/requirements.txt --user

# Make sure mongodb is running
DBPATH=db
mkdir -p $DBPATH
mongod --dbpath $DBPATH --port 27017 &

# Basic build of db
# download minimal files
# import them
# create indexes

#wget --no-check-certificate https://uclex.cs.ucl.ac.uk/static/demo/hpo-hpo.json -O hpo-hpo.json
mongoimport --db hpo --collection hpo --file tests/data/hpo-hpo.json --drop
mongo hpo --eval "db.hpo.createIndex({'id' : 1})"
mongo hpo --eval "db.hpo.createIndex({'name' : 1})"

#wget --no-check-certificate https://uclex.cs.ucl.ac.uk/static/demo/uclex-genes.json -O uclex-genes.json
mongoimport --db uclex --collection genes --file tests/data/uclex-genes.json --drop
mongo uclex --eval "db.genes.createIndex({'gene_id' : 1})"
mongo uclex --eval "db.genes.createIndex({'gene_name_upper' : 1})"
mongo uclex --eval "db.genes.createIndex({'gene_name' : 1})"
mongo uclex --eval "db.genes.createIndex({'other_names' : 1})"
mongo uclex --eval "db.genes.createIndex({'xstart' : 1})"
mongo uclex --eval "db.genes.createIndex({'xstop' : 1})"

#wget --no-check-certificate https://uclex.cs.ucl.ac.uk/static/demo/uclex-simreg-TTLL5.json -O uclex-simreg-TTLL5.json
mongoimport --db uclex --collection simreg --file tests/data/uclex-simreg-TTLL5.json --drop
mongo uclex --eval "db.simreg.createIndex({'gene' : 1})"
mongo uclex --eval "db.simreg.createIndex({'mode' : 1})"<commit_msg>Submodule varnorm update changed to remove the --remote option, to match travis.yml. Added a cd phenopolis before getting data from the tests/data folder.<commit_after># Get phenopolis and its submodule.
git clone https://github.com/pontikos/phenopolis.git
cd phenopolis
git submodule update --init --recursive
cd varnorm
python setup.py install --user
cd ../..

# python packages required
pip install Cython==0.25.2 --install-option="--no-cython-compile" --user 
pip install -r phenopolis/requirements.txt --user

# Make sure mongodb is running
DBPATH=db
mkdir -p $DBPATH
mongod --dbpath $DBPATH --port 27017 &

# Basic build of db
# download minimal files
# import them
# create indexes
cd phenopolis

#wget --no-check-certificate https://uclex.cs.ucl.ac.uk/static/demo/hpo-hpo.json -O hpo-hpo.json
mongoimport --db hpo --collection hpo --file tests/data/hpo-hpo.json --drop
mongo hpo --eval "db.hpo.createIndex({'id' : 1})"
mongo hpo --eval "db.hpo.createIndex({'name' : 1})"

#wget --no-check-certificate https://uclex.cs.ucl.ac.uk/static/demo/uclex-genes.json -O uclex-genes.json
mongoimport --db uclex --collection genes --file tests/data/uclex-genes.json --drop
mongo uclex --eval "db.genes.createIndex({'gene_id' : 1})"
mongo uclex --eval "db.genes.createIndex({'gene_name_upper' : 1})"
mongo uclex --eval "db.genes.createIndex({'gene_name' : 1})"
mongo uclex --eval "db.genes.createIndex({'other_names' : 1})"
mongo uclex --eval "db.genes.createIndex({'xstart' : 1})"
mongo uclex --eval "db.genes.createIndex({'xstop' : 1})"

#wget --no-check-certificate https://uclex.cs.ucl.ac.uk/static/demo/uclex-simreg-TTLL5.json -O uclex-simreg-TTLL5.json
mongoimport --db uclex --collection simreg --file tests/data/uclex-simreg-TTLL5.json --drop
mongo uclex --eval "db.simreg.createIndex({'gene' : 1})"
mongo uclex --eval "db.simreg.createIndex({'mode' : 1})"
{'fraction_non_alphanumeric': 0.16433370660694288, 'fraction_numerical': 0.012318029115341545, 'mean_word_length': 3.907967032967033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2172542', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1309, 'n_words': 324}