[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Reduce code duplication in storage.devices.

On Fri, 14 Jan 2011, Brian C. Lane wrote:

On Thu, Jan 13, 2011 at 10:28:39AM -0600, David Lehman wrote:
 devices.py |  940 +++++++++++++++++++------------------------------------------
 1 file changed, 308 insertions(+), 632 deletions(-)

This patch set, especially #4, removes a bunch of code duplication in
the Device classes' setup/teardown/create/destroy methods.

The only part I'm not totally happy with is the UI stuff. I like the
idea, but it seems less than elegant. Ideas for improvement are welcome.

I know I'm late to the party ;) But is there a reason not to use
docstrings for long comments explaining what is going on? At some point
it would be nice if running doxygen on the code would generate useful

I tried this back in 2006 (api target and docs/api.cfg), but it didn't
really go anywhere.

When we got started on the storage system rewrite, we all did a pretty
good job of making use of Python docstrings.  In this case though, the
functions he's commenting on are internal.  I don't think comments on
those should be exposed to external module users, so I agree with the use
of '#'.

If someone wants to ressurect the doxygen effort and get a constantly
regenerating set of anaconda API docs, feel free.  I had a cron job taking
care of that and uploading it to my fedorapeople page (last run is still
there, I think).  I didn't find the doxygen output as useful as
"help(TOPIC)" in ipython.

David Cantrell <dcantrell redhat com>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Honolulu, HI | UTC-10

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]