11 Mar 2010

feedPlanet Plone

Josh Johnson: Adding ZopeSkel to a Buildout

A quick note, if you want to add zopeskel to your development buildout.

All there is to it is to add the following part to your buildout.cfg:

[zopeskel]
recipe = zc.recipe.egg:scripts

eggs = PasteDeploy
       PasteScript
       ZopeSkel

scripts = zopeskel
          paster

Then just enable it by adding zopeskel to the parts parameter of your main [buildout] section.

[buildout]
     parts = zopeskel

When you re-run bin/buildout, buildout will grab the necessary packages, and create a paster and zopeskel script in your bin directory.

Note: I wanted the paster command, since I'm used to ZopeSkel's "standard" user interface. To get this, I had to add the PasteDeploy egg and paster script to the configuration. Feel free to omit it if you just want to use the new "kinder, gentler" interface. I haven't tried it yet, but I believe the explicit inclusion of the PasteScript egg is unnecessary.


11 Mar 2010 3:09am GMT

10 Mar 2010

feedPlanet Plone

Content Here: Text Killed the Multi-Media Star

Recently it occurred to me that video and (to some extent audio) has become a less important requirement for most of my web content management clients these days. If I were to extrapolate the interest trend I was seeing back in 2004, I would expect to see the web resemble billions of tiny television [...] Related posts:

  1. Public Media 2007 .flickr-photo { border: solid 2px #000000; }.flickr-yourcomment { }.flickr-frame {...
  2. First Magnolia On Air Customer Live It looks like the first customer of Magnolia's On Air...
  3. Full text now available I have changed my settings so that the full text...

Related posts brought to you by Yet Another Related Posts Plugin.

10 Mar 2010 12:12pm GMT

09 Mar 2010

feedPlanet Plone

JC Brand: Plone4 Beta 1 egg available

Eric Steele, the Plone 4 release manager, has released the Plone 4 beta 1 egg to the cheese shop.

09 Mar 2010 1:02pm GMT

Reinout van Rees: Long-running GIS web application: ideas needed

I'm working on a Django web application that displays a map and lots of GIS data from various sources. A pretty elaborate mapping application, so two things are a priority:

  • Interaction must be fast.
  • The map's current viewpoint should stay mostly intact. So: if you're zoomed in to an area, you should stay zoomed in on that area next time.

The current solution is to build up almost the entire page with a javascript library (Isomorphic's SmartClient) in an iframe. So sidebar with tree-like navigation, main content area, bar at the top: all handled by SmartClient. In the main content area, OpenLayers shows the map. If there's other content to be shown, an iframe with the other content (mostly html) is shown over the map. So the actual map stays loaded with the current location, zoom level and everything intact.

I have several problems with this solution:

  • Reloading a page takes a long time. Reloading is not what's supposed to be happening, but anyway: initial load takes 30 seconds. I suspect SmartClient instead of the map, but I can't do a real comparison test yet.
  • The UI is handled by SmartClient, so poof goes most of Django's default template handling. I'd much prefer to use Django's template system to build up my UI instead of some javascript library.
  • All the usual iframe drawbacks like non-bookmarkable URLs.

My questions in search of ideas/feedback:

  • Is there a recommended way to keep track of a bunch of map settings? Zoom level, center, enabled layers? In a Django and OpenLayers environment? Continuously sending the data via ajax back to the server and storing it in the user's settings or whatever?
  • Is there an alternative to keep a map alive between requests? Perhaps some dirty hack with a separate window?
  • Should I be afraid of re-loading maps or is that normally not a problem?
  • I'm wondering about ajaxifying most of the django interface: replacing divs (or hiding existing divs) and injecting the main content from another django page into it. Is that practical?

09 Mar 2010 8:01am GMT

08 Mar 2010

feedPlanet Plone

Andreas Jung: Making PyPI sux less

08 Mar 2010 5:35pm GMT

WebLion: Dr. Chuck Severance to Keynote Plone Symposium East 2010

This talk and discussion will consist of three separate, but related, themes focused on strategic opportunities for higher education during the next 20 years. The general argument is: Universities need to apply the concept of "open" across the entire enterprise. The net result will be a blurring of boundaries between universities and the outside world. Thus, the move toward more open, porous approach is a necessity for higher education to maintain their relevance, value, and competitive advantage in a society that becomes increasingly open and openness becomes "expected".

The three topics will be discussed: (1) trends in open technology applied to teaching, learning and collaboration, (2) trends moving toward technology literacy as a core part of the definition of a Liberal Arts education, and (3) trends in content creation and publishing revolutionizing how we will create, publish, and curate intellectual output of higher education. The presentation format will consist of a short strategic thesis on each of three topics, in "lightning talk" style, followed by an interactive discussion about each of the three topics.

Plone Symposium East 2010 -- Training May 24-26 --> Symposium May 27, 28 --> Sprints May 29,30

Why not join us?

Want to be a sponsor? See details - http://bit.ly/ckPjoS

Contact Mike Halm or Christian Vinten-Johansen

08 Mar 2010 2:00pm GMT

07 Mar 2010

feedPlanet Plone

Patrick Gerken: Did you know that you can do version requirement checks in python for backward compatibility?

>>> import pkg_resources
>>> try:
... pkg_resources.get_distribution('distribute>=0.6.0')
... has_06_distribute = True
... except (pkg_resources.DistributionNotFound, pkg_resources.VersionConflict):
... has_06_distribute = False
...
distribute 0.6.8
(/home/patrick/projects/collective_git/Products.CMFEditions/lib/python2.4/site-packages/distribute-0.6.8-py2.4.egg)
>>> try:
... pkg_resources.get_distribution('distribute>=0.8.0')
... has_08_distribute = True
... except (pkg_resources.DistributionNotFound, pkg_resources.VersionConflict):
... has_08_distribute = False
...
>>> has_08_distribute
False
>>> has_06_distribute
True
>>>

Posted via email from Patrick's posterous

07 Mar 2010 11:51pm GMT

Steve McMahon: PloneFormGen: Ready for Plone 4

Plone 4, beta 1, will be out any day now. Get ready to test!

And, when you do, please also test the newest PloneFormGen: version 1.6.0b2, just released, which is compatible with Plone 3.1+ and 4.x.

The bad news is that the new PloneFormGen doesn't have much in the way of new features. The good news is that it was very easy to update PFG to work with both Plone 3 and 4. Everything you need to know to update your Plone add on is well-documented in the Plone Upgrade Guide, thanks to excellent work by Maurits van Rees.

Also updated for Plone 4 are the elements of ScriptableFields.

Thanks to David Glick, Matthew Wilkes and Maurits for assists with the PFG update, most of which was done in Budapest and has been sitting in svn trunk until we got closer to the Plone 4 beta.

07 Mar 2010 1:20am GMT

06 Mar 2010

feedPlanet Plone

Reinout van Rees: Software releases 4: your own pypi

There will always be releases that you do not want to release to the public python package index. Internal company software; just-for-your-own-use software; trying-stuff-out software. What to do with that? Solution: a personal pypi is relatively easy to set up with sdistmaker, provided you use subversion.

What sdistmaker does:

  • It searches through your svn repository, looking for tags. It has support for filtering out sections of your repository structure, so it won't look where you don't want it to.
  • For every tag found, it creates a source distribution ("python setup.py sdist").
  • The source distributions are stored in per-project sub-directories, just like on http://pypi.python.org/simple/ .

Installation and basic usage

A simple easy_install sdistmaker is enough. This gives you two scripts:

  • make_sdist, mainly for test purposes. Pass it an svn tag URL and a destination dir and it will make a release.
  • sdists_from_tags is the main script. It searches an svn structure for suitable tags and makes releases of them.

For starters, just run sdists_from_tags. It will create a var/private directory and fill it with (as an example!) all zest.releaser releases.

Both scripts have a --help option that show all available options and a usage instruction.

Configuration

Configuration is by means of a python file. Easiest way to get started is by printing sdistmaker's own base defaults.py by doing:

$> sdists_from_tags --print-example-defaults

Save the output as a python file (suggestion: defaults.py). You can then adapt it to your liking and use it with sdists_from_tags --defaults-file=defaults.py. The defaults file is documented in-line, so it should be easy to adapt.

Of course, in the end you want to run sdists_from_tags automatically (Unix cron job, svn post-commit hook, etc.)

Usage in a buildout

You can use sdistmaker in a buildout like this:

[buildout]
parts = sdists

[sdists]
recipe = zc.recipe.egg
eggs = sdistmaker
scripts = sdists_from_tags
# arguments =
#     defaults_file='${buildout:directory}/defaults.py',

The defaults.py is created in the same way as above.

Using sdistmaker in combination with the real pypi

A structure like generated with sdistmaker is a perfect index for easy_install and buildout if you let Apache host it. Only problem: you can only have one index (note: pip apparently supports multiple indexes). You can solve this problem by having Apache redirect you to pypi when something is not found.

Here's an example Apache config snippet:

# Allow indexing
Options +Indexes
IndexOptions FancyIndexing VersionSort

# Start of rewriterules to use our own var/private/* packages
# when available and to redirect to pypi if not.
RewriteEngine On
# Use our robots.txt:
RewriteRule ^/robots.txt - [L]
# Use our apache's icons:
RewriteRule ^/icons/.* - [L]
# We want OUR index.  Specified in a weird way as apache
# searches in a weird way for index.htm index.html index.php etc.
RewriteRule ^/index\..* - [L]

# Use our var/private/PROJECTNAME if available,
# redirect to pypi otherwise:
RewriteCond /path/on/server/var/private/$1 !-f
RewriteCond /path/on/server/var/private/$1 !-d
RewriteRule ^/([^/]+)/?$ http://pypi.python.org/pypi/$1/ [L]

# Use our var/private/PROJECTNAME/project-0.1.tar.gz if available,
# redirect to pypi otherwise:
RewriteCond /path/on/server/var/private/$1 !-d
RewriteRule ^/([^/]+)/([^/]+)$ http://pypi.python.org/pypi/$1/$2 [L]

(Correction 2010-03-05 after tip from Marc Rijken: the last two rewriterules had [P,L] instead of [L]. I copied an older version instead of the actually-works config).

Using the index

You can use such a custom apache-served index in two ways. Easy_install has a -i option for passing along an index:

$> easy_install -i http://packages.my.server/ zest.releaser

In buildout, you can set it like this:

[buildout]
index = http://packages.my.server/
parts =
    ...

Software releases series

This post is number four of my releasing python software series.

  • First set up a proper svn structure with trunk/tags/branches.
  • Package your python software with setuptools (or its replacement, distribute) so that you can make proper releases.
  • Take the menial and manual and boring steps out of tagging your releases with zest.releaser.
  • This post showed you how to actually access your proper releases in a handy way (when they're not released on pypi).

The next post I'll describe buildout: controlling which versions of those released packages you use. Repeatable and isolated environment. Handy extra automation tasks.

06 Mar 2010 9:54pm GMT

Four Digits: Yeah! We're Done!

After five weeks of building, cleaning, moving, cleaning, painting, moving and cleaning we're finally done. Under a huge layer of dust we found our office, and after removing this layer the result was amazing.

Not only we've got ourself a brand new kitchen, we also have a massive bar!

Since we moved in here, we talked about our wish and the possibility to create a bar. Every friday after work we evaluate the week and make plans for the next one. We invite friends and business partners to come over and join us. Sometimes we're done at seven, sometimes it results in a great night out!

From now on we can serve drinks from behind our bar, we can sit at our bar and lean at it while making new plans.

the Bar

One of our new plans is to organize a big Plone Sprint in our office. We now have enough room for about twenty people to work on the wonderful product Plone and enough space at the bar to drink something afterwards.

There's only one problem left: What should be our next goal? Any suggestions?

06 Mar 2010 2:45pm GMT

Plumi: Indonesian Video Archive Camp – Looking for Ploneistas

From April 15-17 EngageMedia will be hosting a Plone based Video Archive Camp in Yogyakarta, Indonesia, in collaboration with the Indonesian Visual Art Archive.

The three day camp will continue EngageMedia's work of setting up 4 Plumi based offline video archives with a series of arts/activist partners based in Jakarta and Yogyakarta. [Read background blog post]

We have space at the camp for 2 additional volunteer Ploneistas. A key focus of the camp will be upgrading the four archives to Plumi 3.0, as well as running various workshops with local technologists to enhance their ability to customise of the platform. You'll be working with EngageMedia and the crew from Unweb as regards the workshops. A more detailed breakdown of the event can be found in this pdf.

We can cover all food and accommodation in the lovely surrounds of central Java during the event if you are able to pay your way to Indonesia. If you are interested in attending please contact Andrew at and@engagemedia.org by March 15th.

06 Mar 2010 10:23am GMT

Baiju M: Building a healthy community around FOSS project

Dear Lazyweb, I am looking for suggestions for building a healthy community around one of my FOSS project. Recently I initiated re-launching of Zope 3 project with a new name: BlueBream. You may know from my old posts that I am very interested in Zope 3 and Zope Component Architecture (ZCA). I have written an entire book about ZCA in 2006. You can read more about the new project in the BlueBream project blog. I am looking for your suggestions. You can send mail to me: baiju.m.mail AT gmail.com or add comment here.

Well, I will continue with my past experience with FOSS. This is my second largest FOSS project, the first project which I started in 2001 (SMC) is still very active. However, for the past few years, I am not active in that project. I still watch that project growing (of course, I help them whenever possible). There are more than 500 members in the group itself. The developers regulary meet at various events. They organize lots of workshops, camps etc. SMC might be the most active FOSS project from India. However, there are so many differences between SMC and BlueBream. The scope of these projects is very different. SMC is an i18n,l10n and more over a "local language computing" project. BlueBream is a Python web framework.

These days, I am thinking more about this project and its success. I know, a FOSS project is not just some source code released. There should be active contributors, regular community activities, good documentation, presence in various events etc. So, how to attract contributors to this project. How to build a healthy successful community around this project. At this point, I have taken the role of "self-assigned release manager". I think that's a good way to lead this project. I am looking for your thoughts :)

06 Mar 2010 6:19am GMT

Repoze: Zope.de Reviews BFG Book

Jan Ulrich Hasecke reviews the repoze.bfg book via the Zope.de website (English translation).

06 Mar 2010 5:00am GMT

05 Mar 2010

feedPlanet Plone

WebLion: Cool Things I Learned at PyCon #1: A 17% CPython Speedup

It's been awhile since I wrote any C longer than a few dozen lines, but this clever optimization to Python's main interpreter loop makes me pine for pointers once more. Originally, the body of the eval loop looked something like this:

switch (opcode)
    {
        case OP_ADD:
            /* Do the addition. */
        case OP_JMP:
            /* Do the jump. */
        /* etc. /*
    }

On a modern processor, that sort of thing wreaks havoc with branch prediction, since the predictor has little chance of guessing the right opcode. Pipeline flushes ensue, and performance goes down the toilet.

Fortunately, Antoine Pitrou realized that a gcc extension to C called the computed goto could be tapped to keep the branch prediction from running down the wrong trail. With computed gotos, you can get a pointer to a goto label and later jump to it with a special goto *label syntax. The whole switch statement collapses to a single jump and a dereference of a lookup table, like so:

goto *opcode_targets[*next_instruction++];

This avoids the misleading branches in the code, letting the pipeline fill with useful work rather than with mispredictions that must be rolled back. The result is a 17% speed increase. This lands in Python 2.7 and 3.1.

Stay tuned for other fun nuggets from the conference!

Dive Deeper

05 Mar 2010 10:59pm GMT

Connexions Blog: Connexions Makes the Top 3

The Top Three Ways to Get Free Textbooks, that is

KVUE News in Austin has three suggestions on how to get more textbooks for less. Among their top picks are free online resources, with Connexions first on their list. Students continue to clamor for lower cost textbooks and Connexions aims to please.

Watch the KVUE newscast and read their summary.
Link
The video has also been picked up by MSN Money.

05 Mar 2010 10:48pm GMT