<commit_before>'''
Parsl
=====

Parallel Scripting Library, designed to enable efficient workflow execution.

Importing
---------

To get all the required functionality, we suggest importing the library as follows:

>>> import parsl
>>> from parsl import *

Logging
-------

Following the general logging philosophy of python libraries, by default `Parsl <https://github.com/swift-lang/swift-e-lab/>`_
doesn't log anything. However the following helper functions are provided for logging:

1. set_stream_logger
    This sets the logger to the StreamHandler. This is quite useful when working from
    a Jupyter notebook.

2. set_file_logger
    This sets the logging to a file. This is ideal for reporting issues to the dev team.

'''

from parsl.version import VERSION
from parsl.app.app import App
from parsl.executors.threads import ThreadPoolExecutor
from parsl.executors.ipp import IPyParallelExecutor

import parsl.execution_provider
import logging
#import parsl.app.errors

from parsl.dataflow.dflow import DataFlowKernel
from parsl.app.app_factory import AppFactoryFactory
APP_FACTORY_FACTORY = AppFactoryFactory('central')
#print(APP_FACTORY)

__author__  = '<NAME>'
__version__ = VERSION

__all__ = ['App', 'DataFlowKernel', 'ThreadPoolExecutor', 'IPyParallelExecutor']

def set_stream_logger(name='parsl', level=logging.DEBUG, format_string=None):
    '''
    Add a stream log handler

    Args:
         - name (string) : Set the logger name.
         - level (logging.LEVEL) : Set to logging.DEBUG by default.
         - format_string (sting) : Set to None by default.

    Returns:
         - None
    '''

    if format_string is None:<commit_msg>Adding file to default imports<commit_after>'''
Parsl
=====

Parallel Scripting Library, designed to enable efficient workflow execution.

Importing
---------

To get all the required functionality, we suggest importing the library as follows:

>>> import parsl
>>> from parsl import *

Logging
-------

Following the general logging philosophy of python libraries, by default `Parsl <https://github.com/swift-lang/swift-e-lab/>`_
doesn't log anything. However the following helper functions are provided for logging:

1. set_stream_logger
    This sets the logger to the StreamHandler. This is quite useful when working from
    a Jupyter notebook.

2. set_file_logger
    This sets the logging to a file. This is ideal for reporting issues to the dev team.

'''

from parsl.version import VERSION
from parsl.app.app import App
from parsl.executors.threads import ThreadPoolExecutor
from parsl.executors.ipp import IPyParallelExecutor
from parsl.data_provider.files import File

import parsl.execution_provider
import logging
#import parsl.app.errors

from parsl.dataflow.dflow import DataFlowKernel
from parsl.app.app_factory import AppFactoryFactory
APP_FACTORY_FACTORY = AppFactoryFactory('central')
#print(APP_FACTORY)

__author__  = '<NAME>'
__version__ = VERSION

__all__ = ['App', 'DataFlowKernel', 'ThreadPoolExecutor', 'IPyParallelExecutor']

def set_stream_logger(name='parsl', level=logging.DEBUG, format_string=None):
    '''
    Add a stream log handler

    Args:
         - name (string) : Set the logger name.
         - level (logging.LEVEL) : Set to logging.DEBUG by default.
         - format_string (sting) : Set to None by default.

    Returns:
         - None
    '''

    if format_string is None:
{'fraction_non_alphanumeric': 0.08687943262411348, 'fraction_numerical': 0.001182033096926714, 'mean_word_length': 3.9272197962154296, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 2, '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': '6093156', 'n_tokens_mistral': 972, 'n_tokens_neox': 954, 'n_words': 349}