From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22017 invoked by uid 1002); 27 Nov 2003 08:46:58 -0000 Mailing-List: contact gentoo-portage-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail Reply-To: gentoo-portage-dev@gentoo.org X-BeenThere: gentoo-portage-dev@gentoo.org Received: (qmail 30747 invoked from network); 27 Nov 2003 08:46:55 -0000 Date: Thu, 27 Nov 2003 01:42:44 -0700 From: Jason Mobarak To: Jason Stubbs Cc: gentoo-portage-dev@gentoo.org Message-ID: <20031127084244.GA29988@unm.edu> References: <1069588805.28236.17.camel@antares.hausnetz> <200311271548.01028.jasonbstubbs@mailandnews.com> <20031127065907.GA28671@unm.edu> <200311271703.47562.jasonbstubbs@mailandnews.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200311271703.47562.jasonbstubbs@mailandnews.com> X-Accept-Language: en-us, en X-Operating-System: Gentoo GNU/Linux X-GPG-Fingerprint: 215D 0E9C 0B69 7BA0 B6D3 C1D6 052C 5B49 2EA8 A676 User-Agent: Mutt/1.5.4i Subject: [gentoo-portage-dev] Re: [gentoo-dev] Web-based Portage Frontendg X-Archives-Salt: 9c4502b7-5a21-4e4e-98e7-e4e42c2d437c X-Archives-Hash: 01815278543e818bde676581db7ec76b On 17:03 Thu 27 Nov , Jason Stubbs wrote: [...] > Okay, so the unit tests are more for the separation of portage rather than the> documentation of it. I did a little search on the definition of unit test and > found "Controlled evaluation performed by a system programmer in the > Development step to ensure that a piece of program code performs as defined > in the specification". Hence, my question. Now, I understand what you want. To define unit tests with more precision I'll give a portage example -- carpaski changes massive amounts of global variables, moving them around so that the portage module isn't dependant on modifying globals (which is a *very* *very* bad practice in python, you should always know where variables are being modified and not have "procedures" that modify stuff in the global namespace, or any other namespace except the most immediate one -- saves headaches and makes for saner code). These changes to reliance on globals variables has the potential of breaking many facets of portage the API, so you need a set of tests that spans across all of portage and effectively tests everything for proper behaviour, if a failure is encounter it can be quickly located and diagnosed. Somethings you need to do to get up to speed on unit tests: 1) Read the documentation for the unittest module in the Python standard library. 2) Read http://pyunit.sourceforge.net/pyunit.html 3) Get a CVS CO of Twistedmatrix.com's CVS and look over how they do there unit tests, they use their own implementation of unittest but the differences are minor > > If you want to add documentation to portage, please look at epydoc.sf.net , > > which is basically javadoc for python, this is what I want to use to > > document portage, it allows for very easy generation of different > > documentation formats. > > I checked that out when you first mentioned it. It seems pretty easy to use. I > noticed some documentation already existing in emerge and portage.py. Most of > the important stuff has no documentation at all, though. [...] > I can checkout your module by CVS daily and then send you patches if you like. > As for coordination, there's basically three steps: document, separate, test. > If there's only two of us, then I think there's two ways to attack it: This is kind of going to be PITA, we need CVS, sometime in the future I'll find out if we can get you a developer account, but for the time being if you have a dedicated server that you can set up CVS on that'd be great, otherwise I can set you up with an account on my machine (shamash.eece.unm.edu) which is on a university network and "always on and reliable". Shamash has CVS and we can set up a portage module on there and I'll do regular commits of our combined changes to gentoo-src. > > a) I work through documenting everything while you work through separating > everything that's documented. Once the documenting is done, I can begin unit > testing and you can join me once the separation is done. b) You document and > separate and I unit test what has been completed. I like (b), [...] > BTW, will this work become redundant by portage-ng? I hope after portage is separated into a library the code can be incorporated into "portage-ng", we could very well be working on the beginnings of the next generation of portage. I want to add "layers" to how everything interacts, key design patterns being heavy focusing on "plug-in" orientation and model-view-control. Some keywords you should research if you are interested in this are Mix-In style programming and the use of interfaces to abstract aggregate interaction between sections of a program. "Portage-ng" is being touted as a complete rewrite currently (from what I remember) and it seems senseless to throw away the 10k lines of code that make up the current portage system. Also, please subscribe to the "gentoo-portage-dev" mailing list. I am going to CC this message to the mailing list. -- -------------------------~ ----------Jason-A-Mobarak-~ -aether-at-gentoo-dot-org-~ -------------------------~ -- gentoo-portage-dev@gentoo.org mailing list