Closed thet closed 8 years ago
Just my opinion, but plone is very plone specific and I barely see top level packages for plone.
True. Just had the this case, for the first time actually.
I created a pull-request for this issue: https://github.com/plone/bobtemplates.plone/pull/118 It is not something I would advertise but I think it's nice to support it and the needed changes are small.
But why add complexity to this package for a feature rarely used?
@pbauer and you are missing adding that on the testing matrix at least :-)
I agree it is a rare case but I wrote the code before the issue was closed. I just found and finished it now. Still if people write toplevel-packages it would be nice if they follow best-practices (which yafowil does not since it is wrongly declared as a namespace-package in https://github.com/bluedynamics/yafowil/blob/master/setup.py#L34 and thus needs a ugly line in https://github.com/bluedynamics/yafowil/blob/master/src/yafowil/__init__.py#L2
@gforcada the matrix does not test the different types at all, only Plone-version (4.3.7, 5.0) and package-types (i.e. Basic, Theme, Dexterity).
@pbauer oh great, then that's fine with me (for anyone who care about my opinion that is :D)
I am -1. It is feature creep. For a rarely used feature two methods get their code paths doubled. https://en.wikipedia.org/wiki/Cyclomatic_complexity I usually don't mind ifs, but not if they are for features that are really uncommon
I tend towards -1 as well because we need to be really careful with adding more complexity. Especially if we do not fully test the options that we have. Another question would be if we consider using namespaces to be best practice (which I think we do). If so a Plone package without a namespace would be bad practice and should not be supported by bobtemplates.plone.
Just to illustrate the use case I had -- I wanted to create a project specific namespace package, e.g. superduper
(fictional name). This would have provided basic functionality and a base API. Then I wanted to create optional addons to that package called superduper.views
, superduper.locales
, superduper.migration
, etc.
I think this is a valid use case and a nice and clean package structure.
@pbauer changes do not add much more complexity and it's even tested.
This product is also about promoting best practices and Plone packages without a namespace are bad practice.
A top level namespace is not a bad practice.
I'd rather not have this discussion here. If you want this clarified, please do this on community.plone.org, where are more people listening.
There is nothing to discuss about because I'm in right. ;)
I really don't mind if you bring this issue on on community.plone.org, because the docs don't say anything about the reasons nor does martin aspelis Professional Plone 4 development say why he uses namespace packages. So there really might be an "Erkenntnisgewinn" But the statistics regarding using non namespace eggs for plone packages don't lie. It is not common practice
I agree about that. But no, I don't feel like wanting to discuss this :)
I just noticed something and paste it here: https://github.com/collective/buildout_helpers/blob/master/setup.py#L22 before somebody else digs through my commit history again and finds me contradicting.
The reason for not using a namespace package here is two fold:
@jensens re 2. point. I wonder why this causes no trouble with zc.buildout...
bobtemplates.plone can only create two- or three- nested namespace package, not a top-level namespace project. It cannot, for example, create a project like
yafowil
- it errors with:Error: 'yafowil' is not a valid packagename.
It would be nice if this could be fixed easily - but it's a corner case. I'm ok with closing this issue, if it's not worth the effort...