[Python-modules-commits] [cf-python] 02/03: Sphinx fixes.

Klaus Zimmermann zklaus-guest at moszumanska.debian.org
Tue Oct 11 15:45:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

zklaus-guest pushed a commit to branch master
in repository cf-python.

commit 935304da335fb4d918f62a7df80b64a582901b68
Author: Klaus Zimmermann <klaus_zimmermann at gmx.de>
Date:   Thu Oct 6 21:45:32 2016 +0200

    Sphinx fixes.
    
    Signed-off-by: Klaus Zimmermann <klaus_zimmermann at gmx.de>
---
 cf/data/data.py                      | 10 ++++----
 cf/field.py                          | 36 ++++++++++++++-------------
 cf/variable.py                       |  4 +--
 cf/write.py                          | 12 +++------
 docs/source/class.rst                | 14 -----------
 docs/source/classes/cf.Data.rst      |  1 -
 docs/source/classes/cf.FieldList.rst |  1 -
 docs/source/classes/cf.List.rst      | 48 ------------------------------------
 docs/source/conf.py                  |  4 ++-
 docs/source/field.rst                |  2 +-
 docs/source/field_manipulation.rst   |  2 ++
 docs/source/pp_library_mappings.rst  | 20 +++++++--------
 12 files changed, 45 insertions(+), 109 deletions(-)

diff --git a/cf/data/data.py b/cf/data/data.py
index bb294c1..acb90ad 100644
--- a/cf/data/data.py
+++ b/cf/data/data.py
@@ -6221,7 +6221,7 @@ omitted from the calculation.
 The binary mask's data array comprises dimensionless 8-bit integers
 and has 0 where the data array has missing data and 1 otherwise.
 
-.. seealos:: `mask`
+.. seealso:: `mask`
 
 :Returns:
 
@@ -7767,13 +7767,13 @@ The returned object is of the same type as is stored internally.
             If *index* is ``0`` or ``-1`` then the first or last data
             array element respecitively will be returned, even if the
             data array is a scalar array.
+
         ..
-         
           * Two or more integers. These arguments are interpreted as a
             multidimensionsal index to the array. There must be the
             same number of integers as data array dimensions.
+
         ..
-         
           * A tuple of integers. This argument is interpreted as a
             multidimensionsal index to the array. There must be the
             same number of integers as data array dimensions.
@@ -8410,8 +8410,8 @@ elements.
 
           * ``None``. The appropriate elements of the data array are
             unchanged.
-        ..
 
+        ..
           * Any object which is broadcastable to the data array's
             shape. The appropriate elements of the data array are set
             to the corresponding values from the object broadcast to
@@ -8797,8 +8797,8 @@ selected with the keyword arguments.
         *axes* argument may be one, or a sequence, of:
 
           * An internal axis identifier. Selects this axis.
-        ..
 
+        ..
           * An integer. Selects the axis coresponding to the given
             position in the list of axes of the data array.
 
diff --git a/cf/field.py b/cf/field.py
index dda902a..6edf315 100644
--- a/cf/field.py
+++ b/cf/field.py
@@ -5653,7 +5653,7 @@ two fields are equivalent if:
     the other field has a matching dimension whose identity inferred
     is inferred from a 1-d coordinate with an equivalent data array.
 
-    * The rank, as given by their `~cf.Field.rank
+    * The rank, as given by their `~cf.Field.rank`
 
 [+1].. seealso:: `~cf.Field.equals`, `set_equals`
 [+N].. seealso:: `~cf.FieldList.equals`, `set_equals`
@@ -5937,8 +5937,7 @@ The coordinate value conditions may be given in any order.
         ===========  =================================================
         *arg*        Description
         ===========  =================================================
-
-        ``'exact'`` -Keyword parameter names are not treated as
+        ``'exact'``  Keyword parameter names are not treated as
                      abbreviations of item identities. By default,
                      keyword parameter names are allowed to be
                      abbreviations of item identities.
@@ -6984,7 +6983,7 @@ arguments.
             hectopascals (see `cf.eq`).
     
           *Example:*
-           ``f.match({'standard_name': cf.eq('air_pressure'),
+            ``f.match({'standard_name': cf.eq('air_pressure'),
             'units': 'hPa'})`` will match a field with a standard name
             of exactly "air_pressure" but with units which equivalent
             to hectopascals (see `cf.eq`).
@@ -10080,21 +10079,22 @@ Set the time axis to be unlimited when written to a netCDF file:
         the special case of *xxx* being `None`, then chunking is
         set to the netCDF default.
 
-          *Example:*
-            To set time axes to be unlimited: ``{'T': True}``.
-
         Example:
+        To set time axes to be unlimited: ``{'T': True}``.
 
-            To set the chunk size for the first and third data array
+        Example:
+        To set the chunk size for the first and third data array
         axes to 100: {0: 100, 2: 100}, or equivalently {(0, 2): 100}.
+
         Example:
+        To set the chunk size for the longitude axis to 100 and
+        for the air temperature axis to 5: {'X': 100, 'air_temperature': 5}.
 
-            To set the chunk size for the longitude axis to 100 and
-        for the air temperature axis to 5: {'X': 100,
-        'air_temperature': 5}.  Example:
+        Example:
+        To set the chunk size for all axes to 10: {None: 10}. This
+        works because f.axes(None) returns all field axes.
 
-            To set the chunk size for all axes to 10: {None: 10}. This
-        works because f.axes(None) returns all field axes.  Example:
+        Example:
         To set the chunking to the netCDF default: None.
 
 :Returns:
@@ -10222,7 +10222,8 @@ Auxiliary coords:
             axes_subset=None, axes_superset=None, exact=False,
             inverse=False, match_and=True, ndim=None, key=False,
             copy=False):
-        '''{+Fef,}Return an auxiliary coordinate object, or its domain identifier.
+        '''
+{+Fef,}Return an auxiliary coordinate object, or its domain identifier.
 
 In this documentation, an auxiliary coordinate object is referred to
 as an item.
@@ -10569,6 +10570,7 @@ Note that ``f.{+name}(inverse=False, **kwargs)`` is equivalent to
  
 .. seealso:: `aux`, `axes`, `measures` , `refs`, `coords`, `dims`,
              `items`, `remove_items`
+
 :Examples 1:
 
 To select all auxiliary coordinate objects:
@@ -11959,7 +11961,7 @@ elements.
 
 [+1].. seealso:: `cf.masked`, `hardmask`, `indices`, `mask`, `subspace`
 [+N].. seealso:: `cf.masked`, `cf.Field.hardmask`, `cf.Field.indices`,
-[+N]             `mask`, ``subspace`
+[+N]             `mask`, `subspace`
 
 :Examples 1:
 
@@ -12013,8 +12015,8 @@ elements.
 
           * `None`. The appropriate elements of the field's data
             array are unchanged. This the default.
-        ..
 
+        ..
           * Any object which is broadcastable to the field's data
             array using the metadata-aware `cf` broadcasting rules
             (i.e. a suitable `cf.Field` object or any object, ``a``,
@@ -12304,7 +12306,7 @@ Regrid field ``f`` conservatively onto a grid contained in field
         Force the use of a periodic X axis for the destination grid,
         without altering the original field.
 
-    method: `str`ing, optional
+    method: `str`, optional
         By default the regridding method is set to 'auto'. In this case
         conservative regridding will be used unless one or both of the
         fields does not have contiguous bounds, in which case bilinear
diff --git a/cf/variable.py b/cf/variable.py
index a88d2a9..179e90a 100644
--- a/cf/variable.py
+++ b/cf/variable.py
@@ -4281,13 +4281,13 @@ array or has two or more dimensions.
             array element respecitively will be returned, even if the
             data array is a scalar array or has two or more
             dimensions.
+
         ..
-         
           * Two or more integers. These arguments are interpreted as a
             multidimensionsal index to the array. There must be the
             same number of integers as data array dimensions.
+
         ..
-         
           * A tuple of integers. This argument is interpreted as a
             multidimensionsal index to the array. There must be the
             same number of integers as data array dimensions.
diff --git a/cf/write.py b/cf/write.py
index de023d6..2ca9de7 100644
--- a/cf/write.py
+++ b/cf/write.py
@@ -251,18 +251,12 @@ and auxiliary coordinate roles for different data variables.
  <CF Field: u_compnt_of_wind(19, 29, 24)>,
  <CF Field: v_compnt_of_wind(19, 29, 24)>,
  <CF Field: potential_temperature(19, 30, 24)>]
->>> write(f
-
-    , 'file')
+>>> write(f, 'file')
 
 >>> type(f)
-<clas
-
-    s 'cf.field.FieldList'>
+<class 'cf.field.FieldList'>
 >>> type(g)
-<clas
-
-    s 'cf.field.Field'>
+<class 'cf.field.Field'>
 >>> cf.write([f, g], 'file.nc', verbose=True)
 [<CF Field: air_pressure(30, 24)>,
  <CF Field: u_compnt_of_wind(19, 29, 24)>,
diff --git a/docs/source/class.rst b/docs/source/class.rst
index 1dd5db3..97c0458 100644
--- a/docs/source/class.rst
+++ b/docs/source/class.rst
@@ -56,18 +56,6 @@ Base classes
    cf.Dict       
    cf.Variable       
 
-.. comment
-   Data component classes
-   ----------------------
-   
-   .. autosummary::
-      :nosignatures:
-      :toctree: classes/
-   
-      cf.Partition
-      cf.PartitionMatrix
-
-
 .. _inheritance_diagrams:
 
 Inheritance diagrams
@@ -109,5 +97,3 @@ The classes defined by the `cf` package inherit as follows:
   .. inheritance-diagram:: cf.CellMethods
                            cf.CoordinateReference
          :parts: 1
-
-----
diff --git a/docs/source/classes/cf.Data.rst b/docs/source/classes/cf.Data.rst
index 28f1896..81d350f 100644
--- a/docs/source/classes/cf.Data.rst
+++ b/docs/source/classes/cf.Data.rst
@@ -62,7 +62,6 @@ Data methods
    ~cf.Data.dump
    ~cf.Data.dumpd
    ~cf.Data.equals
-   ~cf.Data.equivalent
    ~cf.Data.expand_dims
    ~cf.Data.files
    ~cf.Data.flat
diff --git a/docs/source/classes/cf.FieldList.rst b/docs/source/classes/cf.FieldList.rst
index 7279560..5eab7b0 100644
--- a/docs/source/classes/cf.FieldList.rst
+++ b/docs/source/classes/cf.FieldList.rst
@@ -176,7 +176,6 @@ Miscellaneous
    ~cf.FieldList.name
    ~cf.FieldList.override_units
    ~cf.FieldList.override_calendar
-   ~cf.FieldList.promote
    ~cf.FieldList.remove_data
    ~cf.FieldList.select
    ~cf.FieldList.weights
diff --git a/docs/source/classes/cf.List.rst b/docs/source/classes/cf.List.rst
deleted file mode 100644
index 6bd523a..0000000
--- a/docs/source/classes/cf.List.rst
+++ /dev/null
@@ -1,48 +0,0 @@
-.. currentmodule:: cf
-.. default-role:: obj
-
-cf.List
-=======
-
-.. autoclass:: cf.List
-   :no-members:
-   :no-inherited-members:
-
-List methods
-------------
-      
-.. autosummary::
-   :nosignatures:
-   :toctree: ../generated/
-   :template: method.rst
-
-   ~cf.List.copy
-   ~cf.List.count
-   ~cf.List.delattr
-   ~cf.List.equals
-   ~cf.List.getattr 
-   ~cf.List.index
-   ~cf.List.iter
-   ~cf.List.method
-   ~cf.List.setattr
-
-
-List list-like methods
-----------------------
-
-These methods provide functionality exactly as their counterparts in a
-built-in :py:obj:`list`.
-
-.. autosummary::
-   :nosignatures:
-   :toctree: ../generated/
-   :template: method.rst
-     
-   ~cf.List.append
-   ~cf.List.extend
-   ~cf.List.insert
-   ~cf.List.pop
-   ~cf.List.remove
-   ~cf.List.reverse
-   ~cf.List.sort
-
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 7e24935..67144ae 100755
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -140,7 +140,9 @@ def _get_version():
 # The full version, including alpha/beta/rc tags.
 release = _get_version()
 # The short X.Y version.
-version = re.findall('^\d+\.\d+', release)
+versions = re.findall('^\d+\.\d+', release)
+assert(len(versions)==1)
+version = versions[0]
 
 # The language for content autogenerated by Sphinx. Refer to
 # documentation for a list of supported languages.
diff --git a/docs/source/field.rst b/docs/source/field.rst
index 7417921..bf9c341 100644
--- a/docs/source/field.rst
+++ b/docs/source/field.rst
@@ -1,7 +1,7 @@
 .. currentmodule:: cf
 .. default-role:: obj
 
-.. _field_structure:
+.. _field:
 
 Introduction to the `cf.Field` object
 =====================================
diff --git a/docs/source/field_manipulation.rst b/docs/source/field_manipulation.rst
index d6cfb0c..dd2e699 100644
--- a/docs/source/field_manipulation.rst
+++ b/docs/source/field_manipulation.rst
@@ -1,4 +1,5 @@
 .. set tocdepth in sidebar
+
 :tocdepth: 2
 
 .. currentmodule:: cf
@@ -570,6 +571,7 @@ It is possible to set the action to take when an arithmetic operation
 produces one of the following floating-point errors:
 
 .. tabularcolumns:: |l|l|
+
 =================  =================================
 Error              Description                      
 =================  =================================
diff --git a/docs/source/pp_library_mappings.rst b/docs/source/pp_library_mappings.rst
index 076fd69..6cad088 100644
--- a/docs/source/pp_library_mappings.rst
+++ b/docs/source/pp_library_mappings.rst
@@ -8,23 +8,23 @@
 +------------------+----------------------------------------+----------------------------------------------------+
 | Object           |                                        |  Description                                       |
 +==================+========================================+====================================================+
-|| `!ppa`          |                                        | `cf.read`                                          |
-|| `!ppasooc`      |                                        |                                                    |
-|| `!ncassoc`      |                                        |                                                    |
+| `!ppa`           |                                        | `cf.read`                                          |
+| `!ppasooc`       |                                        |                                                    |
+| `!ncassoc`       |                                        |                                                    |
 +------------------+----------------------------------------+----------------------------------------------------+
-|| `!ppw`          |                                        | `cf.write`                                         |
+| `!ppw`           |                                        | `cf.write`                                         |
 +------------------+----------------------------------------+----------------------------------------------------+
-|| `!pp_area_avg`  |                                        |  `cf.Field.collapse`                               |
+| `!pp_area_avg`   |                                        | `cf.Field.collapse`                                |
 +------------------+----------------------------------------+----------------------------------------------------+
-|| `!pats_area_avg`|                                        |  `cf.Field.collapse`                               |
+| `!pats_area_avg` |                                        | `cf.Field.collapse`                                |
 +------------------+----------------------------------------+----------------------------------------------------+
-|| `!pp_vol_avg`   |                                        |  `cf.Field.collapse`                               |
+| `!pp_vol_avg`    |                                        | `cf.Field.collapse`                                |
 +------------------+----------------------------------------+----------------------------------------------------+
-|| `!pp_extract`   |                                        |  `cf.Field.subspace`                               |
+| `!pp_extract`    |                                        | `cf.Field.subspace`                                |
 +------------------+----------------------------------------+----------------------------------------------------+
-|| `!pp_ff`        | ``pp_ff('5.7*(a/AVG(b))', pp1, pp2)``  |                                                    |
+| `!pp_ff`         | ``pp_ff('5.7*(a/AVG(b))', pp1, pp2)``  |                                                    |
 +------------------+----------------------------------------+----------------------------------------------------+
-|| `!pp_regrid     |                                        | `cf.Field.regrid`            
+| `!pp_regrid`     |                                        | `cf.Field.regrid`                                  |
 +------------------+----------------------------------------+----------------------------------------------------+
 
 ===============================  =======================================================================

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/cf-python.git



More information about the Python-modules-commits mailing list