|
From: <ef...@us...> - 2008-06-17 21:01:46
|
Revision: 5586
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5586&view=rev
Author: efiring
Date: 2008-06-17 14:01:29 -0700 (Tue, 17 Jun 2008)
Log Message:
-----------
Accepted coding guide; deleted notes from outline.rst
Modified Paths:
--------------
trunk/matplotlib/doc/devel/outline.rst
Modified: trunk/matplotlib/doc/devel/outline.rst
===================================================================
--- trunk/matplotlib/doc/devel/outline.rst 2008-06-17 19:07:51 UTC (rev 5585)
+++ trunk/matplotlib/doc/devel/outline.rst 2008-06-17 21:01:29 UTC (rev 5586)
@@ -62,7 +62,7 @@
the artist John has author ?
transforms Michael submitted John
documenting mpl Darren submitted John, Eric, Mike?
-coding guide John in review Eric
+coding guide John complete Eric
and_much_more ? ? ?
=============================== ==================== =========== ===================
@@ -136,105 +136,3 @@
- Done. It's pretty extensive, thanks to STIX... - MGD
-coding guide (reviewed by EF)
------------------------------
-
-Mostly fine (see :ref:`coding-guide`), just a few comments.
-Also, there are a couple of typos, but I would rather just edit those
-directly in another pass (if you don't happen to find them) than
-include them as formal review notes.
-
-#. DONE - Import recommendation for ma: given that the trunk is
- requiring numpy 1.1, perhaps we should be consistent and
- recommend the form::
-
- import numpy.ma as ma
-
- for use in the trunk.
- A note about the difference between the two forms and the
- history can stay in place, and the alternative form would
- still be required for the maintenance branch, I presume.
-
-#. This is peripheral, but regarding the example::
-
- mpl.rcParams['xtick.major.pad'] = 6
-
- At least at the application level, I think we should move
- towards using validation routinely when setting rcParams,
- to reduce a source of hard-to-find bugs. I don't know to
- what extent Darren's traits-based system takes care of
- this, but if it does, that is a big point in its favor.
- There are alternatives (e.g. building validation into the
- rc() function and using that instead of setting the
- dictionary entries directly), if necessary.
-
- Darren notes:
-
- Validation is actually built into RcParams. This was done
- just prior to development of the traited config, validation is done using
- the mechanisms developed in rcsetup. For example::
-
- >>> rcParams['a.b']=1
- ---------------------------------------------------------------------------
- KeyError Traceback (most recent call last)
-
- /home/darren/<ipython console> in <module>()
-
- /usr/lib64/python2.5/site-packages/matplotlib/__init__.pyc in __setitem__(self, key, val)
- 555 except KeyError:
- 556 raise KeyError('%s is not a valid rc parameter.\
- --> 557 See rcParams.keys() for a list of valid parameters.'%key)
- 558
- 559
-
- KeyError: 'a.b is not a valid rc parameter.See rcParams.keys() for a list of valid parameters.'
-
- also::
-
- rcParams['text.usetex']=''
- ---------------------------------------------------------------------------
- ValueError Traceback (most recent call last)
-
- /home/darren/<ipython console> in <module>()
-
- /usr/lib64/python2.5/site-packages/matplotlib/__init__.pyc in __setitem__(self, key, val)
- 551 instead.'% (key, alt))
- 552 key = alt
- --> 553 cval = self.validate[key](val)
- 554 dict.__setitem__(self, key, cval)
- 555 except KeyError:
-
- /usr/lib64/python2.5/site-packages/matplotlib/rcsetup.pyc in validate_bool(b)
- 56 elif b in ('f', 'n', 'no', 'off', 'false', '0', 0, False): return False
- 57 else:
- ---> 58 raise ValueError('Could not convert "%s" to boolean' % b)
- 59
- 60 def validate_bool_maybe_none(b):
-
- ValueError: Could not convert "" to boolean
-
-
-
-#. DONE - You give the example::
-
- import matplotlib.cbook as cbook
-
- Should there also be a list of the standard variants like
- ``mtransforms``? (And, again peripherally, I would
- shorten that one to ``mtrans``.)
-
-#. DONE - The treatment of whitespace is split into two parts
- separated by paragraphs on docstrings and line length;
- this can be consolidated. It might be worth mentioning
- the ``reindent.py`` and ``tabnanny.py`` utilities here.
-
-#. DONE - (removed first person usage) - Minor question of literary
- style: should use of the first person be avoided in most places?
- It is used, for example, in the discussion of the automatic kwarg
- doc generation. I don't mind leaving the first person in, with the
- general understanding that it means you.
-
-#. DONE - Licenses: you might want to add a link to your
- explanation of your BSD choice. Peripheral question: is
- there any problem with basemap's inclusion of
- sub-packages with the gamut of licenses, GPL to MIT?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|