Archive for November, 2009

collective.remove

Posted in plone on November 30, 2009 by toutpt

Plone has lots of features. collective.remove is a project to remove some features from Plone and be usefull to integrators.

Why ? My customer don’t need them and for performance purpose, it’s good to remove things not used.

What ? This project has three eggs at the moment:

To know what to remove, it’s per project need. For example I’m using TinyMCE on my last project, so I have removed kupu. Vicent Fretin tells me rules tab permission check is slow and I don’t need it. Limi has tweet kss make Plone slower so I have removed it.

The goal is to remove one thing at a time when a feature is not needed. Most of the time I was doing this in the policy but I have written the same thing multiple times, so lets released it in a reusable package.

It is more than uninstall profiles. It is uninstall packages.

Advertisements

Import contents & keywords with generic setup

Posted in plone on November 17, 2009 by toutpt

I really like generic setup to build plone instance.

But, I was not able to do some things like setup contents (folders for structure, documents to make some example pages, …), keywords and portlets.

Note: The default import structure step of Plone doesn’t do enought things for me, and I find it hard to use. So I have contributed to some third part modules:

CSVReplicata

csvreplicata first give you a way to import/export content within the csv file format. So you can import/export atcontent types (and more) with it. I have added a csvimportStep to be able to use it with genericsetup:

def importcsvStep(context):
"""This step give you a way to import content in your website with
csvreplicata.

How it works:
read replicata.cfg file to load configuration

read replicata.csv and call csvreplicata with the config.

Config:
[replicable_types]
#List schemata for each types you want to import
#Folder : default, categorization, dates, ownership, settings
#News Item : default

Document: default

[settings]
#list here every csv settings that will be given to replicator.importcsv
encoding:utf-8
delimiter:,
stringdelimiter:"
datetimeformat:%d/%m/%Y
wf_transition = publish
conflict_winner:SERVER

"""

So you just have to drop replicata.csv and replicata.cfg files in your profile to be able to import contents in your Plone site. An other way of doing, is to create the content with Plone, then export it, and save the file in your profile.

PloneKeywordManager

I have done the same with PloneKeywordManager. There is a new import step named ‘keywords’. It reads a ‘keywords.txt’ file in the current profile, it creates a document called ‘keywords’. The file must have one keyword per line. It is simple and it works.

Note: To use this you need to use the svn collective trunk version at the moment but they will be released soon.

Portlet ??

Now I m trying to make the same thing with portlets but I don’t have any idea how to do this. If any one has ideas about this, please mail me, I would be glade to implement it !

My Sprint Report : Funkload and Buildbot @ ploneconf2009

Posted in plone on November 2, 2009 by toutpt

Plone need to reach a new QA level: Adding nightly performance tests. It is important when you make a modification on the code to know if there is a impact on the performance of the application. As Elisabeth said in the “unloading plone” conference, measure !

To understand and use technologies, you first need to know what are the names of all these packages:

  • Funkload Functional and load web tester
  • Buildbot System to automate the compile/test cycle
  • collective.coreloadtests Three funkload tests for Plone + some setup profiles
  • collective.loadtesting One buildout to setup a buildbot with funkload + some examples.
  • collective.funkload Complex functional load testing and benchmarking
  • collective.buildbot A set of zc.buildout recipes and support for declarative configuration for Buildbot
  • collective.recipe.funkload Easy running of funkload tests and generation of reports.

So what has been done during the sprint:

Day One

I have reviewed pasteFunBot. I have kept some scripts and the template script but I have removed all the templates.

I have read the code of most of the differents eggs and tryed most of them.

What I had in mind before starting:

  • Buildbot + Plone4 + Funkload + coreloadtests
  • Use collective.loadtesting as an example
  • Add a paster script to start continuous performance tests faster

By the end of the day 1 I have done collective.funkbot a paster that create a new performance test bot in three questions:

  • vcs [‘svn’]
  • vcs_url [”]
  • email [”]

In the Plone community we are using buildout, so the vcs_url is supposed to be the buildout url to checkout / update every night. email is the email adress where will be sent the reports. Also if the buildbot failed to build the buildout, a mail with all stdio will be sent.

At the end of the day I had some troubles with funkload. I was not able to launch performance tests.

Day Two

In the morning tomlazar and vincinc has helped me and I have disovered their work on collective.recipe.funkload done during the last performance sprint in Bristol. In fact funkload script need to know in which eggs it can looking for tests. I have find a bug and fixed it. So now there are a new released of this egg (done with mkrelease)

After lunch I had decided to work on Plone4 buildout to fix coreloadtests.cfg. Because I m new to the community I had done this work under the collective.funkbot repository (still collective but not svn plone).

Next I have used my paster to initialize the buildout of the futur nighly performance bot (still under collective.funkbot repository)

Before the sprint report of the day I have succeed in fixing most of bugs. The only remaining one was on the creation of the plone4 site. That has been a bit funny to report this: “I had succeed except I can’t create a Plone site …”

After this report I have finished and add the ability to collective.recipe.plonesite to create a Plone4 site. I have next discovered a bug with the basic theme of Plone, so I have report it to limi and added the profile of plonetheme.sunbirst to launch funkload.

I have also refresh a bit coreloadtests by moving genericsetup registrations and steps in zcml.

I have also made this report :)

You can check this picture:

TODO

  • Push my patch on plone4 buildout
  • Refresh the scripts that send the performance reports by email (atm their is a simple python script) and the one who serve html reports throw paste server #static (this one is also used by links inside the email)
  • Make a better documentation
  • Make contentgenerator faster (it seems not working at all)

Conclusion

I want to thanks my companie Makina-Corpus to have give me the ability to comes to conference and sprint.

I want to thanks the Plone community to be so full of great and impressive people !

I have learn a lot about many different topics (hosting, testing, performances, futur of Plone, …)

I want to be at the next sprints and at the next Plone conferences !

I will continue to work on that topic, so to stay connected, you can follow me on twitter with the nickname toutpt that you can’t pronounce in english, so if you try , do it like “toopatai” :)

Links