# Path: targetexplorer/utils.py
# def get_installed_resource_filepath(relative_path):
#     """Get the full path to one of the resource files shipped with TargetExplorer.
#     In the source distribution, these files are in ``targetexplorer/resources``,
#     but on installation, they are moved to somewhere in the user's python
#     site-packages directory.
#     This function uses the pkg_resources package to find the file within the installation directory
#     structure.
# 
#     Parameters
#     ----------
#     relative_path : str
#         Path of the file to load (relative to the ``targetexplorer`` source folder).
# 
#     Examples
#     --------
#     get_installed_resource_filename('resources/template-wsgi.py')
#     """
#     filepath = resource_filename(targetexplorer.__name__, relative_path)
#     if not os.path.exists(filepath):
#         raise ValueError(
#             "Sorry! {0} does not exist."
#             "If you just added it, you'll have to re-install".format(relative_path)
#         )
#     return filepath


import os
import shutil
import datetime
import targetexplorer
from targetexplorer.utils import get_installed_resource_filepath
from targetexplorer.core import write_yaml_file, logger, project_config_filename, database_filename
from targetexplorer.core import external_data_dirpath, wsgi_filename, manual_overrides_filename
        from targetexplorer.flaskapp import db, app
        from targetexplorer.flaskapp import db, models


class InitProject(object):
    def __init__(self, db_name=None, project_path=None,
                 uniprot_query='EXAMPLE... mnemonic:ABL1_HUMAN',
                 uniprot_domain_regex='EXAMPLE... ^Protein kinase(?!; truncated)(?!; inactive)',
                 ncrawls_to_save=5,
                 run_main=True
                 ):
        self.db_name = db_name
        self.project_path = os.getcwd() if project_path is None else project_path
        self.uniprot_query = uniprot_query
        self.uniprot_domain_regex = uniprot_domain_regex
        self.ncrawls_to_save = ncrawls_to_save

# Path: targetexplorer/utils.py
# def get_installed_resource_filepath(relative_path):
#     """Get the full path to one of the resource files shipped with TargetExplorer.
#     In the source distribution, these files are in ``targetexplorer/resources``,
#     but on installation, they are moved to somewhere in the user's python
#     site-packages directory.
#     This function uses the pkg_resources package to find the file within the installation directory
#     structure.
# 
#     Parameters
#     ----------
#     relative_path : str
#         Path of the file to load (relative to the ``targetexplorer`` source folder).
# 
#     Examples
#     --------
#     get_installed_resource_filename('resources/template-wsgi.py')
#     """
#     filepath = resource_filename(targetexplorer.__name__, relative_path)
#     if not os.path.exists(filepath):
#         raise ValueError(
#             "Sorry! {0} does not exist."
#             "If you just added it, you'll have to re-install".format(relative_path)
#         )
#     return filepath


# Path: targetexplorer/initproject.py
import os
import shutil
import datetime
import targetexplorer
from targetexplorer.utils import get_installed_resource_filepath
from targetexplorer.core import write_yaml_file, logger, project_config_filename, database_filename
from targetexplorer.core import external_data_dirpath, wsgi_filename, manual_overrides_filename
        from targetexplorer.flaskapp import db, app
        from targetexplorer.flaskapp import db, models



class InitProject(object):
    def __init__(self, db_name=None, project_path=None,
                 uniprot_query='EXAMPLE... mnemonic:ABL1_HUMAN',
                 uniprot_domain_regex='EXAMPLE... ^Protein kinase(?!; truncated)(?!; inactive)',
                 ncrawls_to_save=5,
                 run_main=True
                 ):
        self.db_name = db_name
        self.project_path = os.getcwd() if project_path is None else project_path
        self.uniprot_query = uniprot_query
        self.uniprot_domain_regex = uniprot_domain_regex
        self.ncrawls_to_save = ncrawls_to_save

        if run_main: