subscribe to this blog

Logilab.org - en

News from Logilab and our Free Software projects, as well as on topics dear to our hearts (Python, Debian, Linux, the semantic web, scientific computing...)

show 204 results
  • hgview 1.0.0 released!

    2009/06/05 by David Douard

    I am pleased to introduce you to the latest kid of the Logilab team: hgview 1.0.0.

    hgview is a very helpful tool for daily work using the excellent DVCS Mercurial (which we heavily use at Logilab). It allows to easily and visually navigate your hg repository revision graphlog. It is written in Python and pyqt.

    This version is an almost complete rewrite of hgview 0.x which had two GUI backends, gtk and qt4. This 1.0 release drops the gtk backend (we may consider reintroducing it, we haven't decided yet... by the way, patches are always welcome). Some may not like this choice, but the immediate benefit of using qt4 is that hgview works like a charm on MacOS X systems.

    http://www.logilab.org/image/9269?vid=download

    Edit: there was a bug in hgview 1.0.0 on Ubuntu hardy. It's now fixed, and I've uploaded a 1.0.1 version deb package for hardy.

    Features

    • 4 different viewers:
      • repository navigator that displays the graphlog efficiently (works well with 10,000 changesets),
      • filelog navigator that displays the filelog of a file (follows files through renames),
      • filelog diff navigator that displays the filelog in diff mode to easily track changes between two revisions of a file,
      • manifest viewer that navigates in the files hierarchy as it was at a given revision.
    • Each viewer offers:
      • easy keyboard navigation:
        • up/down to change revision,
        • left/right to change file (for the repo navigator only),
        • return to display the diff viewer of the selected file,
      • search quickbar (Ctrl+F or /): search in graphlog (search as you type in the currently displayed file or diff, plus a cancellable background search in the revision tree),
      • goto quickbar (Ctrl+G): go to the given revision (accepts id or tag, with completion for tags),
      • navigation history: alt+left/alt+right to navigate backward/forward in the history,
    • can be used alone or as a hg extension,
    • can be configured using standard hg rc files (system, user or per repository),
    • possibility to declare users (with multiple mail addresses) and assign them a given color to make a given user look the same in all your repositories,

    Download and installation

    The source code is available as a tarball, or using our public hg repository of course.

    To use it from the sources, you just have to add a line in your .hgrc file, in the [extensions] section:

    hgext.hgview=/path/to/hgview/hgext/hgview.py

    Debian and Ubuntu users can also easily install hgview (and Logilab other free software tools) using our deb package repositories.


  • The Web is reaching version 3

    2009/06/05 by Nicolas Chauvat
    http://www.logilab.org/image/9295?vid=download

    I presented CubicWeb at several conferences recently and I used the following as an introduction.

    Web version numbers:

    • version 0 = the internet links computers
    • version 1 = the web links documents
    • version 2 = web applications
    • version 3 = the semantic web links data [we are here!]
    • version 4 = more personnalization and fix problems with privacy and security
    • ... reach into physical world, bits of AI, etc.

    In his blog at MIT, Tim Berners-Lee calls version 0 the International Information Infrastructure, version 1 the World Wide Web and version 3 the Giant Global Graph. Read the details about the Giant Global Graph on his blog.


  • Almost reached 1000 tickets

    2009/05/13 by Arthur Lutz

    Logilab.org has almost reached a thousand tickets on the Logilab's open source projects. To be exact there are 940 tickets right now. What kind of tickets are they ?

    Here is a quick graph of the state of the tickets in our tracker :

    http://chart.apis.google.com/chart?cht=p&chs=400x200&chd=e:Dc..Iw9EXV&chtt=Logilab.org+tickets+by+state&chl=deprecated%20:%2020|open%20:%20373|rejected%20:%2051|resolved%20:%20358|validated%20:%20136

    Graphing is neat. Maybe soon we'll get this kind of feature automatically in the CubicWeb forge, see this ticket.


  • Reading SPE files

    2009/05/11 by Andre Espaze
    http://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/CCD.jpg/300px-CCD.jpg

    If you would like to read SPE files from charge-coupled device (CCD) cameras, I have contributed a recipe to the SciPy cookbook, see Reading SPE files.


  • Fetching book descriptions and covers

    2009/05/11 by Nicolas Chauvat
    http://www.logilab.org/file/9139/raw

    We recently added the book cube to our intranet in order for books available in our library to show up in the search results. Entering a couple books using the default HTML form, even with the help of copy/paste from Google Book or Amazon, is boring enough to make one seek out other options.

    As a Python and Debian user, I put the python-gdata package on my list of options, but quickly realized that the version in Debian is not current and that the books service is not yet accessible with the python gdata client. Both problems could be easily overcome since I could update Debian's version from 1.1.1 to the latest 1.3.1 and patch it with the book search support that will be included in the next release, but I went on exploring other options.

    Amazon is the first answer that comes to mind when speaking of books on the net and pyAWS looks like a nice wrapper around the Amazon Web Service. The quickstart example on the home page does almost exactly what I was looking for. Trying to find a Debian package of pyAWS, I only came accross boto which appears to be general purpose.

    Registering with Amazon and Google to get a key and use their web services is doable, but one wonders why something as common as books and public libraries would have to be accessed through private companies. It turns out Wikipedia knows of many book catalogs on the net, but I was looking for a site publishing data as RDF or part of the Linked Open Data initiative. I ended up with almost exactly what I needed.

    The Open Library features millions of books and covers, publicly accessible as JSON using its API. There is even a dump of the database. End of search, be happy.

    Next step is to use this service to enhance the cubicweb-book cube by allowing a user to add a new book to its collection by simply entering a ISBN. All data about the book can be fetched from the OpenLibrary, including the cover and information about the author. You can expect such a new version soon... and we will probably get a new demo of CubicWeb online in the process, since all that data available as a dump is screaming for reuse as others have already found out by making it available as RDF on AppEngine!


  • iclassmethod decorator to define both a class and an instance method in one go

    2009/04/28 by Sylvain Thenault

    You'll find in the logilab.common.decorators module the iclassmethod decorator which may be pretty handy in some cases as it allows methods to be both called as class methods or as instance methods. In the first case the first argument will be the class and the second case it will be the instance.

    Example extracted (and adapted for simplicity) from CubicWeb:

    from logilab.common.decorators import iclassmethod
    
    class Form(object):
      _fields_ = []
    
      def __init__(self):
          self.fields = list(self._fields_)
    
      @iclassmethod
      def field_by_name(cls_or_self, name):
          """return field with the given name and role"""
          if isinstance(cls_or_self, type):
              fields = cls_or_self._fields_
          else:
              fields = cls_or_self.fields
          for field in fields:
              if field.name == name:
                  return field
          raise Exception('FieldNotFound: %s' % name)
    

    Example session:

    >>> from logilab.common import attrdict
    >>> f = Form()
    >>> f.fields.append(attrdict({'name': 'something', 'value': 1})
    >>> f.field_by_name('something')
    {'name': 'something', 'value': 1}
    >>> Form.field_by_name('something')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<stdin>", line 15, in field_by_name
    Exception: FieldNotFound: something
    

    So we get a field_by_name method which will act differently (actually use different input data) when called as instance method or as class method.

    Also notice the attrdict trick that can also be achieved with the Python 2.6 named tuple.


  • Emacs and mercurial trick

    2009/04/03 by Ludovic Aubry
    http://www.logilab.org/image/8863?vid=download

    While using emacs I always find the need to use grep on a terminal to search for things within a specific project. This is not ideal, even within an embedded emacs shell.

    Since I recently discovered the emacs command grep-find I decided to make it work nicely with mercurial projects, and here's the result:

    (defun grep-project (s)
      (interactive "sSearch project for: ")
       (grep-find (concat "files=(`hg manifest`);grep -nH -e \"" s "\" ${files[@]/#/`hg root`/}"))
    )
    (global-set-key (quote [f4]) (quote grep-project))
    

  • Pylint at BayPIGgies

    2009/03/30 by Sandrine Ribeau
    http://farm4.static.flickr.com/3232/3140527012_23d9d97f69_m_d.jpg

    I am pleased to announce that Pylint was presented during a Tools night meeting organized by BayPIGgies on thursday march 26th. This meeting has been recorded and you can enjoy the video.

    One point was missing from the presentation and I'll take the opportunity now to mention it. Flymake, an on-the-fly syntax checker for GNU Emacs which has been discussed, does work in combination with Pylint (please see EmacsWiki for more informations).

    photo by ten safe frogs under creative commons


  • new pylint / astng / common releases

    2009/03/25 by Sylvain Thenault
    http://janckos.net/blog/wp-content/uploads/2008/08/python.png

    I'm pleased to announce releases of pylint 0.18, logilab-astng 0.19 and logilab-common 0.39. All these packages should now be cleanly available through easy install.

    Also, happy pylint users will get:

    • fixed python 2.6 support (pylint/astng tested from 2.4 to 2.6)
    • get source code (and so astng) for zip/egg imports
    • some understanding of the property decorator and of unbound methods
    • some false positives fixed and others minor improvments

    See projects home page and ChangeLog for more information:

    http://www.logilab.org/project/pylint http://www.logilab.org/project/logilab-astng http://www.logilab.org/project/logilab-common

    Please report any problem / question to the python-projects@lists.logilab.org mailing-list.

    Enjoy!


  • broken easy_install support

    2009/03/25 by Sylvain Thenault
    http://3.bp.blogspot.com/_lh41g82r7rk/SHIY6tMEk-I/AAAAAAAAABQ/Xh33EO1oa-U/s200/system-software-install48b.png

    I recently understood why easy_install wasn't able to find so many of our packages anymore.

    The problem was due to a recent change on our website. The project page was ajaxified, and since easy_install uses some screenscrapping techniques to get distribution archives, it can not find the files it is looking for.

    To fix this, we should make our tarballs downloadable from PyPI, by using

    python setup.py register sdist upload
    

    instead of the current:

    python setup.py register
    

    Uploading our public python software packages to PyPI will make them easy_installable in a breeze !


show 204 results