List Info

Thread: Improved Python wrapper library




Improved Python wrapper library
user name
2007-03-08 07:36:49
I've been working with a few different CC applications over
the past
month, and have realized that we have a few different ways
of wrapping
and manipulating license metadata.  In some cases (such as
the API and
License Engine), we have code that does the same thing in
two
different ways.  This sucks.

I spent some time last night writing up a description of a
unified
cc.license API that would replace a lot of our existing
code.  The
document is attached and is written in the form doctests
(http:/
/docs.python.org/lib/module-doctest.html) which describe
how
someone would use the API for working with licenses.  If
anyone on the
list uses Python to work with CC licenses, I'd appreciate
any feedback
you have.  I don't have a time table for implementing this,
but wanted
to let people see where I think this is going.

There are a few areas that are less than vapor: handling of
work
metadata, the question/answer api and a thorough discussion
of
localization.  If you have ideas or feel passionately about
any of
these, please feel free to contribute.  The document is in
our SF.net
svn repository (http://sf.net/projects
/cctools) in the cc.license
module.

Comments, feedback, etc welcome.

Nathan

-----
Nathan R. Yergler
Senior Software Engineer
Creative Commons

ht
tp://wiki.creativecommons.org/User:NathanYergler

_______________________________________________
cc-devel mailing list
cc-devellists.ibiblio.org
ht
tp://lists.ibiblio.org/mailman/listinfo/cc-devel

  
Re: Improved Python wrapper library
country flaguser name
South Africa
2007-03-08 13:23:36
On Thu, 2007-03-08 at 08:36 -0500, Nathan R. Yergler wrote:
> I've been working with a few different CC applications
over the past
> month, and have realized that we have a few different
ways of wrapping
> and manipulating license metadata.  In some cases (such
as the API and
> License Engine), we have code that does the same thing
in two
> different ways.  This sucks.
> 

Is there a current PHP implementation of this code? If not,
I would
fully be willing to take it on. Unfortunately my Python
skills are
probably not up to scratch, but we use a lot of CC stuff in
our code,
and this could be really useful.

Oh, and perhaps I should introduce myself - sorry!

I am Paul Scott, manager and developer of the Free Software
Innovation
unit based at the University of the Western Cape in Cape
Town, South
Africa. We have coded a PHP5 based framework called Chisimba
that we
have almost fully integrated the CC licence stuff into to
cover almost
all aspects of the framework. All code is GPL licenced, and
all of our
releases, presentations, media, courseware etc is licenced
under a
CC-BY-SA licence.

Let me know if I can help out!

--Paul


All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content
/mail_disclaimer/index.htm 

_______________________________________________
cc-devel mailing list
cc-devellists.ibiblio.org
ht
tp://lists.ibiblio.org/mailman/listinfo/cc-devel

Re: Improved Python wrapper library
user name
2007-03-08 23:04:16
On Thu, 2007-03-08 at 14:58 -0500, Nathan R. Yergler wrote:
> There's not even a Python implementation of the code
described by that
> document; it's purely vapor at this point.  That said,
a PHP
> implementation would be great.  I don't have the PHP
skillz to say if
> this is the right sort of API for PHP.  I tried to make
it "Pythonic"
> so it'd be natural to use in all of our existing Python
projects.
> 
OK, no worries. I can work the PHP around just about any
style of API. 
It wouldn't be the first time that I have adapted a Python
project to
PHP! 

> Do you know what sort of testing support PHP has?  One
thing I really
> want for the Python version is a full test suite (hence
writing the
> docs/tests first).  I think that'd probably be
desirable for a PHP
> implementation, too.

PHP5 has decent support for Unit tests and automatic API doc
generation
etc. It is a little difficult to get going, but I do already
have a test
server for PHP that runs automated testing for me. It would
just mean
adding an additional test suite to that.

--Paul


All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content
/mail_disclaimer/index.htm 

_______________________________________________
cc-devel mailing list
cc-devellists.ibiblio.org
ht
tp://lists.ibiblio.org/mailman/listinfo/cc-devel

Re: Improved Python wrapper library
user name
2007-03-09 06:50:45
On 3/9/07, Paul Scott <pscottuwc.ac.za> wrote:
>
> On Thu, 2007-03-08 at 14:58 -0500, Nathan R. Yergler
wrote:
> > There's not even a Python implementation of the
code described by that
> > document; it's purely vapor at this point.  That
said, a PHP
> > implementation would be great.  I don't have the
PHP skillz to say if
> > this is the right sort of API for PHP.  I tried to
make it "Pythonic"
> > so it'd be natural to use in all of our existing
Python projects.
> >
> OK, no worries. I can work the PHP around just about
any style of API.
> It wouldn't be the first time that I have adapted a
Python project to
> PHP! 
>
> > Do you know what sort of testing support PHP has? 
One thing I really
> > want for the Python version is a full test suite
(hence writing the
> > docs/tests first).  I think that'd probably be
desirable for a PHP
> > implementation, too.
>
> PHP5 has decent support for Unit tests and automatic
API doc generation
> etc. It is a little difficult to get going, but I do
already have a test
> server for PHP that runs automated testing for me. It
would just mean
> adding an additional test suite to that.

Great; are there some docs on getting that going?  I'm just
curious
how it works.  If you're thinking about implementing a
similar API in
PHP, you might want to look at the current API docs
(http://api.creativecom
mons.org), as they provide some information
about how we currently do things.  Note that in the existing
case and
the new, proposed API, we'll just be wrapping an XSLT
processor using
the XSLT in the license_xsl Subversion module
(http://cctools.svn.sourceforge.net/viewvc/cctools/l
icense_xsl).



>
> --Paul
>
>
> All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/uwc2006/content
/mail_disclaimer/index.htm
>
> _______________________________________________
> cc-devel mailing list
> cc-devellists.ibiblio.org
> ht
tp://lists.ibiblio.org/mailman/listinfo/cc-devel
>
>
_______________________________________________
cc-devel mailing list
cc-devellists.ibiblio.org
ht
tp://lists.ibiblio.org/mailman/listinfo/cc-devel

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )