[IPython-User] Various questions in regard to notebook

Brian Granger ellisonbg@gmail....
Mon Feb 3 23:23:22 CST 2014


Adam,

Oh, sorry I misunderstood. I though you wanted to change the level of
IPython's built-in loggers. It sounds like you want to change the
logging of your own logger. I don't think there should be any problem
with doing that, but if you are just using the default logger, you may
pick up ours. I would explicitly create a logger and set its level
using the usual logging APIs. I would first try this in a regular
python session, then move it to IPython to see if there are issue
related to running this in IPython.

Cheers,

Brian


On Mon, Feb 3, 2014 at 6:41 PM, Adam Hughes <hughesadam87@gmail.com> wrote:
> Brian,
>
> I tried the --log-level flag.  Actually I set it to CRITICAL:
>
>     ipython notebook --pylab=inline --log-level=CRITICAL
>
> My custom logger's warnings still show up in the notebook.  Would you by
> chance think it is possible that I've written a logger that's doing
> something non-standard, and hence not compatible with ipython's setting, or
> overriding them or something.  Wondering if this has ever come up in the
> past...
>
> If you've never encountered it, I'll probably just sub out my dumb bells and
> whistles logger for the standard one in a future refactor.
>
> Thanks
>
>
> On Mon, Feb 3, 2014 at 5:33 PM, Adam Hughes <hughesadam87@gmail.com> wrote:
>>
>> Thanks guys, I feel more confident approaching journals with this in mind.
>>
>>
>> On Mon, Feb 3, 2014 at 4:47 PM, Fernando Perez <fperez.net@gmail.com>
>> wrote:
>>>
>>> This was a microbiology journal from the Nature group (ISME), and I don't
>>> recall any particular issues with it.  This was a rapid communication and
>>> one of our co-authors, a biologist, was in touch with the Journal's editor
>>> regarding the submission, but as far as I know there weren't particular
>>> issues.
>>>
>>> We wrote up the manuscript and submitted it like any other for review,
>>> and put up those external links (that include not only notebooks, but also
>>> the Amazon virtual machine image).
>>>
>>> I think this is something that will be changing slowly over time. I've
>>> been in conversations with a couple of journal publishers (both from
>>> professional societies and standalone entities) that are interested in
>>> making this a more 'official' part of the publication record. Given that a
>>> notebook is just a file, and that it can even be converted to static PDF if
>>> desired, I don't think there are major issues to overcome here.
>>>
>>> The more complex discussion points are:
>>>
>>>  - hosting of data, virtual machine images and other potentially large
>>> resources.
>>>
>>> - versioning of these resources: what to do regarding version control
>>> repositories, what does the journal host vs. what's on say github, etc...
>>>
>>> These are things we'll need to figure out both as a community of
>>> practitioners and in collaboration with the publishers themselves.
>>>
>>> Cheers
>>>
>>> f
>>>
>>>
>>> On Mon, Feb 3, 2014 at 1:11 PM, Brian Granger <ellisonbg@gmail.com>
>>> wrote:
>>>>
>>>> I wasn't involved in that part of the publication process for that
>>>> paper, but I don't recall hearing that we got any trouble about it.
>>>>
>>>> On Mon, Feb 3, 2014 at 1:05 PM, Adam Hughes <hughesadam87@gmail.com>
>>>> wrote:
>>>> > Brian,
>>>> >
>>>> > I noticed one of your publications on here and see that you included a
>>>> > "data
>>>> > availability" section with which you reference an external link to the
>>>> > notebooks among other resources.  Did you find that journals were
>>>> > amenable
>>>> > to link to external sources?  Or did you find that they tended to try
>>>> > to
>>>> > force you to host all of the supplemental content through them?
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > On Mon, Feb 3, 2014 at 3:24 PM, Adam Hughes <hughesadam87@gmail.com>
>>>> > wrote:
>>>> >>
>>>> >> Thanks Brian.  You're the man.
>>>> >>
>>>> >>
>>>> >> On Mon, Feb 3, 2014 at 3:21 PM, Brian Granger <ellisonbg@gmail.com>
>>>> >> wrote:
>>>> >>>
>>>> >>> > I have some notebook questions and hope it's ok to post them
>>>> >>> > together.
>>>> >>> > They
>>>> >>> > range the full spectrum from big-picture to minor details.
>>>> >>>
>>>> >>> Sure!
>>>> >>>
>>>> >>> > 1. Supplemental materials in journals:  Is anyone aware of any
>>>> >>> > accepted
>>>> >>> > publications where notebooks were published as articles, or as
>>>> >>> > supplemental
>>>> >>> > materials in peer-reviewed journals?  We are looking to publish
>>>> >>> > some
>>>> >>> > results
>>>> >>> > that are already heavily integrated with the notebook and are
>>>> >>> > looking
>>>> >>> > for
>>>> >>> > amenable journals.  I was directed to a discussion on AcitvePapers
>>>> >>> > integration.  This looks really cool, but for the here and now,
>>>> >>> > what
>>>> >>> > the
>>>> >>> > current approach.
>>>> >>>
>>>> >>> I don't know of any cases where notebook were part of the "official"
>>>> >>> record of publication. But there are a number of article listed on
>>>> >>> our
>>>> >>> gallery where notebooks were part of the publication effort:
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>> https://github.com/ipython/ipython/wiki/A-gallery-of-interesting-IPython-Notebooks#wiki--reproducible-academic-publications
>>>> >>>
>>>> >>> > 2. Quick changing notebook styles:  I've followed a trail of blog
>>>> >>> > posts
>>>> >>> > about controlling the typography in a notebook.  This blog from
>>>> >>> > february
>>>> >>> > 2013 gives a copy-pasteable snippet which didn't seem to work on
>>>> >>> > my
>>>> >>> > system
>>>> >>> > (canopy v 1.1 ubuntu 10.04).   What the current "easy/recommended
>>>> >>> > way"
>>>> >>> > to
>>>> >>> > change a notebook style.  I'm really looking more for pre-defined
>>>> >>> > styles
>>>> >>> > rather than creating my own, and if anyone could direct me to the
>>>> >>> > most
>>>> >>> > recent musings on the topic, I'd be quite grateful.
>>>> >>>
>>>> >>> The ability to style a notebook using CSS is possible, but not part
>>>> >>> of
>>>> >>> our official API yet. I don't know of any prepakaged CSS files, but
>>>> >>> I
>>>> >>> do have this IPython magic that loads a css file onto the page:
>>>> >>>
>>>> >>>
>>>> >>> https://github.com/ellisonbg/talk-cplug2013/blob/master/load_style.py
>>>> >>>
>>>> >>> > PS, one problem with the linked solution is that it requires one
>>>> >>> > to
>>>> >>> > fill an
>>>> >>> > entire notebook cell.  I'd rather have this hidden if possible, I
>>>> >>> > guess
>>>> >>> > in a
>>>> >>> > config file.  Thus, is it common practice to share config files
>>>> >>> > with
>>>> >>> > readers?  What are you guys doing currently?
>>>> >>>
>>>> >>> Not currently possible to hide this easily. I suppose you could put
>>>> >>> it
>>>> >>> into a config file, but it would run at the beginning of all ipython
>>>> >>> sessions.
>>>> >>>
>>>> >>> You can also just put CSS into your
>>>> >>> $IPYTHONDIR/profile_default/static/custom/custom.css file.
>>>> >>>
>>>> >>> > 3.  Updating the gallery of examples wiki:  I have a few examples
>>>> >>> > that
>>>> >>> > I
>>>> >>> > think are flashy enough to fit in to the wiki, but do they need to
>>>> >>> > be
>>>> >>> > curated?  Is it ok to just clone and add a hyperlink, or is there
>>>> >>> > a
>>>> >>> > review/uploading process in place that I'm not seeing?  It's not
>>>> >>> > clear
>>>> >>> > to me
>>>> >>> > how to contribute an example (sorry if it is clear and I'm just
>>>> >>> > dense).
>>>> >>> > I
>>>> >>> > would only be adding one link, which itself links all of the
>>>> >>> > notebooks
>>>> >>> > I had
>>>> >>> > in mind.
>>>> >>>
>>>> >>> Just go ahead and edit the page or submit a pull request. It is
>>>> >>> "curated" by the entire community...
>>>> >>>
>>>> >>> > (...and for something completely unrelated...)
>>>> >>> > 4.  Suppressing logging:  After some searching, I found this
>>>> >>> > suggestion
>>>> >>> > as a
>>>> >>> > way to supress logging in a notebook:
>>>> >>> >
>>>> >>> > import warnings
>>>> >>> > warnings.filterwarnings('ignore')
>>>> >>>
>>>> >>> There is also a command line flag:
>>>> >>>
>>>> >>> ipython notebook --log-level=WARN
>>>> >>>
>>>> >>> Cheers,
>>>> >>>
>>>> >>> Brian
>>>> >>>
>>>> >>> >
>>>> >>> > This suppresses some logging messages, but I still am getting
>>>> >>> > Warnings
>>>> >>> > from
>>>> >>> > the package I wrote.  It's possible that the custom logger I'm
>>>> >>> > using is
>>>> >>> > doing something non-standard, so it could just be my fault that
>>>> >>> > the
>>>> >>> > above
>>>> >>> > lines are not working.  What do you recommend to hide all logging
>>>> >>> > methods?
>>>> >>> > This is mostly for keeping examples clean, so I'd take any
>>>> >>> > solution, as
>>>> >>> > hacky as it needs to be.  There's not magic for this, right?
>>>> >>> >
>>>> >>> > Thanks so much.
>>>> >>> >
>>>> >>> > _______________________________________________
>>>> >>> > IPython-User mailing list
>>>> >>> > IPython-User@scipy.org
>>>> >>> > http://mail.scipy.org/mailman/listinfo/ipython-user
>>>> >>> >
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>> --
>>>> >>> Brian E. Granger
>>>> >>> Cal Poly State University, San Luis Obispo
>>>> >>> bgranger@calpoly.edu and ellisonbg@gmail.com
>>>> >>> _______________________________________________
>>>> >>> IPython-User mailing list
>>>> >>> IPython-User@scipy.org
>>>> >>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > IPython-User mailing list
>>>> > IPython-User@scipy.org
>>>> > http://mail.scipy.org/mailman/listinfo/ipython-user
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Brian E. Granger
>>>> Cal Poly State University, San Luis Obispo
>>>> bgranger@calpoly.edu and ellisonbg@gmail.com
>>>> _______________________________________________
>>>> IPython-User mailing list
>>>> IPython-User@scipy.org
>>>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>>
>>>
>>>
>>>
>>> --
>>> Fernando Perez (@fperez_org; http://fperez.org)
>>> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
>>> fernando.perez-at-berkeley: contact me here for any direct mail
>>>
>>> _______________________________________________
>>> IPython-User mailing list
>>> IPython-User@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>>
>>
>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com


More information about the IPython-User mailing list