[okfn-help] vdm module refactoring
Rufus Pollock
rufus.pollock at okfn.org
Fri Oct 22 19:53:17 UTC 2010
Hi Martijn,
First, great work on all the refactoring!
I've just done a test-merge of your repo into main on my local
machine. I immediately hit some snags related to requirements:
1. I don't think we need the mysql specific imports since vdm might
just be running with postgres or sqlite. These requirements could be
listed in the README but, personally I don't think they are even
needed there since these are requirements of sqlalchemy
2. I don't think setuptools is a requirement since you need that to
even run the setup.py file (note the import setuptools at the top).
setuptools is now pretty standard and if we want to note it we can put
in in the README
3. It seems the code explicitly imports sa_mysql_dt (in base.py).
Given that it would be good if one could install the code for e.g.
postgres usage, without requiring mysql support i think you may want
to try, except ImportError or similar.
Hope this sounds sensible.
Rufus
On 22 October 2010 19:52, Martijn Faassen <faassen at startifact.com> wrote:
> Hi there,
>
> I thought I'd report on the less interesting work I did on vdm too,
> the module refactoring. In summary:
>
> vdm.sqlobject is gone
> vdm.sqlalchemy is there, but only for backwards compatibility,
> importing from vdm
>
> vdm is now where you import from, not vdm.sqlalchemy.
>
> I've also taken the opportunity to:
>
> * gather all imports scattered through the module to the top of the
> module. This makes it easier to analyze import relationships
>
> * change all "from import *" into explicit imports, except in
> __init__.py. This also makes it easier to analyze import
> relationships.
>
> * run pyflakes and remove a lot of unused imports. (there are still a
> bunch of unused variable assignments in tests, but I mostly left them
> intact)
>
> Regards,
>
> Martijn
>
> _______________________________________________
> okfn-help mailing list
> okfn-help at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/okfn-help
>
--
Co-Founder, Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/
More information about the okfn-help
mailing list