On Tuesday, August 16, 2016 at 6:14:27 PM UTC+1, Simon King wrote:
>
> Hi! 
>
> I made progress turning my optional old-style group cohomology spkg into 
> a new style package (called "modres", to be added to Sage at some point) 
> depending on another new-style package (called "meataxe", already part of 
> Sage), both being wrapped by an OptionalExtension in the Sage library. 
> Alert me if that's not the way to do it... 
>
> My first question is about logging. The old spkg has a custom logger 
> that tells by what object it was called, unless it is called repeatedly by 
> the same object. Thus, if it is called by object A with messages m1 and 
> m2, 
> then called by B with messages m3, m4, and again by A with message m5, it 
> prints 
>   A: m1 
>      m2 
>   B: m3 
>      m4 
>   A: m5 
>
> I find that formatting kind of nice and I would like to keep it. But a 
> potential referee might argue that a custom logger should better be 
> replaced by using Python's logging module. So, my question: Do you see 
> an easy way to obtain the above logging behaviour with Python's logging 
> module ("easy" is a way that does not involve writing a complicated 
> handler to be passed to a logger by addHandler()). 
>
> My second question is about optional tests. It has been discussed before 
> whether to have a way to mark *all* tests of a module optional. Has it 
> meanwhile be implemented in the test framework? After all, we now have 
> OptionalExtension in module_list.py, and obviously the tests of an 
> optional extension should be optional, isn't it? 
>
 
I don't see why you ever need to mark tests in a module X, which only 
depend on X being installed, optional; after all if X is not 
installed then the tests are not there, and if X is installed then it's 
there...

Naturally if X can be used in a module Y<>X then the corresponding tests 
will need to be optional, but IMHO in your case it's pretty small number of 
tests to tag.




> Best regards, 
> Simon 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to