Changeset 274f9ef in flex_extract.git for source/python/classes/UioFiles.py


Ignore:
Timestamp:
Oct 22, 2018, 11:44:47 AM (6 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
db27c09
Parents:
708c667
Message:

Converted docstrings to numpy style and build first structure for sphinxdocumentation (incl API)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/python/classes/UioFiles.py

    rca867de r274f9ef  
    6161
    6262class UioFiles(object):
    63     '''
    64     Class to manipulate files. At initialisation it has the pattern
     63    '''Class to manipulate files. At initialisation it has the pattern
    6564    which stores a regular expression pattern for the files, the path
    6665    to the files and the files already.
     
    7069    # --------------------------------------------------------------------------
    7170    def __init__(self, path, pattern):
    72         '''
    73         @Description:
    74             Assignes a specific pattern for these files.
     71        '''Assignes a specific pattern for these files.
    7572
    76         @Input:
    77             self: instance of UioFiles
    78                 Description see class documentation.
     73        Parameters
     74        ----------
     75        path : :obj:`string`
     76            Directory where to list the files.
    7977
    80             path: string
    81                 Directory where to list the files.
     78        pattern : :obj:`string`
     79            Regular expression pattern. For example: '\*.grb'
    8280
    83             pattern: string
    84                 Regular expression pattern. For example: '*.grb'
     81        Return
     82        ------
    8583
    86         @Return:
    87             <nothing>
    8884        '''
    8985
     
    9894    #@profiling.timefn
    9995    def __list_files__(self, path):
    100         '''
    101         @Description:
    102             Lists all files in the directory with the matching
    103             regular expression pattern.
     96        '''Lists all files in the directory with the matching
     97        regular expression pattern.
    10498
    105         @Input:
    106             self: instance of UioFiles
    107                 Description see class documentation.
     99        Parameters
     100        ----------
     101        path : :obj:`string`
     102            Path to the files.
    108103
    109             path: string
    110                 Path to the files.
     104        Return
     105        ------
    111106
    112         @Return:
    113             <nothing>
    114107        '''
    115108        # Get the absolute path
     
    124117
    125118    def __str__(self):
    126         '''
    127         @Description:
    128             Converts the list of files into a single string.
    129             The entries are sepereated by "," sign.
     119        '''Converts the list of files into a single string.
     120        The entries are sepereated by "," sign.
    130121
    131         @Input:
    132             self: instance of UioFiles
    133                 Description see class documentation.
     122        Parameters
     123        ----------
    134124
    135         @Return:
    136             files_string: string
    137                 The content of the list as a single string.
     125        Return
     126        ------
     127        files_string : :obj:`string`
     128            The content of the list as a single string.
    138129        '''
    139130
     
    144135
    145136    def delete_files(self):
    146         '''
    147         @Description:
    148             Deletes the files.
     137        '''Deletes the files.
    149138
    150         @Input:
    151             self: instance of UioFiles
    152                 Description see class documentation.
     139        Parameters
     140        ----------
    153141
    154         @Return:
    155             <nothing>
     142        Return
     143        ------
     144
    156145        '''
    157146
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG