Re: [Zope3-dev] ZCML, functional testing and buildout
On Nov 29, 2006, at 3:01 AM, Christian Theune wrote: Hi, Jim Fulton wrote: I think package-includes or something like an egg basket could be useful for an application, like plone, that wants to support extension by non-developers. But for developers, I think direct zcml includes is better. Ok, I've been starting to transform this in our project to this approach, and for that to work the instance recipe needs to be able to somehow involve the custom ZCML in the instance. You said you didn't like the package-includes, but IIRC you don't like skeletons either. Am I missing something? (I've stripped everything down to a single package-include for now, so it keeps working for us.) My intention, when I have time is to write a new Zope3 instance recipe that takes a single zcml file that defines the application and that doesn't do anything with package-includes or otherwise try to emulate the existing site.zcml. Jim -- Jim Fulton mailto:[EMAIL PROTECTED]Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporationhttp://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] ZCML, functional testing and buildout
Hi, Jim Fulton wrote: My intention, when I have time is to write a new Zope3 instance recipe that takes a single zcml file that defines the application and that doesn't do anything with package-includes or otherwise try to emulate the existing site.zcml. Ok. Many thanks for the clarification. I'll stop nagging you for now and will try to notice when you're working on a new recipe to get you more questions then. :) Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] ZCML, functional testing and buildout
Christian Theune wrote: Hi everyone, Thomas Lotze and I were working on creating a zc.buildout for one of our internal projects. The ZCML of our application is loaded using the 'package-includes' mechanism. I think this is a bad idea. I think for serious development, package-includes is a bad idea. For our projects, we *never* use package-includes. To support functional testing, a 'kita-ftesting.zcml' slug was placed in the 'package-includes' and - as far as I can tell - this takes care to only load this ZCML when running functional tests. I have no idea what you are trying to say. We're having a problem with the buildout integration at this point, as for the testrunner we are using the zc.recipe.testrunner recipe. However, the functional testing ZCML is placed in the instance part, but the testrunner does not know anything about this (should it?). You'll need to use the working-directory option in the testrunner recipe to get it to run from the instance. The functional test code in zope.app.testing.functional *assumes* that the current working directory is an instance directory. :( Here's the question: what would be a good way to get the test runner load the correct ZCML for running tests? IMO, the package you want to test should define it's own ftesting.zcml and define a zcml-based test layer based on that. see zc.sharing as an example. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] ZCML, functional testing and buildout
Hi, Jim Fulton wrote: Christian Theune wrote: Hi everyone, Thomas Lotze and I were working on creating a zc.buildout for one of our internal projects. The ZCML of our application is loaded using the 'package-includes' mechanism. I think this is a bad idea. I think for serious development, package-includes is a bad idea. For our projects, we *never* use package-includes. Can we declare package-includes to be bad in general than and abandon it please? At least tell everyone not to use it if possible? To support functional testing, a 'kita-ftesting.zcml' slug was placed in the 'package-includes' and - as far as I can tell - this takes care to only load this ZCML when running functional tests. I have no idea what you are trying to say. The 'package-includes' mechanism is set up in a normal instance that site-zcml does not load *-ftesting.zcml slugs, whereas ftesting.zcml does includes *-ftesting.zcml slugs, so you can 'safely' place your ftesting configuration there. We're having a problem with the buildout integration at this point, as for the testrunner we are using the zc.recipe.testrunner recipe. However, the functional testing ZCML is placed in the instance part, but the testrunner does not know anything about this (should it?). You'll need to use the working-directory option in the testrunner recipe to get it to run from the instance. The functional test code in zope.app.testing.functional *assumes* that the current working directory is an instance directory. :( Ah. I didn't make the connection in my brain to make the test runner change the working directory. That sounds reasonable right now. Here's the question: what would be a good way to get the test runner load the correct ZCML for running tests? IMO, the package you want to test should define it's own ftesting.zcml and define a zcml-based test layer based on that. see zc.sharing as an example. Ah. I forgot to use zc.sharing as a buildout example. Thanks, Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] ZCML, functional testing and buildout
Christian Theune wrote: Hi, Jim Fulton wrote: Christian Theune wrote: Hi everyone, Thomas Lotze and I were working on creating a zc.buildout for one of our internal projects. The ZCML of our application is loaded using the 'package-includes' mechanism. I think this is a bad idea. I think for serious development, package-includes is a bad idea. For our projects, we *never* use package-includes. Can we declare package-includes to be bad in general than and abandon it please? At least tell everyone not to use it if possible? There are more opinions than just mine. :) I think package-includes or something like an egg basket could be useful for an application, like plone, that wants to support extension by non-developers. But for developers, I think direct zcml includes is better. I've been meaning to write up some thoughts on this topic for some time. Hopefully, I'll find time for it soon. :) Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] ZCML, functional testing and buildout
Hi, Jim Fulton wrote: Christian Theune wrote: Can we declare package-includes to be bad in general than and abandon it please? At least tell everyone not to use it if possible? There are more opinions than just mine. :) I think package-includes or something like an egg basket could be useful for an application, like plone, that wants to support extension by non-developers. But for developers, I think direct zcml includes is better. Right. I guess in our case the package-includes isn't needed. But if we do support it, it should be supported well. I've been meaning to write up some thoughts on this topic for some time. Hopefully, I'll find time for it soon. :) I'm very happy with zc.buildout in general and look forward to start using it much more, but the recipes need some polish and some of the integration issues just start coming up while we're using it and make me a bit nervous about using it full-scale. We'd love to contribute, so having some guidance on the ideas would be very appreciated. Christian -- gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 - fax +49 345 122 9889 1 - zope and plone consulting and development signature.asc Description: OpenPGP digital signature ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] ZCML, functional testing and buildout
Christian Theune wrote: ... I've been meaning to write up some thoughts on this topic for some time. Hopefully, I'll find time for it soon. :) I'm very happy with zc.buildout in general and look forward to start using it much more, Great! but the recipes need some polish Yup, especially the Zope 3 instance recipe. and some of the integration issues just start coming up while we're using it and make me a bit nervous about using it full-scale. Yes, of course. It is early and we're in a bit of a prototyping mode, learning from experience and making things better incrementally. We'd love to contribute, so having some guidance on the ideas would be very appreciated. Ok, I'll think about that. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com