コード例 #1
0
    def _transpose(self, path):
        """
        Generate an equivalent `pretty` path for the given `ugly` file path.

        :param path: the ugly path to transpose to a pretty path
        :type path: string

        :return: pretty path
        :rtype: string
        """
        new_path = mkpath(self.pretty, mkrel(path, self.ugly))
        self.logger.debug("Transposed {} to {}".format(path, new_path))
        return new_path
コード例 #2
0
    def _transpose(self, path):
        """
        Generate an equivalent `pretty` path for the given `ugly` file path.

        :param path: the ugly path to transpose to a pretty path
        :type path: string

        :return: pretty path
        :rtype: string
        """
        new_path = mkpath(self.pretty, mkrel(path, self.ugly))
        self.logger.debug("Transposed {} to {}".format(path, new_path))
        return new_path
コード例 #3
0
    def __init__(self, name):
        """
        Create a new specimen set based around a given name.

        :param name: name used to locate the .docx file
                    and name related experiments.
        :type name: string

        """
        self.name = name
        self.logger = logging.getLogger('SPEC: ' + self.name)
        self.path = specimens_abs(self.name)
        self.logger.debug("Path set to {}".format(self.path))
        self.docx = mkpath(self.path, self.name+'.docx')
        self.logger.debug("Docx set to {}".format(self.docx))
        self.ugly = mkpath(self.path, 'ugly')
        self.logger.debug("Ugly directory set to {}".format(self.ugly))
        self.pretty = mkpath(self.path, 'pretty')
        self.logger.debug("Pretty directory set to {}".format(self.pretty))
        self.uglies = ls(self.ugly)
        self.logger.debug("Ugly files set to {}".format(self.uglies))
        self.pretties = [self._transpose(path) for path in self.uglies]
        self.logger.debug("Pretty files set to {}".format(self.pretties))
コード例 #4
0
    def __init__(self, name):
        """
        Create a new specimen set based around a given name.

        :param name: name used to locate the .docx file
                    and name related experiments.
        :type name: string

        """
        self.name = name
        self.logger = logging.getLogger('SPEC: ' + self.name)
        self.path = specimens_abs(self.name)
        self.logger.debug("Path set to {}".format(self.path))
        self.docx = mkpath(self.path, self.name + '.docx')
        self.logger.debug("Docx set to {}".format(self.docx))
        self.ugly = mkpath(self.path, 'ugly')
        self.logger.debug("Ugly directory set to {}".format(self.ugly))
        self.pretty = mkpath(self.path, 'pretty')
        self.logger.debug("Pretty directory set to {}".format(self.pretty))
        self.uglies = ls(self.ugly)
        self.logger.debug("Ugly files set to {}".format(self.uglies))
        self.pretties = [self._transpose(path) for path in self.uglies]
        self.logger.debug("Pretty files set to {}".format(self.pretties))
コード例 #5
0
 def _exp(self, f):
     path = mkpath(self.path, f)
     self.logger.debug("Exp path requested: {}".format(path))
     return path
コード例 #6
0
 def _right(self, f):
     path = mkpath(self.right.pretty, f)
     self.logger.debug("Right path requested: {}".format(path))
     return path
コード例 #7
0
 def _left(self, f):
     path = mkpath(self.left.pretty, f)
     self.logger.debug("Left path requested: {}".format(path))
     return path
コード例 #8
0
 def _exp(self, f):
     path = mkpath(self.path, f)
     self.logger.debug("Exp path requested: {}".format(path))
     return path
コード例 #9
0
 def _right(self, f):
     path = mkpath(self.right.pretty, f)
     self.logger.debug("Right path requested: {}".format(path))
     return path
コード例 #10
0
 def _left(self, f):
     path = mkpath(self.left.pretty, f)
     self.logger.debug("Left path requested: {}".format(path))
     return path
コード例 #11
0
 def _make_report_path(self, exp_dir, filename):
     report_path = "{}__{}.xml".format(
         filename.replace("/", "__").replace(".", "_"),
         self.label
         )
     return mkpath(exp_dir, report_path)