Re: [Numpy-discussion] nose changes checked in

2008-06-20 Thread Joshua Lippai
I realise this, but 1659 tests in 8.739s with Nose as opposed to just
over 1000 tests in right around 1 second with the previous test system
means there is some kind of slowdown involved besides just the number
of tests being found. Not that I mind: I'm not looking for blazing
speed when running tests, and this Nose system should make it easier
to manage the tests.

Josh

On Wed, Jun 18, 2008 at 6:35 PM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote:
> 2008/6/19 Joshua Lippai <[EMAIL PROTECTED]>:
>> The new testing system works well over here, built on Mac OS X 10.5.2
>> with GCC 4.2. No errors/failures, but there is that warning Charles
>> mentioned as well as the noticeable difference in speed between this
>> and the old tests.
>
> Nose does a more thorough job of finding tests (which takes some time
> in itself).  It executes 1343 tests, compared to just over 1000
> before.
>
> Regards
> Stéfan
> ___
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-19 Thread Robert Kern
On Thu, Jun 19, 2008 at 11:59, Alan McIntyre <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 18, 2008 at 5:24 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>>> - The signature of numpy.test in 1.2 will be backward compatible with
>>> 1.1, and it will at least return some indication of failure (if not
>>> the same object as in 1.1).  This will, by the way, make it different
>>> from the signature and behavior of scipy.test.
>>
>> scipy.test() should be made to match numpy.test(). scipy.testing was a
>> staging ground for the nose changes in numpy, not a separate branch of
>> development.
>
> Ok. Jarrod mentioned that the intent is to change SciPy over to use
> numpy.testing (and remove scipy.testing) once NumPy's nose transition
> is complete.  Is that something that something that will happen
> simultaneously in the next release, or will SciPy lag behind one
> cycle?

No scipy was released with the new scipy.testing stuff, so scipy
itself is the only customer. We can transition ourselves.

> Either way, at some point in the next few weeks I'll try
> making that change locally just to see if it turns up any surprising
> requirements in the NumPy side.
>
>> For my preference, we should accept the old argument signature with a
>> deprecation warning but prefer the current signature. This is a little
>> hairy, but such is life with deprecations.
>
> Do you want a blanket warning, or only a warning if test() gets
> keyword arguments from the old signature?

The latter, please. I know it's tricky, but it is doable.

> Also, since the numpy.testing.ScipyTestCase and ScipyTest classes
> already had deprecation warnings in 1.1, I'll leave them out in 1.2,
> if that's ok.

Yes.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-19 Thread Alan McIntyre
On Wed, Jun 18, 2008 at 5:24 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>> - The signature of numpy.test in 1.2 will be backward compatible with
>> 1.1, and it will at least return some indication of failure (if not
>> the same object as in 1.1).  This will, by the way, make it different
>> from the signature and behavior of scipy.test.
>
> scipy.test() should be made to match numpy.test(). scipy.testing was a
> staging ground for the nose changes in numpy, not a separate branch of
> development.

Ok. Jarrod mentioned that the intent is to change SciPy over to use
numpy.testing (and remove scipy.testing) once NumPy's nose transition
is complete.  Is that something that something that will happen
simultaneously in the next release, or will SciPy lag behind one
cycle?  Either way, at some point in the next few weeks I'll try
making that change locally just to see if it turns up any surprising
requirements in the NumPy side.

> For my preference, we should accept the old argument signature with a
> deprecation warning but prefer the current signature. This is a little
> hairy, but such is life with deprecations.

Do you want a blanket warning, or only a warning if test() gets
keyword arguments from the old signature?

Also, since the numpy.testing.ScipyTestCase and ScipyTest classes
already had deprecation warnings in 1.1, I'll leave them out in 1.2,
if that's ok.

Thanks,
Alan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Stéfan van der Walt
2008/6/19 Joshua Lippai <[EMAIL PROTECTED]>:
> The new testing system works well over here, built on Mac OS X 10.5.2
> with GCC 4.2. No errors/failures, but there is that warning Charles
> mentioned as well as the noticeable difference in speed between this
> and the old tests.

Nose does a more thorough job of finding tests (which takes some time
in itself).  It executes 1343 tests, compared to just over 1000
before.

Regards
Stéfan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Joshua Lippai
The new testing system works well over here, built on Mac OS X 10.5.2
with GCC 4.2. No errors/failures, but there is that warning Charles
mentioned as well as the noticeable difference in speed between this
and the old tests.

Josh

On Mon, Jun 16, 2008 at 8:28 PM, Alan McIntyre <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I just checked in the switch to use nose to run unit tests.  Please
> let me know if you experience any difficulties as a result.
>
> Thanks,
> Alan
> ___
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Robert Kern
On Wed, Jun 18, 2008 at 16:12, Alan McIntyre <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 18, 2008 at 4:15 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>> We've been already been making that warning for some time now, in the
>> proper venues. warning.warn() is good for DeprecationWarnings, but not
>> this. We are good to go for nose being used in 1.2.
>
> Ok, so somebody tell me if I've got anything wrong here:
>
> - All the tests included in NumPy 1.2 will be run using nose (whether
> it's included in NumPy or not).  None of the tests will use any part
> of the old test framework or assume that old test framework rules are
> still valid.

Right.

> - All the old test classes must be retained, with deprecation
> warnings.  Third party tests that use them must still work when run
> with Numpy 1.2.

Yes.

> - The signature of numpy.test in 1.2 will be backward compatible with
> 1.1, and it will at least return some indication of failure (if not
> the same object as in 1.1).  This will, by the way, make it different
> from the signature and behavior of scipy.test.

scipy.test() should be made to match numpy.test(). scipy.testing was a
staging ground for the nose changes in numpy, not a separate branch of
development.

For my preference, we should accept the old argument signature with a
deprecation warning but prefer the current signature. This is a little
hairy, but such is life with deprecations.

> - The output (to stdout/stderr) of numpy.test in 1.2 will be different
> from 1.1, since nose isn't displaying the total number of tests it
> finds in each subpackage.

That's fine.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Alan McIntyre
On Wed, Jun 18, 2008 at 4:15 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> We've been already been making that warning for some time now, in the
> proper venues. warning.warn() is good for DeprecationWarnings, but not
> this. We are good to go for nose being used in 1.2.

Ok, so somebody tell me if I've got anything wrong here:

- All the tests included in NumPy 1.2 will be run using nose (whether
it's included in NumPy or not).  None of the tests will use any part
of the old test framework or assume that old test framework rules are
still valid.
- All the old test classes must be retained, with deprecation
warnings.  Third party tests that use them must still work when run
with Numpy 1.2.
- The signature of numpy.test in 1.2 will be backward compatible with
1.1, and it will at least return some indication of failure (if not
the same object as in 1.1).  This will, by the way, make it different
from the signature and behavior of scipy.test.
- The output (to stdout/stderr) of numpy.test in 1.2 will be different
from 1.1, since nose isn't displaying the total number of tests it
finds in each subpackage.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Andrew Straw
Stéfan van der Walt wrote:
> 2008/6/18 Alan McIntyre <[EMAIL PROTECTED]>:
>   
>> Is "next release" referring to 1.2 or the release after that?  If it's
>> the release after 1.2, then I assume that 1.2 must still be able to
>> run all its tests without nose.
>> 
>
> Alternatively, we could distribute Nose inside of NumPy for one
> release?  I suppose the Debian guys would shoot us :)
No, I don't think they'll shoot anyone. :) It can just be disabled with
a Debian specific patch to numpy. And since nose is LGPL (and therefore
DFSG kosher), I don't think there'd be any reason to even bother
re-making the source tarball. I'm quite sure the Debian packagers have
dealt with worse.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Robert Kern
On Wed, Jun 18, 2008 at 13:42, Alan McIntyre <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 18, 2008 at 12:05 PM, Stéfan van der Walt <[EMAIL PROTECTED]> 
> wrote:
>> a) Warn that Nose is becoming a dependency (next release).
>
> Is "next release" referring to 1.2 or the release after that?  If it's
> the release after 1.2, then I assume that 1.2 must still be able to
> run all its tests without nose.

We've been already been making that warning for some time now, in the
proper venues. warning.warn() is good for DeprecationWarnings, but not
this. We are good to go for nose being used in 1.2.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Robert Kern
On Wed, Jun 18, 2008 at 10:42, Anne Archibald <[EMAIL PROTECTED]> wrote:
> 2008/6/17 Alan McIntyre <[EMAIL PROTECTED]>:

>> You can replace ParametricTest with generators, as described here:
>> http://scipy.org/scipy/scipy/wiki/TestingGuidelines
>
> Hmm. This won't work with the current version of numpy, will it? That
> is, it needs nose. (I run much code on the work machines, which I
> (thankfully) do not administer, and which are running a variety of
> ancient versions of numpy (some even have only Numeric, to support
> horrible quasi-in-house C extensions).) So I'd like to write my tests
> in a way that they can run on both new and old versions of numpy.

Changing your test suites to use nose does not mean that you have to
upgrade to a new numpy. The SVN trunk of numpy needs nose, but nose
does not need the SVN trunk of numpy.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Stéfan van der Walt
2008/6/18 Alan McIntyre <[EMAIL PROTECTED]>:
> Is "next release" referring to 1.2 or the release after that?  If it's
> the release after 1.2, then I assume that 1.2 must still be able to
> run all its tests without nose.

Alternatively, we could distribute Nose inside of NumPy for one
release?  I suppose the Debian guys would shoot us :)

Cheers
Stéfan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Alan McIntyre
On Wed, Jun 18, 2008 at 12:05 PM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote:
> a) Warn that Nose is becoming a dependency (next release).

Is "next release" referring to 1.2 or the release after that?  If it's
the release after 1.2, then I assume that 1.2 must still be able to
run all its tests without nose.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Anne Archibald
2008/6/18 Stéfan van der Walt <[EMAIL PROTECTED]>:
> 2008/6/18 Anne Archibald <[EMAIL PROTECTED]>:
>> Well, probably. But more so for those that are used widely throughout
>> numpy itself, since many of us learn how to write code using numpy by
>> reading numpy source. (Yes, this means that "internal" conventions
>> like "numpy.core.whatever" get used by people who aren't writing
>> numpy.)
>
> People shouldn't be using code from `numpy.core` directly.  When we
> refactor code behind the scenes, we need a workspace to do it in, and
> if people start putting their hands in the engine we can't protect
> them from getting hurt.  A bigger warning sign may be appropriate (or,
> to take it to the extreme, rename `core` to `_core`).

I'm not arguing users should be using numpy.core (and I don't use it),
but given the nature of numpy and its documentation, many users look
into the code, see "numpy.core" and copy that. I think unless we want
to actually expose sub-namespaces - which was actively discussed - we
probably should put an underscore.

Not that we can without breaking the code of all those people who are
already using numpy.core.

Anne
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Alan McIntyre
On Wed, Jun 18, 2008 at 11:42 AM, Anne Archibald
<[EMAIL PROTECTED]> wrote:
>> You can replace ParametricTest with generators, as described here:
>> http://scipy.org/scipy/scipy/wiki/TestingGuidelines
>
> Hmm. This won't work with the current version of numpy, will it? That
> is, it needs nose. (I run much code on the work machines, which I
> (thankfully) do not administer, and which are running a variety of
> ancient versions of numpy (some even have only Numeric, to support
> horrible quasi-in-house C extensions).) So I'd like to write my tests
> in a way that they can run on both new and old versions of numpy.

Yes, right now the generator test method needs nose to work correctly.
 Once the old test framework stuff is added back, you should be able
to run 1.1 tests on 1.2.  When I'm adding that stuff back I'll also
add tests for numpy.testing to make sure the old test styles keep
working.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Stéfan van der Walt
2008/6/18 Anne Archibald <[EMAIL PROTECTED]>:
> Well, probably. But more so for those that are used widely throughout
> numpy itself, since many of us learn how to write code using numpy by
> reading numpy source. (Yes, this means that "internal" conventions
> like "numpy.core.whatever" get used by people who aren't writing
> numpy.)

People shouldn't be using code from `numpy.core` directly.  When we
refactor code behind the scenes, we need a workspace to do it in, and
if people start putting their hands in the engine we can't protect
them from getting hurt.  A bigger warning sign may be appropriate (or,
to take it to the extreme, rename `core` to `_core`).

The testing code in NumPy is going to be replaced by Nose.  This means
that eventually all internal test scanning capabilities in NumPy will
disappear.  It isn't necessary to remove NumpyTestCase entirely.
Rather

a) Warn that Nose is becoming a dependency (next release).
b) Replace NumpyTestCase with a Nose-dependent equivalent in the
release thereafter.

Regards
Stéfan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-18 Thread Anne Archibald
2008/6/17 Alan McIntyre <[EMAIL PROTECTED]>:
> On Tue, Jun 17, 2008 at 8:15 PM, Anne Archibald
> <[EMAIL PROTECTED]> wrote:
>> Uh, I assumed NumpyTestCase was public and used it. I'm presumably not
>> alone, so perhaps a deprecation warning would be good. What
>> backward-compatible class should I use? unittest.TestCase?
>
> Yes, unittest.TestCase seemed to be completely adequate for all the
> existing tests in NumPy.  Unless you need some functionality
> explicitly implemented in NumpyTestCase (like the 'measure' or
> 'rundocs' methods), you can just replace it with TestCase.   TestCase
> can be imported from numpy.testing, although (now that I think about
> it) it's probably less cryptic to just import it from unittest.
>
> For module-level doctests, you can place something like this in the module:
>
> from numpy.testing import *
> def test():
>return rundocs()
>
> You can replace ParametricTest with generators, as described here:
> http://scipy.org/scipy/scipy/wiki/TestingGuidelines

Hmm. This won't work with the current version of numpy, will it? That
is, it needs nose. (I run much code on the work machines, which I
(thankfully) do not administer, and which are running a variety of
ancient versions of numpy (some even have only Numeric, to support
horrible quasi-in-house C extensions).) So I'd like to write my tests
in a way that they can run on both new and old versions of numpy.

> I will document all this more completely once the test setup isn't
> changing on a daily basis, honest.
>
> I'm assuming this experience should tell me that any item "bar" that I
> can get by issuing "from numpy.foo import bar" should be considered
> the public API and therefore deprecated instead of removed?  ;)

Well, probably. But more so for those that are used widely throughout
numpy itself, since many of us learn how to write code using numpy by
reading numpy source. (Yes, this means that "internal" conventions
like "numpy.core.whatever" get used by people who aren't writing
numpy.)

Anne
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Robert Kern
On Tue, Jun 17, 2008 at 22:44, Alan McIntyre <[EMAIL PROTECTED]> wrote:
> I'm assuming this experience should tell me that any item "bar" that I
> can get by issuing "from numpy.foo import bar" should be considered
> the public API and therefore deprecated instead of removed?  ;)

It's usually a good guess. But asking is usually better than guessing.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Alan McIntyre
On Mon, Jun 16, 2008 at 8:39 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> Please port over the changes I made to scipy.testing in scipy's r4424
> in order to avoid importing nose until the actual execution of tests.

By the way, I notice that making those changes broke the ability to
run a single test module with the command "python
numpy/numpy/foo/tests/test_bar.py".  So for both NumPy and SciPy, the
boilerplate "if __name__ == '__main__'" stuff needs to be changed if
we're going to retain that capability.

I think I'd prefer to see a convenience function in numpy.testing that
could be used to run the module instead of sprinkling "import nose" in
all that boilerplate, especially since most of the test modules are
already doing a "from numpy.testing import *" anyway.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Alan McIntyre
On Tue, Jun 17, 2008 at 8:26 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 17, 2008 at 09:53, Alan McIntyre <[EMAIL PROTECTED]> wrote:
>> If there's a consensus that they need to go back in and get marked as
>> deprecated, I'll put them back.
>
> Yes, please do this.

Using numpy.deprecate on __init__ seems to work for deprecating a
class, although it says that __init__ is deprecated instead of the
class.  Is there a better way to deprecate a class?
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Alan McIntyre
On Tue, Jun 17, 2008 at 8:15 PM, Anne Archibald
<[EMAIL PROTECTED]> wrote:
> Uh, I assumed NumpyTestCase was public and used it. I'm presumably not
> alone, so perhaps a deprecation warning would be good. What
> backward-compatible class should I use? unittest.TestCase?

Yes, unittest.TestCase seemed to be completely adequate for all the
existing tests in NumPy.  Unless you need some functionality
explicitly implemented in NumpyTestCase (like the 'measure' or
'rundocs' methods), you can just replace it with TestCase.   TestCase
can be imported from numpy.testing, although (now that I think about
it) it's probably less cryptic to just import it from unittest.

For module-level doctests, you can place something like this in the module:

from numpy.testing import *
def test():
return rundocs()

You can replace ParametricTest with generators, as described here:
 http://scipy.org/scipy/scipy/wiki/TestingGuidelines

I will document all this more completely once the test setup isn't
changing on a daily basis, honest.

I'm assuming this experience should tell me that any item "bar" that I
can get by issuing "from numpy.foo import bar" should be considered
the public API and therefore deprecated instead of removed?  ;)

Cheers,
Alan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread David Huard
2008/6/17 Anne Archibald <[EMAIL PROTECTED]>:

> 2008/6/17 Alan McIntyre <[EMAIL PROTECTED]>:
> > On Tue, Jun 17, 2008 at 9:26 AM, David Huard <[EMAIL PROTECTED]>
> wrote:
> >> I noticed that NumpyTest and NumpyTestCase disappeared, and now I am
> >> wondering whether these classes part of the public interface or were
> they
> >> reserved for internal usage ?
> >>
> >> In the former, it might be well to deprecate them before removing them.
> >
> > ParametricTestCase is gone too.  There was at least one person using
> > it that said he didn't mind porting to the nose equivalent, but I
> > expect that's an indication there's more people out there using them.
> > If there's a consensus that they need to go back in and get marked as
> > deprecated, I'll put them back.
>
> Uh, I assumed NumpyTestCase was public and used it. I'm presumably not
> alone, so perhaps a deprecation warning would be good. What
> backward-compatible class should I use? unittest.TestCase?
>

Yes. You'll also have to replace the NumpyTest().run() by something else.
Either the new nose method or the old fashioned
if __name__ == '__main__':
 unittest.main()

Also, note that unittest.TestCase is more restrictive than NumpyTestCase
regarding the method names that are considered tests. While NumpyTestCase
accepted method names starting with check_, TestCase won't recognize those
as tests.

David



> Thanks,
> Anne
> ___
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Robert Kern
On Tue, Jun 17, 2008 at 09:53, Alan McIntyre <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 17, 2008 at 9:26 AM, David Huard <[EMAIL PROTECTED]> wrote:
>> I noticed that NumpyTest and NumpyTestCase disappeared, and now I am
>> wondering whether these classes part of the public interface or were they
>> reserved for internal usage ?
>>
>> In the former, it might be well to deprecate them before removing them.
>
> ParametricTestCase is gone too.  There was at least one person using
> it that said he didn't mind porting to the nose equivalent, but I
> expect that's an indication there's more people out there using them.
> If there's a consensus that they need to go back in and get marked as
> deprecated, I'll put them back.

Yes, please do this.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Anne Archibald
2008/6/17 Alan McIntyre <[EMAIL PROTECTED]>:
> On Tue, Jun 17, 2008 at 9:26 AM, David Huard <[EMAIL PROTECTED]> wrote:
>> I noticed that NumpyTest and NumpyTestCase disappeared, and now I am
>> wondering whether these classes part of the public interface or were they
>> reserved for internal usage ?
>>
>> In the former, it might be well to deprecate them before removing them.
>
> ParametricTestCase is gone too.  There was at least one person using
> it that said he didn't mind porting to the nose equivalent, but I
> expect that's an indication there's more people out there using them.
> If there's a consensus that they need to go back in and get marked as
> deprecated, I'll put them back.

Uh, I assumed NumpyTestCase was public and used it. I'm presumably not
alone, so perhaps a deprecation warning would be good. What
backward-compatible class should I use? unittest.TestCase?

Thanks,
Anne
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Pearu Peterson
On Tue, June 17, 2008 6:17 am, Robert Kern wrote:
> On Mon, Jun 16, 2008 at 21:18, Alan McIntyre <[EMAIL PROTECTED]>
> wrote:
>> On Mon, Jun 16, 2008 at 9:04 PM, Charles R Harris
>> <[EMAIL PROTECTED]> wrote:
>
>>> In [1]: numpy.test()
>>> Not implemented: Defined_Binary_Op
>>> Not implemented: Defined_Binary_Op
>>> Defined_Operator not defined used by Generic_Spec
>>> Needs match implementation: Allocate_Stmt
>>> Needs match implementation: Associate_Construct
>> 
>>
>> That stream of "Not implemented" and "Needs match implementation"
>> stuff comes from numpy/f2py/lib/parser/test_Fortran2003.py and
>> Fortran2003.py.  I can silence most of that output by disabling those
>> module-level "if 1:" blocks in those two files, but there's still
>> complaints about Defined_Binary_Op not being implemented.  If someone
>> more knowledgeable about that module could comment on that I'd
>> appreciate it.
>
> These files were for the in-development g3 version of f2py. That
> development has moved outside of numpy, so I think they can be removed
> wholesale. Some of them seem to require a Fortran 90 compiler, so I
> have had them fail for me. Removing these is a high priority.
>
> Pearu, can you confirm? Can we give you the task of removing the
> unused g3 portions of f2py for the 1.2 release?

Yes, I have created the corresponding ticket some time ago:
  http://projects.scipy.org/scipy/numpy/ticket/758

Pearu

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Alan McIntyre
On Tue, Jun 17, 2008 at 9:26 AM, David Huard <[EMAIL PROTECTED]> wrote:
> I noticed that NumpyTest and NumpyTestCase disappeared, and now I am
> wondering whether these classes part of the public interface or were they
> reserved for internal usage ?
>
> In the former, it might be well to deprecate them before removing them.

ParametricTestCase is gone too.  There was at least one person using
it that said he didn't mind porting to the nose equivalent, but I
expect that's an indication there's more people out there using them.
If there's a consensus that they need to go back in and get marked as
deprecated, I'll put them back.

Alan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Alan McIntyre
On Mon, Jun 16, 2008 at 11:17 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> These files were for the in-development g3 version of f2py. That
> development has moved outside of numpy, so I think they can be removed
> wholesale. Some of them seem to require a Fortran 90 compiler, so I
> have had them fail for me. Removing these is a high priority.

Nice, thanks.  For what it's worth, removing both of those files
doesn't seem to cause any problems for me locally with NumPy or SciPy.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread David Huard
I noticed that NumpyTest and NumpyTestCase disappeared, and now I am
wondering whether these classes part of the public interface or were they
reserved for internal usage ?

In the former, it might be well to deprecate them before removing them.

Cheers,

David

2008/6/17 David Cournapeau <[EMAIL PROTECTED]>:

> David Cournapeau wrote:
> > It does not work with python2.6a3, but it is a nose problem, apparently
> > (I have the exact same error)
> >
>
> Sorry, it is a python26 problem, not nose.
>
> cheers,
>
> David
> ___
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread David Cournapeau
David Cournapeau wrote:
> It does not work with python2.6a3, but it is a nose problem, apparently 
> (I have the exact same error)
>   

Sorry, it is a python26 problem, not nose.

cheers,

David
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread David Cournapeau
Alan McIntyre wrote:
> Hi all,
>
> I just checked in the switch to use nose to run unit tests.  Please
> let me know if you experience any difficulties as a result.
>   

It does not work with python2.6a3, but it is a nose problem, apparently 
(I have the exact same error)

http://bzimmer.ziclix.com/2008/05/16/pysmug-on-python26a3/

Just thought I would mention it if other people try things with python2.6

cheers,

David
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-16 Thread Robert Kern
On Mon, Jun 16, 2008 at 21:18, Alan McIntyre <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2008 at 9:04 PM, Charles R Harris
> <[EMAIL PROTECTED]> wrote:

>> In [1]: numpy.test()
>> Not implemented: Defined_Binary_Op
>> Not implemented: Defined_Binary_Op
>> Defined_Operator not defined used by Generic_Spec
>> Needs match implementation: Allocate_Stmt
>> Needs match implementation: Associate_Construct
> 
>
> That stream of "Not implemented" and "Needs match implementation"
> stuff comes from numpy/f2py/lib/parser/test_Fortran2003.py and
> Fortran2003.py.  I can silence most of that output by disabling those
> module-level "if 1:" blocks in those two files, but there's still
> complaints about Defined_Binary_Op not being implemented.  If someone
> more knowledgeable about that module could comment on that I'd
> appreciate it.

These files were for the in-development g3 version of f2py. That
development has moved outside of numpy, so I think they can be removed
wholesale. Some of them seem to require a Fortran 90 compiler, so I
have had them fail for me. Removing these is a high priority.

Pearu, can you confirm? Can we give you the task of removing the
unused g3 portions of f2py for the 1.2 release?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-16 Thread Charles R Harris
On Mon, Jun 16, 2008 at 8:18 PM, Alan McIntyre <[EMAIL PROTECTED]>
wrote:

> On Mon, Jun 16, 2008 at 9:04 PM, Charles R Harris
> <[EMAIL PROTECTED]> wrote:
> > Did you add any documentation to the readme? Any particular version
> > dependency for Nose?
>
> I did update README.txt, but I forgot to put the minimum Nose version
> in there; thanks for mentioning that.  I just checked in an update
> that includes it.
>
> > Hmm, plenty of output, 1 failure, and it looks like a future warning in
> > histogram needs to be disabled.
> >
> > In [1]: numpy.test()
> > Not implemented: Defined_Binary_Op
> > Not implemented: Defined_Binary_Op
> > Defined_Operator not defined used by Generic_Spec
> > Needs match implementation: Allocate_Stmt
> > Needs match implementation: Associate_Construct
> 
>
> That stream of "Not implemented" and "Needs match implementation"
> stuff comes from numpy/f2py/lib/parser/test_Fortran2003.py and
> Fortran2003.py.  I can silence most of that output by disabling those
> module-level "if 1:" blocks in those two files, but there's still
> complaints about Defined_Binary_Op not being implemented.  If someone
> more knowledgeable about that module could comment on that I'd
> appreciate it.
>
> I'll also look into that test_linalg failure first thing in the
> morning; I don' get that here.
>
> > Looks slower than the old testing framework, but not enough to matter.
>
> There were at least a couple of tests that didn't get run under the
> old framework, but the ones I can recall didn't look complicated
> enough to make a difference.
>
> Looks like the buildbots need nose installed or upgraded as well.
>

Thanks for doing this. It looks like the transition to nose is going to be
pretty smooth.

Chuck
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-16 Thread Alan McIntyre
On Mon, Jun 16, 2008 at 9:04 PM, Charles R Harris
<[EMAIL PROTECTED]> wrote:
> Did you add any documentation to the readme? Any particular version
> dependency for Nose?

I did update README.txt, but I forgot to put the minimum Nose version
in there; thanks for mentioning that.  I just checked in an update
that includes it.

> Hmm, plenty of output, 1 failure, and it looks like a future warning in
> histogram needs to be disabled.
>
> In [1]: numpy.test()
> Not implemented: Defined_Binary_Op
> Not implemented: Defined_Binary_Op
> Defined_Operator not defined used by Generic_Spec
> Needs match implementation: Allocate_Stmt
> Needs match implementation: Associate_Construct


That stream of "Not implemented" and "Needs match implementation"
stuff comes from numpy/f2py/lib/parser/test_Fortran2003.py and
Fortran2003.py.  I can silence most of that output by disabling those
module-level "if 1:" blocks in those two files, but there's still
complaints about Defined_Binary_Op not being implemented.  If someone
more knowledgeable about that module could comment on that I'd
appreciate it.

I'll also look into that test_linalg failure first thing in the
morning; I don' get that here.

> Looks slower than the old testing framework, but not enough to matter.

There were at least a couple of tests that didn't get run under the
old framework, but the ones I can recall didn't look complicated
enough to make a difference.

Looks like the buildbots need nose installed or upgraded as well.

Thanks,
Alan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-16 Thread Alan McIntyre
On Mon, Jun 16, 2008 at 8:39 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2008 at 19:28, Alan McIntyre <[EMAIL PROTECTED]> wrote:
> Please port over the changes I made to scipy.testing in scipy's r4424
> in order to avoid importing nose until the actual execution of tests.

Done in r5289.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] nose changes checked in

2008-06-16 Thread Charles R Harris
On Mon, Jun 16, 2008 at 6:28 PM, Alan McIntyre <[EMAIL PROTECTED]>
wrote:

> Hi all,
>
> I just checked in the switch to use nose to run unit tests.  Please
> let me know if you experience any difficulties as a result.
>

Did you add any documentation to the readme? Any particular version
dependency for Nose?

Hmm, plenty of output, 1 failure, and it looks like a future warning in
histogram needs to be disabled.

In [1]: numpy.test()
Not implemented: Defined_Binary_Op
Not implemented: Defined_Binary_Op
Defined_Operator not defined used by Generic_Spec
Needs match implementation: Allocate_Stmt
Needs match implementation: Associate_Construct
Needs match implementation: Backspace_Stmt
Needs match implementation: Block_Data
Needs match implementation: Case_Construct
Needs match implementation: Case_Selector
Needs match implementation: Case_Stmt
Needs match implementation: Control_Edit_Desc
Needs match implementation: Data_Component_Def_Stmt
Needs match implementation: Data_Implied_Do
Needs match implementation: Data_Stmt
Needs match implementation: Data_Stmt_Set
Needs match implementation: Deallocate_Stmt
Needs match implementation: Derived_Type_Def
Needs match implementation: Endfile_Stmt
Needs match implementation: Entry_Stmt
Needs match implementation: Enum_Def
Needs match implementation: Flush_Stmt
Needs match implementation: Forall_Construct
Needs match implementation: Forall_Header
Needs match implementation: Forall_Triplet_Spec
Needs match implementation: Format_Item
Needs match implementation: Function_Stmt
Needs match implementation: Generic_Binding
Needs match implementation: Generic_Spec
Needs match implementation: Implicit_Part
Needs match implementation: Inquire_Stmt
Needs match implementation: Interface_Block
Needs match implementation: Interface_Body
Needs match implementation: Interface_Stmt
Needs match implementation: Internal_Subprogram_Part
Needs match implementation: Io_Implied_Do
Needs match implementation: Io_Implied_Do_Control
Needs match implementation: Main_Program
Needs match implementation: Module
Needs match implementation: Module_Subprogram_Part
Needs match implementation: Namelist_Stmt
Needs match implementation: Pointer_Assignment_Stmt
Needs match implementation: Position_Edit_Desc
Needs match implementation: Proc_Attr_Spec
Needs match implementation: Proc_Component_Def_Stmt
Needs match implementation: Procedure_Declaration_Stmt
Needs match implementation: Procedure_Stmt
Needs match implementation: Read_Stmt
Needs match implementation: Rewind_Stmt
Needs match implementation: Select_Type_Construct
Needs match implementation: Select_Type_Stmt
Needs match implementation: Specific_Binding
Needs match implementation: Target_Stmt
Needs match implementation: Type_Bound_Procedure_Part
Needs match implementation: Where_Construct
-
Nof match implementation needs: 51 out of 224
Nof tests needs: 224 out of 224
Total number of classes: 529
-
./usr/lib/python2.5/site-packages/numpy/lib/function_base.py:166:
FutureWarning:
The semantics of histogram will be modified in
release 1.2 to improve outlier handling. The new behavior can be
obtained using new=True. Note that the new version accepts/returns
the bin edges instead of the left bin edges.
Please read the docstring for more information.
  Please read the docstring for more information.""", FutureWarning)
/usr/lib/python2.5/site-packages/numpy/lib/function_base.py:193:
FutureWarning:
The semantic for bins will change in version 1.2.
The bins will become the bin edges, instead of the left bin
edges.

  """, FutureWarning)
...E.

Re: [Numpy-discussion] nose changes checked in

2008-06-16 Thread Robert Kern
On Mon, Jun 16, 2008 at 19:28, Alan McIntyre <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I just checked in the switch to use nose to run unit tests.  Please
> let me know if you experience any difficulties as a result.

Please port over the changes I made to scipy.testing in scipy's r4424
in order to avoid importing nose until the actual execution of tests.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] nose changes checked in

2008-06-16 Thread Alan McIntyre
Hi all,

I just checked in the switch to use nose to run unit tests.  Please
let me know if you experience any difficulties as a result.

Thanks,
Alan
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion