From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5875 invoked by uid 1002); 27 Nov 2003 09:08:01 -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 6806 invoked from network); 27 Nov 2003 09:08:00 -0000 X-WM-Posted-At: mailandnews.com; Thu, 27 Nov 03 04:08:00 -0500 From: Jason Stubbs To: gentoo-portage-dev@gentoo.org Date: Thu, 27 Nov 2003 18:07:44 +0900 User-Agent: KMail/1.5.93 References: <1069588805.28236.17.camel@antares.hausnetz> <200311271703.47562.jasonbstubbs@mailandnews.com> <20031127084244.GA29988@unm.edu> In-Reply-To: <20031127084244.GA29988@unm.edu> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200311271807.45306.jasonbstubbs@mailandnews.com> Subject: [gentoo-portage-dev] Portage Modularisation X-Archives-Salt: 3a91e431-1c06-411e-8759-9cca43e99ff9 X-Archives-Hash: 88f4b1e16e29c1144a6c099ecf99a2d8 On Thursday 27 November 2003 17:42, Jason Mobarak wrote: > 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 Will research up on that. > > I can checkout your module by CVS daily and then send you patches if you > > like. > > 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. I have a machine that is always on and connected but is not publicly accessible. If you could set that up with shamash that would be great. > > b) You document and separate and I unit test what has been completed. > > I like (b), Okay. Will research unit tests quicker. ;-) > > 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. That's good to hear. Otherwise would be a bit demotivating... > Also, please subscribe to the "gentoo-portage-dev" mailing list. I am going > to CC this message to the mailing list. Was already there. Even without a role in the development, I still like to know what's going on. ;-) Regards, Jason Stubbs -- gentoo-portage-dev@gentoo.org mailing list