Changeset 939 for trunk/GSASIIpath.py


Ignore:
Timestamp:
Jun 2, 2013 11:07:35 PM (12 years ago)
Author:
toby
Message:

fix & cleanup unit tests; add/change doc strings for sphinx; add all G2 py files to sphinx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASIIpath.py

    r772 r939  
    11# -*- coding: utf-8 -*-
    2 '''Routines for dealing with file locations, etc.
    32'''
     3*GSASIIpath: locations & updates*
     4---------------------------------
     5
     6Routines for dealing with file locations, etc.
     7
     8Determines the location of the compiled (.pyd or .so) libraries.
     9
     10Interfaces with subversion (svn):
     11Determine the subversion release number by determining the highest version number
     12where :func:`SetVersionNumber` is called (best done in every GSASII file).
     13Other routines will update GSASII from the subversion server if svn can be
     14found.
     15'''
     16
    417import os
    518import sys
     
    4154version = -1
    4255def SetVersionNumber(RevString):
    43     '''RevString is something like "$Revision$" that is set by subversion when
    44     the file is retrieved from subversion.
     56    '''Set the subversion version number
     57
     58    :param str RevString: something like "$Revision$"
     59      that is set by subversion when the file is retrieved from subversion.
     60
     61    Place ``GSASIIpath.SetVersionNumber("$Revision$")`` in every python
     62    file.
    4563    '''
    4664    try:
     
    5270       
    5371def GetVersionNumber():
     72    '''Return the maximum version number seen in :func:`SetVersionNumber`
     73    '''
    5474    return version
    5575
     
    5979    Searches the current path as well as subdirectory "svn" and
    6080    "svn/bin" in the location of the GSASII source files.
    61     returns None if svn is not found.
     81
     82    :returns: None if svn is not found.
    6283    '''
    6384    def is_exe(fpath):
     
    7798    or contacts the subversion server to get the latest update version (# of Head).
    7899
    79     parameters:
    80      fpath: path to repository dictionary, defaults to directory where
     100    :param fpath: path to repository dictionary, defaults to directory where
    81101       the current file is located
    82     local: determines the type of version number, where
     102    :param local: determines the type of version number, where
    83103       True (default): returns the latest installed update
    84104       False: returns the version number of Head on the server
    85105
    86     Returns that number as an str.
    87 
    88     Returns None if there is a subversion error (likely because the path is
     106    :Returns: the version number as an str or
     107       None if there is a subversion error (likely because the path is
    89108       not a repository or svn is not found)
    90109    '''
     
    114133       the list has length 0
    115134
    116     parameter:
    117      fpath: path to repository dictionary, defaults to directory where
     135    :param fpath: path to repository dictionary, defaults to directory where
    118136       the current file is located
    119137
    120     Returns None if there is a subversion error (likely because the path is
     138    :returns: None if there is a subversion error (likely because the path is
    121139       not a repository or svn is not found)
     140
    122141    '''
    123142    import subprocess
     
    139158    '''This performs an update of the files in a local directory from a server.
    140159
    141     parameter:
    142      fpath: path to repository dictionary, defaults to directory where
     160    :param fpath: path to repository dictionary, defaults to directory where
    143161       the current file is located
    144162
    145     Returns:
    146        A dictionary with the files that have been changed/added and
    147           a code describing how they have been updated (see changetype)
    148          
    149        None if there is a subversion error (likely because the path is
     163    :returns: A dictionary with the files that have been changed/added and
     164          a code describing how they have been updated (see changetype) ro
     165          None if there is a subversion error (likely because the path is
    150166          not a repository or svn is not found)
     167
    151168    '''
    152169    import subprocess
Note: See TracChangeset for help on using the changeset viewer.