ensembl-hive-python3  2.7.0
__init__.py
Go to the documentation of this file.
1 
2 # See the NOTICE file distributed with this work for additional information
3 # regarding copyright ownership.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 
17 """
18 Reference python3 implementation of eHive's "GuestLanguage" protocol.
19 
20 It allows to write Runnables in python3 and add them to standard eHive
21 pipelines, potentially alongside Perl Runnables.
22 
23 Like in Perl, analyses are given a module name, which must contain a class
24 of the same name. The class must inherit from eHive.BaseRunnable (see
25 eHive.examples.LongMult.DigitFactory for an example) and implement the
26 usual `fetch_input()`, `run()`, and / or `write_output()` methods.
27 
28 Runnables can use the eHive API (like `param()`). See eHive.BaseRunnable
29 for the list of available methods.
30 """
31 
32 # We take all the interesting classes from both modules, i.e. BaseRunnable and all the exceptions
33 from .process import BaseRunnable, CompleteEarlyException, JobFailedException, __version__
34 from .params import ParamException, ParamNameException, ParamSubstitutionException, ParamInfiniteLoopException, ParamWarning
35 from .tests import testRunnable, DataflowEvent, WarningEvent, CompleteEarlyEvent, FailureEvent
36 from .utils import find_module
37 
38 __all__ = [
39  'BaseRunnable', 'CompleteEarlyException', 'JobFailedException',
40  'ParamException', 'ParamNameException', 'ParamSubstitutionException', 'ParamInfiniteLoopException', 'ParamWarning',
41  'testRunnable', 'DataflowEvent', 'WarningEvent', 'CompleteEarlyEvent', 'FailureEvent',
42  'find_module',
43  '__version__',
44 ]