File: 0004-Sphinx-fixes.patch

package info (click to toggle)
cf-python 1.3.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,996 kB
  • sloc: python: 51,733; ansic: 2,736; makefile: 78; sh: 2
file content (418 lines) | stat: -rw-r--r-- 16,771 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
From d05d0ffd05aae3700553050e51308e4bb78cd468 Mon Sep 17 00:00:00 2001
From: Klaus Zimmermann <klaus_zimmermann@gmx.de>
Date: Thu, 6 Oct 2016 21:45:32 +0200
Subject: Sphinx fixes.

Signed-off-by: Klaus Zimmermann <klaus_zimmermann@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(-)
 delete mode 100644 docs/source/classes/cf.List.rst

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`                                  |
 +------------------+----------------------------------------+----------------------------------------------------+
 
 ===============================  =======================================================================