<commit_before>#!/usr/bin/env bash

# Make sure to get exit status of last commant before the pipe
set -o pipefail


## install dependencies
echo "Installing system dependencies..."
source ${TM_HOME}/installation/ubuntu/install_dependencies.sh | tee ${TM_HOME}/.tm_install_deps.log

## Install all required R packages (or run Setup.R in RStudio)
echo "Installing required R packages"
${TM_HOME}/Setup.R | tee ${TM_HOME}/.tm_install_rsetup.log

## compile the parser needed to convert TissueAnalyzer outputs into csv
echo "Installing parser to read TissueAnlyzer outputs"
cd ${TM_HOME}/parser && make | tee ${TM_HOME}/.tm_install_parser.log<commit_msg>capture exit status and suggest advices<commit_after>#!/usr/bin/env bash

# Make sure to get exit status of last commant before the pipe
set -o pipefail

## install dependencies
echo "Installing system dependencies..."
source ${TM_HOME}/installation/ubuntu/install_dependencies.sh | tee ${TM_HOME}/.tm_install_deps.log

if [ $? -eq 1 ]; then
  echo "Install dependencies FAILED, please check that > R3.2 is available for your OS"
  exit 1
fi

## Install all required R packages (or run Setup.R in RStudio)
echo "Installing required R packages"
${TM_HOME}/Setup.R | tee ${TM_HOME}/.tm_install_rsetup.log

if [ $? -eq 1 ]; then
  echo "The R setup FAILED, please check ${TM_HOME}/.tm_install_rsetup.log"
  exit 1
fi

## compile the parser needed to convert TissueAnalyzer outputs into csv
echo "Installing parser to read TissueAnlyzer outputs"
cd ${TM_HOME}/parser && make | tee ${TM_HOME}/.tm_install_parser.log

if [ $? -eq 1 ]; then
  echo "The parser compilation FAILED, please check ${TM_HOME}/.tm_install_parser.log"
  exit 1
fi


{'fraction_non_alphanumeric': 0.10385756676557864, 'fraction_numerical': 0.004747774480712166, 'mean_word_length': 4.657718120805369, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2210719', 'n_tokens_mistral': 547, 'n_tokens_neox': 514, 'n_words': 188}