ProvenanceContext.log()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
1
from niprov.dependencies import Dependencies
2
from niprov.config import Configuration
3
import niprov
4
5
6
class ProvenanceContext(object):
7
8
    def __init__(self):
9
        self.config = Configuration()
10
        self.deps = Dependencies(self.config)
11
12
    def add(self, filepath, transient=False, provenance=None):
13
        """See :py:mod:`niprov.adding`  """
14
        return niprov.adding.add(filepath, transient, provenance, self.deps)
15
16
    def approve(self, filepath):
17
        """See :py:mod:`niprov.approval`  """
18
        return niprov.approval.approve(filepath, dependencies=self.deps)
19
20
    def backup(self):
21
        """See :py:mod:`niprov.exporting`  """
22
        return niprov.exporting.backup(self.deps)
23
24
    def compare(self, file1, file2):
25
        """See :py:mod:`niprov.comparing`  """
26
        return niprov.comparing.compare(file1, file2, dependencies=self.deps)
27
28
    def discover(self, root):
29
        """See :py:mod:`niprov.discovery`  """
30
        return niprov.discovery.discover(root, dependencies=self.deps)
31
32
    def export(self, images, medium, form, pipeline=False):
33
        """See :py:mod:`niprov.exporting`  """
34
        return niprov.exporting.export(images, medium, form, pipeline, 
35
            self.deps)
36
37
    def get(self):
38
        """See :py:mod:`niprov.querying`  """
39
        return self.deps.getQuery()
40
41
    def importp(self, fpath):
42
        """See :py:mod:`niprov.importing`  """
43
        return niprov.importing.importp(fpath, self.deps)
44
45
    def inspect(self, location):
46
        """See :py:mod:`niprov.inspection`  """
47
        return niprov.inspection.inspect(location, dependencies=self.deps)
48
49
    def log(self, new, transformation, parents, code=None, logtext=None, 
50
            transient=False, script=None, user=None, provenance=None, 
51
            opts=None):
52
        """See :py:mod:`niprov.plogging`  """
53
        return niprov.plogging.log(new, transformation, parents, code, logtext,
54
            transient, script, user, provenance, opts, self.deps)
55
56
    def markForApproval(self, files):
57
        """See :py:mod:`niprov.approval`  """
58
        return niprov.approval.markForApproval(files, dependencies=self.deps)
59
60
    def markedForApproval(self):
61
        """See :py:mod:`niprov.approval`  """
62
        return niprov.approval.markedForApproval(dependencies=self.deps)
63
64
    def print_(self, images, pipeline=False):
65
        """See :py:mod:`niprov.exporting`  """
66
        return niprov.exporting.print_(images, pipeline, self.deps)
67
68
    def renameDicoms(self, dicomdir):
69
        """See :py:mod:`niprov.renaming`  """
70
        return niprov.renaming.renameDicoms(dicomdir, dependencies=self.deps)
71
72
    def record(self, command, new=None, parents=None, transient=False, 
73
        args=None, kwargs=None, user=None, opts=None):
74
        """See :py:mod:`niprov.recording`  """
75
        return niprov.recording.record(command, new, parents, transient, 
76
            args, kwargs, user, opts, self.deps)
77
78
    def search(self, text):
79
        """See :py:mod:`niprov.searching`  """
80
        return niprov.searching.search(text, dependencies=self.deps)
81
82
    def selectApproved(self, files):
83
        """See :py:mod:`niprov.approval`  """
84
        return niprov.approval.selectApproved(files, dependencies=self.deps)
85
86
    def view(self, images, pipeline=False):
87
        """See :py:mod:`niprov.exporting`  """
88
        return niprov.exporting.view(images, pipeline, self.deps)
89
90