Belle II Software  release-08-01-10
TagFolderRainbowTable Class Reference
Inheritance diagram for TagFolderRainbowTable:
Collaboration diagram for TagFolderRainbowTable:

Public Member Functions

None update_from_json (self, str path)
 
None to_json (self, str path)
 
None update_to_json (self, str path)
 

Detailed Description

 Because of issues of too long filenames if the number of revision
is growing, the simple recipe of creating folder names by concatenating
the names of the revisions does not work.
Therefore, we use a hashing algorithm. At the same time we want to be
able to look up the folder content easily, so we create a rainbow table,
that is a simple text file that contains hash <> revisions.

Definition at line 35 of file validationpath.py.

Member Function Documentation

◆ to_json()

None to_json (   self,
str  path 
)
 Write out this dictionary as a json file. 

Definition at line 51 of file validationpath.py.

51  def to_json(self, path: str) -> None:
52  """ Write out this dictionary as a json file. """
53  os.makedirs(os.path.dirname(path), exist_ok=True)
54  with open(path, "w") as outfile:
55  json.dump(self, outfile, indent=4, sort_keys=True)
56 

◆ update_from_json()

None update_from_json (   self,
str  path 
)
 Read a json file which was produced by the ``to_json`` method and
update this dictionary. If the path does not exist, do nothing. 

Definition at line 44 of file validationpath.py.

◆ update_to_json()

None update_to_json (   self,
str  path 
)
 Read json file (if exists) for anything the dictionary
doesn't contain yet and write everything back. 

Definition at line 57 of file validationpath.py.


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