gstlal 1.13.0
Loading...
Searching...
No Matches
python.utilities.admin Namespace Reference

Functions

 add_copyright (List[str] authors, int start_year, int end_year=None)
 deprecated (str reason=None)

Variables

str COPYRIGHT_ATTR = '__copyright__'
str COPYRIGHT_PATTERN
str DEPRECATION_PATTERN = '{kind} {name} is deprecated{reason}'

Detailed Description

Collection of tools that are useful for repo administration such as:

    - deprecation warnings
    - renames / backwards compatibility
    - etc

Function Documentation

◆ add_copyright()

add_copyright ( List[str] authors,
int start_year,
int end_year = None )
Add copyright stub to module under __copyright__ attribute

Args:
    authors:
        List[str], list of author names
    start_year:
        int, starting year
    end_year:
        int, default None, ending year. If not specified uses current year

Returns:
    None

Definition at line 35 of file admin.py.

◆ deprecated()

deprecated ( str reason = None)
Deprecation decorator factory, can be used to decorate a class or function

Args:
    reason:
        str, string to display as part of deprecation warning

Returns:
    Function, the decorator

Definition at line 61 of file admin.py.

Variable Documentation

◆ COPYRIGHT_ATTR

str python.utilities.admin.COPYRIGHT_ATTR = '__copyright__'

Definition at line 15 of file admin.py.

◆ COPYRIGHT_PATTERN

str python.utilities.admin.COPYRIGHT_PATTERN
Initial value:
= """Copyright (C) {start_year:d}--{end_year:d} {authors}
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"""

Definition at line 16 of file admin.py.

◆ DEPRECATION_PATTERN

str python.utilities.admin.DEPRECATION_PATTERN = '{kind} {name} is deprecated{reason}'

Definition at line 32 of file admin.py.