[GRASS-SVN] r62358 - in grass/trunk/lib/python: docs/src exceptions gunittest script

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 22 06:56:00 PDT 2014


Author: neteler
Date: 2014-10-22 06:56:00 -0700 (Wed, 22 Oct 2014)
New Revision: 62358

Modified:
   grass/trunk/lib/python/docs/src/gunittest_running_tests.rst
   grass/trunk/lib/python/docs/src/index.rst
   grass/trunk/lib/python/docs/src/pygrass_vector.rst
   grass/trunk/lib/python/docs/src/temporal_framework.rst
   grass/trunk/lib/python/exceptions/__init__.py
   grass/trunk/lib/python/gunittest/Makefile
   grass/trunk/lib/python/gunittest/__init__.py
   grass/trunk/lib/python/gunittest/case.py
   grass/trunk/lib/python/gunittest/checkers.py
   grass/trunk/lib/python/gunittest/gmodules.py
   grass/trunk/lib/python/gunittest/gutils.py
   grass/trunk/lib/python/gunittest/invoker.py
   grass/trunk/lib/python/gunittest/loader.py
   grass/trunk/lib/python/gunittest/main.py
   grass/trunk/lib/python/gunittest/multireport.py
   grass/trunk/lib/python/gunittest/multirunner.py
   grass/trunk/lib/python/gunittest/reporters.py
   grass/trunk/lib/python/gunittest/runner.py
   grass/trunk/lib/python/gunittest/utils.py
   grass/trunk/lib/python/script/__init__.py
Log:
python docs: documentation improved

Modified: grass/trunk/lib/python/docs/src/gunittest_running_tests.rst
===================================================================
--- grass/trunk/lib/python/docs/src/gunittest_running_tests.rst	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/docs/src/gunittest_running_tests.rst	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,5 +1,5 @@
-Running the tests of GRASS GIS
-==============================
+Running the test framework of GRASS GIS
+=======================================
 
 This is an advanced guide to running tests of GRASS GIS using GRASS
 testing framework (`gunittest`).
@@ -76,4 +76,4 @@
 
     0 4 * * 1 /home/vpetras/grasstests/test_grass_gis.sh
 
-Which will perform the tests every Monday at 4 in the morning.
+Which will perform the tests every Monday at 4am in the (North Carolina) morning.

Modified: grass/trunk/lib/python/docs/src/index.rst
===================================================================
--- grass/trunk/lib/python/docs/src/index.rst	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/docs/src/index.rst	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,6 +1,29 @@
 GRASS GIS Python library documentation
 ==========================================
 
+Python, a widely used general-purpose, high-level programming language 
+provides a powerful scripting interface. Being easy-to-use yet 
+powerful, it enables users to efficiently exploit the capabilities of 
+the GRASS GIS software. Python scripts for GRASS GIS can be written at 
+high level (GRASS GIS modules) as well as at low level (GRASS GIS 
+libraries) through a dedicated interface. The graphical user interface 
+and the GRASS GIS Temporal Framework are entirely written in Python.
+
+A set of packages is provided to the user in order to provide functionality
+at various levels:
+
+* **script package**: Python interface to launch GRASS GIS modules in scripts
+* **PyGRASS documentation**: PyGRASS is an object-oriented Python Application 
+  Programming Interface (API) for GRASS GIS which uses the GRASS C API as 
+  backend but additionally offers a convenient interface to the GRASS GIS 
+  modules
+* **GRASS GIS Temporal Framework**: implements the temporal GIS functionality
+  of GRASS GIS and provides an API to implement spatio-temporal processing modules
+* **exceptions package**: FIXME
+* **imaging package**: library to create animated images and films
+* **Testing GRASS GIS source code and modules**: (gunittest package
+* **pydispatch package**: Multiple-producer-multiple-consumer signal-dispatching
+
 Contents:
 
 .. toctree::

Modified: grass/trunk/lib/python/docs/src/pygrass_vector.rst
===================================================================
--- grass/trunk/lib/python/docs/src/pygrass_vector.rst	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/docs/src/pygrass_vector.rst	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,5 +1,3 @@
-.. _vector-label:
-
 Introduction to Vector classes
 ==============================
 

Modified: grass/trunk/lib/python/docs/src/temporal_framework.rst
===================================================================
--- grass/trunk/lib/python/docs/src/temporal_framework.rst	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/docs/src/temporal_framework.rst	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,4 +1,4 @@
-The GRASS GIS Temporal Framework
+GRASS GIS Temporal Framework
 ================================
 
 Introduction

Modified: grass/trunk/lib/python/exceptions/__init__.py
===================================================================
--- grass/trunk/lib/python/exceptions/__init__.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/exceptions/__init__.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,4 +1,5 @@
-# -*- coding: utf-8 -*-
+"""GRASS GIS interface to Python exceptions
+"""
 
 import subprocess
 

Modified: grass/trunk/lib/python/gunittest/Makefile
===================================================================
--- grass/trunk/lib/python/gunittest/Makefile	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/Makefile	2014-10-22 13:56:00 UTC (rev 62358)
@@ -7,6 +7,7 @@
 GDIR = $(PYDIR)/grass
 DSTDIR = $(GDIR)/gunittest
 
+# TODO: add multireport multirunner
 MODULES = case gmodules loader runner checkers gutils invoker main reporters utils
 
 PYFILES := $(patsubst %,$(DSTDIR)/%.py,$(MODULES) __init__)

Modified: grass/trunk/lib/python/gunittest/__init__.py
===================================================================
--- grass/trunk/lib/python/gunittest/__init__.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/__init__.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,15 +1,12 @@
 # -*- coding: utf-8 -*-
-"""!@package grass.gunittest
+"""GRASS Python testing framework module for running from command line
 
- at brief GRASS Python testing framework module for running from command line
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
- at author Soeren Gebbert
+:authors: Vaclav Petras, Soeren Gebbert
 
 Initial version of `gunittest` was created during Google Summer of Code 2014
 by Vaclav Petras as a student and Soeren Gebbert as a mentor.

Modified: grass/trunk/lib/python/gunittest/case.py
===================================================================
--- grass/trunk/lib/python/gunittest/case.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/case.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,15 +1,12 @@
 # -*- coding: utf-8 -*-
+"""GRASS Python testing framework test case
 
-"""!@package grass.gunittest.case
-
- at brief GRASS Python testing framework test case
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
-License (>=v2). Read the file COPYING that comes with GRASS
+License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
+:authors: Vaclav Petras
 """
 
 import os

Modified: grass/trunk/lib/python/gunittest/checkers.py
===================================================================
--- grass/trunk/lib/python/gunittest/checkers.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/checkers.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,16 +1,12 @@
 # -*- coding: utf-8 -*-
+"""GRASS Python testing framework checkers
 
-"""!@package grass.gunittest.checkers
-
- at brief GRASS Python testing framework checkers
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
-License (>=v2). Read the file COPYING that comes with GRASS
+License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
- at author Soeren Gebbert
+:authors: Vaclav Petras, Soeren Gebbert
 """
 
 import sys

Modified: grass/trunk/lib/python/gunittest/gmodules.py
===================================================================
--- grass/trunk/lib/python/gunittest/gmodules.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/gmodules.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,16 +1,14 @@
 # -*- coding: utf-8 -*-
-"""!@package grass.gunittest.gmodules
+"""Specialized interfaces for invoking modules for testing framework
 
- at brief Specialized interfaces for invoking modules for testing framework
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
- at author Soeren Gebbert
+:authors: Vaclav Petras, Soeren Gebbert
 """
+
 import subprocess
 from grass.script.core import start_command
 from grass.exceptions import CalledModuleError

Modified: grass/trunk/lib/python/gunittest/gutils.py
===================================================================
--- grass/trunk/lib/python/gunittest/gutils.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/gutils.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,18 +1,16 @@
 # -*- coding: utf-8 -*-
-"""!@package grass.gunittest.gutils
+"""Utilities related to GRASS GIS for GRASS Python testing framework
 
- at brief Utilities related to GRASS GIS for GRASS Python testing framework
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
+:authors: Vaclav Petras
 """
+
 from .gmodules import call_module
 
-
 def get_current_mapset():
     """Get curret mapset name as a string"""
     return call_module('g.mapset', flags='p').strip()

Modified: grass/trunk/lib/python/gunittest/invoker.py
===================================================================
--- grass/trunk/lib/python/gunittest/invoker.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/invoker.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,14 +1,12 @@
 # -*- coding: utf-8 -*-
-"""!@package grass.gunittest.invoker
+"""GRASS Python testing framework test files invoker (runner)
 
- at brief GRASS Python testing framework test files invoker (runner)
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
+:authors: Vaclav Petras
 """
 
 import os

Modified: grass/trunk/lib/python/gunittest/loader.py
===================================================================
--- grass/trunk/lib/python/gunittest/loader.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/loader.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,14 +1,12 @@
 # -*- coding: utf-8 -*-
-"""!@package grass.gunittest.loader
+"""GRASS Python testing framework test loading functionality
 
- at brief GRASS Python testing framework test loading functionality
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
+:authors: Vaclav Petras
 """
 
 import os

Modified: grass/trunk/lib/python/gunittest/main.py
===================================================================
--- grass/trunk/lib/python/gunittest/main.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/main.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,14 +1,12 @@
 # -*- coding: utf-8 -*-
-"""!@package grass.gunittest.main
+"""GRASS Python testing framework module for running from command line
 
- at brief GRASS Python testing framework module for running from command line
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
+:authors: Vaclav Petras
 """
 
 import os

Modified: grass/trunk/lib/python/gunittest/multireport.py
===================================================================
--- grass/trunk/lib/python/gunittest/multireport.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/multireport.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,5 +1,15 @@
 # -*- coding: utf-8 -*-
+"""Testing framework module for multi report
 
+Copyright (C) 2014 by the GRASS Development Team
+This program is free software under the GNU General Public
+License (>=v2). Read the file COPYING that comes with GRASS GIS
+for details.
+
+:authors: Vaclav Petras
+"""
+
+
 import sys
 import os
 import argparse

Modified: grass/trunk/lib/python/gunittest/multirunner.py
===================================================================
--- grass/trunk/lib/python/gunittest/multirunner.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/multirunner.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,5 +1,14 @@
 # -*- coding: utf-8 -*-
+"""Testing framework module for running tests in Python unittest fashion
 
+Copyright (C) 2014 by the GRASS Development Team
+This program is free software under the GNU General Public
+License (>=v2). Read the file COPYING that comes with GRASS GIS
+for details.
+
+:authors: Vaclav Petras
+"""
+
 from __future__ import print_function
 
 import sys

Modified: grass/trunk/lib/python/gunittest/reporters.py
===================================================================
--- grass/trunk/lib/python/gunittest/reporters.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/reporters.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,17 +1,14 @@
 # -*- coding: utf-8 -*-
-"""!@package grass.gunittest.reporters
+"""GRASS Python testing framework module for report generation
 
- at brief GRASS Python testing framework module for report generation
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
+:authors: Vaclav Petras
 """
 
-
 import os
 import datetime
 import xml.sax.saxutils as saxutils

Modified: grass/trunk/lib/python/gunittest/runner.py
===================================================================
--- grass/trunk/lib/python/gunittest/runner.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/runner.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,14 +1,12 @@
 # -*- coding: utf-8 -*-
-"""!@package grass.gunittest.runner
+"""Testing framework module for running tests in Python unittest fashion
 
- at brief Testing framework module for running tests in Python unittest fashion
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
+:authors: Vaclav Petras
 
 File content taken from Python's  ``unittest.runner``, it will be used as
 a template. It is not expected that something will left.

Modified: grass/trunk/lib/python/gunittest/utils.py
===================================================================
--- grass/trunk/lib/python/gunittest/utils.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/gunittest/utils.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,14 +1,12 @@
 # -*- coding: utf-8 -*-
-"""!@package grass.gunittest.utils
+"""GRASS Python testing framework utilities (general and test-specific)
 
- at brief GRASS Python testing framework utilities (general and test-specific)
-
 Copyright (C) 2014 by the GRASS Development Team
 This program is free software under the GNU General Public
 License (>=v2). Read the file COPYING that comes with GRASS GIS
 for details.
 
- at author Vaclav Petras
+:authors: Vaclav Petras
 """
 
 import os

Modified: grass/trunk/lib/python/script/__init__.py
===================================================================
--- grass/trunk/lib/python/script/__init__.py	2014-10-22 13:16:38 UTC (rev 62357)
+++ grass/trunk/lib/python/script/__init__.py	2014-10-22 13:56:00 UTC (rev 62358)
@@ -1,3 +1,6 @@
+"""Python interface to launch GRASS GIS modules in scripts
+"""
+
 from core   import *
 from db     import *
 from raster import *



More information about the grass-commit mailing list