<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of sbpipe.
#
# sbpipe is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# sbpipe is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with sbpipe.  If not, see <http://www.gnu.org/licenses/>.
#
#
# Object: sbpipe main 
#
# $Revision: 1.0 $
# $Author: <NAME> $
# $Date: 2016-06-27 10:18:32 $

# NOTE: 
# don't name this file: __init__.py or sbpipe.py . 
# They both cause a conflict when these are invoked from the tests

import os
import sys
import getopt

import logging
from logging.config import fileConfig

SBPIPE = os.environ["SBPIPE"]
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "create_project"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "simulate"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "param_estim"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "single_param_scan"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "double_param_scan"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "sensitivity"))

# pipelines
from create_project import CreateProject
from simulate import Simulate
from param_estim import ParamEstim
from single_param_scan import SingleParamScan
from double_param_scan import DoubleParamScan
from sensitivity import Sensitivity


def get_sbpipe_logo():
    """
  	Return sbpipe logo.

  	:return: sbpipe logo
  	"""
    logo = (
            "\n"
            "                            _             \n"
            "          /\               (_)            \n"
            "    ___  / /_        ____    ____  ___    \n"
            "   / __\/ __ \      / __ \/\/ __ \/ _ \   \n"
            "  _\ \_/ /_/ /     / /_/ / / /_/ /  __/   \n"
            " \____/\____/     / ____/_/ ____/\____/   \n"
            "            -----/ /     / /              \n"
            "                /_/     /_/               \n"
            )
    return logo


def get_sbpipe_help():
    """
    Return help message.

    :return: the help message
    """
    message = (
               "Usage: run_sbpipe.py [OPTION] [FILE]\n"
               "Pipelines for systems modelling of biological networks.\n\n"
               "List of mandatory options:\n"
               "\t-h, --help\n\t\tShows this help.\n"
               "\t-c, --create-project\n\t\tCreate a project structure using the argument as name.\n"
               "\t-s, --simulate\n\t\tSimulate a model.\n"
               "\t-p, --single-param-scan\n\t\tSimulate a single parameter scan.\n"
               "\t-d, --double-param-scan\n\t\tSimulate a double parameter scan.\n"
               "\t-e, --param-estim\n\t\tGenerate a parameter fit sequence.\n"
               #"\t-n, --sensitivity\n\t\tRun a sensitivity analysis (in progress).\n\n"
               "Exit status:\n"
               " 0  if OK,\n"
               " 1  if minor problems (e.g., a pipeline did not execute correctly),\n"
               " 2  if serious trouble (e.g., cannot access command-line argument).\n\n"
               "Report bugs to <EMAIL>\n"
               "sbpipe home page: <https://pdp10.github.io/sbpipe>\n"
               "For complete documentation, see README.md .\n"
              )<commit_msg>added license and version options<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of sbpipe.
#
# sbpipe is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# sbpipe is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with sbpipe.  If not, see <http://www.gnu.org/licenses/>.
#
#
# Object: sbpipe main 
#
# $Revision: 1.0 $
# $Author: <NAME> $
# $Date: 2016-06-27 10:18:32 $

# NOTE: 
# don't name this file: __init__.py or sbpipe.py . 
# They both cause a conflict when these are invoked from the tests

import os
import sys
import getopt

import logging
from logging.config import fileConfig

SBPIPE = os.environ["SBPIPE"]
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "create_project"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "simulate"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "param_estim"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "single_param_scan"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "double_param_scan"))
sys.path.append(os.path.join(SBPIPE, "sbpipe", "pipelines", "sensitivity"))

# pipelines
from create_project import CreateProject
from simulate import Simulate
from param_estim import ParamEstim
from single_param_scan import SingleParamScan
from double_param_scan import DoubleParamScan
from sensitivity import Sensitivity


def get_sbpipe_logo():
    """
  	Return sbpipe logo.

  	:return: sbpipe logo
  	"""
    logo = (
            "\n"
            "                            _             \n"
            "          /\               (_)            \n"
            "    ___  / /_        ____    ____  ___    \n"
            "   / __\/ __ \      / __ \/\/ __ \/ _ \   \n"
            "  _\ \_/ /_/ /     / /_/ / / /_/ /  __/   \n"
            " \____/\____/     / ____/_/ ____/\____/   \n"
            "            -----/ /     / /              \n"
            "                /_/     /_/               \n"
            )
    return logo


def get_sbpipe_help():
    """
    Return help message.

    :return: the help message
    """
    message = (
               "Usage: run_sbpipe.py [OPTION] [FILE]\n"
               "Pipelines for systems modelling of biological networks.\n\n"
               "List of mandatory options:\n"
               "\t-h, --help\n\t\tShows this help.\n"
               "\t-c, --create-project\n\t\tCreate a project structure using the argument as name.\n"
               "\t-s, --simulate\n\t\tSimulate a model.\n"
               "\t-p, --single-param-scan\n\t\tSimulate a single parameter scan.\n"
               "\t-d, --double-param-scan\n\t\tSimulate a double parameter scan.\n"
               "\t-e, --param-estim\n\t\tGenerate a parameter fit sequence.\n"
               #"\t-n, --sensitivity\n\t\tRun a sensitivity analysis (in progress).\n\n"
               "\t-l, --license\n\t\tShows the license.\n"
               "\t-v, --version\n\t\tShows the version.\n"               
               "Exit status:\n"
               " 0  if OK,\n"
               " 1  if minor problems (e.g., a pipeline did not execute correctly),\n"
               " 2  if serious trouble (e.g., cannot access command-line argument).\n\n"
               "Report bugs to <EMAIL>\n"
               "sbpipe home page: <https://pdp10.github.io/sbpipe>\n"
               "For complete documentation, see README.md .\n"
              )
{'fraction_non_alphanumeric': 0.12895538196743017, 'fraction_numerical': 0.006090295246921753, 'mean_word_length': 1.9031514219830898, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2601312', 'n_tokens_mistral': 2411, 'n_tokens_neox': 2318, 'n_words': 672}