cls_luigi.tests.test_inhabitation_task_repometa

Module Contents

Classes

StartNode

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

SomeAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

ConcreteClass4

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

SomeAbstractAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

ConcreteClass1

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

ConcreteClass2

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

ConcreteClass3

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

SomeOtherAbstractAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

ConcreteClassInAbstractChain

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

AbstractFromConcreteClassInChain

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

ConcreteClass5

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

ConcreteClass6

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

ConcreteClass7

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

UnrelatedAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

UnrelatedConcreteClass1

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

UnrelatedConcreteClass2

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

EndNode

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

EndEndNode

This is the base class of all Luigi Tasks, the base unit of work in Luigi.

WrapperTask

Abstract class representing a CLS-Luigi wrapper task. It combines the functionality of luigi.WrapperTask, LuigiCombinator, and ClsBaseTask.

TestRepositoryFilterMethods

A class whose instances are single test cases.

Functions

show_repository_and_subtypes_dict()

class cls_luigi.tests.test_inhabitation_task_repometa.StartNode(*args, **kwargs)[source]

Bases: cls_luigi.cls_tasks.ClsTask

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
output()[source]

The output that this Task produces.

The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single Target or a list of Target instances.

Implementation note

If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.

See Task.output

run()[source]

The task run method, to be overridden in a subclass.

See Task.run

class cls_luigi.tests.test_inhabitation_task_repometa.SomeAbstractClass(*args, **kwargs)[source]

Bases: cls_luigi.cls_tasks.ClsTask

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = True[source]
requires()[source]

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

output()[source]

The output that this Task produces.

The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single Target or a list of Target instances.

Implementation note

If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.

See Task.output

run()[source]

The task run method, to be overridden in a subclass.

See Task.run

class cls_luigi.tests.test_inhabitation_task_repometa.ConcreteClass4(*args, **kwargs)[source]

Bases: SomeAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.SomeAbstractAbstractClass(*args, **kwargs)[source]

Bases: SomeAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = True[source]
class cls_luigi.tests.test_inhabitation_task_repometa.ConcreteClass1(*args, **kwargs)[source]

Bases: SomeAbstractAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.ConcreteClass2(*args, **kwargs)[source]

Bases: SomeAbstractAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.ConcreteClass3(*args, **kwargs)[source]

Bases: SomeAbstractAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.SomeOtherAbstractAbstractClass(*args, **kwargs)[source]

Bases: SomeAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = True[source]
class cls_luigi.tests.test_inhabitation_task_repometa.ConcreteClassInAbstractChain(*args, **kwargs)[source]

Bases: SomeOtherAbstractAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.AbstractFromConcreteClassInChain(*args, **kwargs)[source]

Bases: ConcreteClassInAbstractChain

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = True[source]
class cls_luigi.tests.test_inhabitation_task_repometa.ConcreteClass5(*args, **kwargs)[source]

Bases: AbstractFromConcreteClassInChain

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.ConcreteClass6(*args, **kwargs)[source]

Bases: AbstractFromConcreteClassInChain

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.ConcreteClass7(*args, **kwargs)[source]

Bases: AbstractFromConcreteClassInChain

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.UnrelatedAbstractClass(*args, **kwargs)[source]

Bases: cls_luigi.cls_tasks.ClsTask

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = True[source]
some_class[source]
requires()[source]

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

output()[source]

The output that this Task produces.

The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single Target or a list of Target instances.

Implementation note

If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.

See Task.output

run()[source]

The task run method, to be overridden in a subclass.

See Task.run

class cls_luigi.tests.test_inhabitation_task_repometa.UnrelatedConcreteClass1(*args, **kwargs)[source]

Bases: UnrelatedAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.UnrelatedConcreteClass2(*args, **kwargs)[source]

Bases: UnrelatedAbstractClass

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
class cls_luigi.tests.test_inhabitation_task_repometa.EndNode(*args, **kwargs)[source]

Bases: cls_luigi.cls_tasks.ClsTask

Abstract class representing a CLS-Luigi task. It combines the functionality of luigi.Task, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
unreleated_class[source]
requires()[source]

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

output()[source]

The output that this Task produces.

The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single Target or a list of Target instances.

Implementation note

If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.

See Task.output

run()[source]

The task run method, to be overridden in a subclass.

See Task.run

class cls_luigi.tests.test_inhabitation_task_repometa.EndEndNode(*args, **kwargs)[source]

Bases: luigi.Task, cls_luigi.inhabitation_task.LuigiCombinator

This is the base class of all Luigi Tasks, the base unit of work in Luigi.

A Luigi Task describes a unit or work.

The key methods of a Task, which must be implemented in a subclass are:

  • run() - the computation done by this task.

  • requires() - the list of Tasks that this Task depends on.

  • output() - the output Target that this Task creates.

Each Parameter of the Task should be declared as members:

class MyTask(luigi.Task):
    count = luigi.IntParameter()
    second_param = luigi.Parameter()

In addition to any declared properties and methods, there are a few non-declared properties, which are created by the Register metaclass:

class cls_luigi.tests.test_inhabitation_task_repometa.WrapperTask(*args, **kwargs)[source]

Bases: cls_luigi.cls_tasks.ClsWrapperTask

Abstract class representing a CLS-Luigi wrapper task. It combines the functionality of luigi.WrapperTask, LuigiCombinator, and ClsBaseTask.

abstract = False[source]
config[source]
config_domain[source]
requires()[source]

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

class cls_luigi.tests.test_inhabitation_task_repometa.TestRepositoryFilterMethods(methodName='runTest')[source]

Bases: unittest.TestCase

A class whose instances are single test cases.

By default, the test code itself should be placed in a method named ‘runTest’.

If the fixture may be used for many test cases, create as many test methods as are needed. When instantiating such a TestCase subclass, specify in the constructor arguments the name of the test method that the instance is to execute.

Test authors should subclass TestCase for their own tests. Construction and deconstruction of the test’s environment (‘fixture’) can be implemented by overriding the ‘setUp’ and ‘tearDown’ methods respectively.

If it is necessary to override the __init__ method, the base class __init__ method must always be called. It is important that subclasses should not change the signature of their __init__ method, since instances of the classes are instantiated automatically by parts of the framework in order to be run.

When subclassing TestCase, you can set these attributes: * failureException: determines which exception will be raised when

the instance’s assertion methods fail; test methods raising this exception will be deemed to have ‘failed’ rather than ‘errored’.

  • longMessage: determines whether long messages (including repr of

    objects used in assert methods) will be printed on failure in addition to any explicit message passed.

  • maxDiff: sets the maximum length of a diff in failure messages

    by assert methods using difflib. It is looked up as an instance attribute so can be configured by individual tests if required.

classmethod tearDownClass()[source]

Hook method for deconstructing the class fixture after running all tests in the class.

test_get_list_of_all_upstream_classes_ConcreteClass3()[source]
test_get_list_of_all_upstream_classes_ConcreteClass4()[source]
test_get_list_of_all_upstream_classes_ConcreteClass5()[source]
test_get_list_of_all_upstream_abstract_classes_ConcreteClass3()[source]
test_get_list_of_all_upstream_abstract_classes_ConcreteClass5()[source]
test_get_list_of_all_upstream_abstract_classes_AbstractFromConcreteClassInChain()[source]
test_get_list_of_all_upstream_abstract_classes_ConcreteClassInAbstractChain()[source]
test_get_all_upstream_classes_ConcreteClass1()[source]
test_get_set_of_all_downstream_classes_ConcreteClassInAbstractChain()[source]
test_get_set_of_all_downstream_classes_SomeAbstractClass()[source]
test_get_all_downstream_abstract_classes_SomeAbstractClass()[source]
test_get_all_downstream_abstract_classes_UnrelatedAbstractClass()[source]
test_get_class_chain_SomeAbstractClass()[source]
test_get_class_chain_ConcreteClass5()[source]
test_get_abstract_class_chain_SomeAbstractClass()[source]
test_get_maximal_shared_upper_classes_ConcreteClass5_ConcreteClass6()[source]
test_get_maximal_shared_upper_classes_ConcreteClass2_ConcreteClass7()[source]
test_get_all_downstream_concrete_classes_ConcreteClassInAbstractChain()[source]
test_get_all_downstream_concrete_classes_SomeAbstractClass()[source]
test_filtered_repository_SomeAbstractAbstractClass()[source]
test_filtered_repository_ConcreteClass1_ConcreteClass2()[source]
test_filtered_repository_SomeOtherAbstractAbstractClass_UnrelatedConcreteClass1()[source]
test_filtered_repository_with_deep_filter()[source]
cls_luigi.tests.test_inhabitation_task_repometa.show_repository_and_subtypes_dict()[source]