[SciPy-Dev] scikits contribution?

Jonathan Stickel jjstickel@vcn....
Fri Jul 16 12:19:16 CDT 2010


On 7/16/10 11:00 , scipy-dev-request@scipy.org wrote:
> Date: Fri, 16 Jul 2010 01:02:18 -0400 From: josef.pktd@gmail.com
> Subject: Re: [SciPy-Dev] scikits contribution? To: SciPy Developers List
> <scipy-dev@scipy.org> Message-ID:
> <AANLkTinLWTTMkfvp7lZl-e71dLI0mvMtti2wzICxdBKs@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jul 15, 2010 at
> 5:47 PM, Jonathan Stickel <jjstickel@vcn.com> wrote:
>> >  On 7/15/10 15:14 ,scipy-dev-request@scipy.org  wrote:
>>> >>  Date: Thu, 15 Jul 2010 20:02:52 +0000 (UTC)
>> >  ?>  From: Pauli Virtanen<pav@iki.fi>
>> >  ?>  Subject: Re: [SciPy-Dev] scikits contribution?
>> >  ?>  To:scipy-dev@scipy.org
>>> >>  Jonathan Stickel wrote: [clip]
>>>>> >>>  >  ?$ python setup.py register sdist bdist_egg upload -s
>>> >>  [clip: distutils error]
>>>>> >>>  >  ?"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/
>>> >>  python2.6/distutils/command/upload.py",
>>>>> >>>  >  ?line 133, in upload_file
>>>>> >>>  >
>>>>> >>>  >  ?IndexError: tuple index out of range
>>>>> >>>  >
>>>>> >>>  >
>>>>> >>>  >  ?It looks like the index was created OK, but no source or binary package
>>>>> >>>  >  ?was uploaded. ?Any help on this?
>>> >>  I think I remember seeing this too. This is some distutils bug, I think...
>>> >>
>>> >>  My "fix" was just to edit the "distutils/command/upload.py" and replace
>>> >>
>>> >>  ? ? ? value = value[1]
>>> >>
>>> >>  on line 133 by the obvious
>>> >>
>>> >>  ? ? ? if len(value)>  ?1:
>>> >>  ? ? ? ? ? value = value[1]
>>> >>  ? ? ? else:
>>> >>  ? ? ? ? ? value = ""
>>> >>
>>> >>  and hope for the best. Or maybe I ran "upload" on a separate line from
>>> >>  the "sdist" and "bdist".
>>> >>
>>> >>  This is maybe not how it should go.
>>> >>
>>> >>  You can also upload the tarballs on the PyPi website.
>> >
>> >  Ah, this seems to be it. ?I uploaded the egg using the website.
> It would be better to upload also the sdist,
> Since scikits.datasmooth is pure python, an egg doesn't really have an
> advantage and is specific to a python version, py2.6 only.
> (I'm on py25)
>
> Why do you have the code duplication in two modules and the
> conditional import in __init__.py ?
> try:
>      from regularsmooth import *
> except ImportError as error:
>
> What is the import error that might occur with regularsmooth ?
>
> Also an example to quickly try out the scikit would be very useful.
> (And tests and docs are not included yet.)
>

Thanks for the feedback.  I was confused what was the "sdist", but I 
think I figured it out and uploaded it.

I will get to examples, tests, and docs later when I have time (this 
will require more learning for me).  The functions are well documented 
and the primary use function "smooth_data" shows an example.

There are two primary implementations: "smooth_data" that includes 
cross-validation, and "smooth_data_constr" which will take constraints 
but does not include cross-validation.  The later requires the module 
"cvxopt".  If this is not available, I wanted to allow a user to still 
use the unconstrained smoother.  Maybe there is a better way to do this 
than my "try/except" hack.  Suggestions are welcome.

Jonathan


More information about the SciPy-Dev mailing list