DAS  3.0
Das Analysis System
Report

Public Member Functions

def __init__ (self)
 
def generate (self, files)
 
def status_code (self)
 

Public Attributes

 corr_added
 
 corr_removed
 
 corr_updated
 
 corr_version_error
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
15  def __init__(self):
16  self.corr_added = list() # added corrections
17  self.corr_removed = set() # (name, version) of removed corrections
18  self.corr_updated = list() # (old, new) for modified corrections
19  self.corr_version_error = set() # (name, version) of modified corrections but where the version number wasn't bumped
20 

Member Function Documentation

◆ generate()

def generate (   self,
  files 
)
21  def generate(self, files):
22  # Some ugly mix of markdown for gitlab and rich console output...
23 
24  def _print_cv(lst, msg=""):
25  for c,v in lst:
26  console.print(f" * `{c}` -> version `{v}`{msg}")
27 
28  console = Console(width=100, color_system=None)
29 
30  console.print(f"\n### Comparison: file {files[1]}\n")
31  console.print(f"Old file: `{files[0]}`\n")
32 
33  if len(self.corr_version_error):
34  console.print("\n#### Version errors\n")
35  console.print("These corrections should increase their version numbers:\n")
36  _print_cv(self.corr_version_error, msg=" is already in use")
37 
38  if len(self.corr_removed):
39  console.print("\n#### Removed corrections\n")
40  _print_cv(self.corr_removed)
41 
42  if len(self.corr_added):
43  console.print("\n#### Added corrections\n")
44  for added in self.corr_added:
45  console.print(added)
46 
47  if len(self.corr_updated):
48  console.print("\n#### Updated corrections\n")
49  for old, new in self.corr_updated:
50  console.print(Columns([old, new], width=40, equal=True, expand=True))
51 
52  if len(self.corr_version_error) + \
53  len(self.corr_removed) + \
54  len(self.corr_added) + \
55  len(self.corr_updated) == 0:
56  console.print("No significant difference in the corrections")
57 

◆ status_code()

def status_code (   self)
58  def status_code(self):
59  if len(self.corr_version_error):
60  return 1
61  return 0
62 
63 

Member Data Documentation

◆ corr_added

corr_added

◆ corr_removed

corr_removed

◆ corr_updated

corr_updated

◆ corr_version_error

corr_version_error

The documentation for this class was generated from the following file: