Giter VIP home page Giter VIP logo

Comments (3)

jonwedell avatar jonwedell commented on September 9, 2024

PyNMR-STAR uses the standard Python logging module to log these warnings. You can configure their behavior (including diverting them to a specific file, silencing them, etc.) using the configuration options available in the logging module.

As an example, to increase the log level (and suppress these warnings) the following (prior to parsing a loop) should suffice:

import logging
logging.getLogger().setLevel(logging.ERROR)

Empty loops are technically forbidden in NMR-STAR, though they are allowed in STAR. In practice, files with empty loops do exist, which is why the issue is only warned about, as opposed to being an actual exception.

from pynmrstar.

locsmith avatar locsmith commented on September 9, 2024

from pynmrstar.

jonwedell avatar jonwedell commented on September 9, 2024

Hey Gary,

I suspect you may run into a few other corner cases where the behavior of this library isn't ideal for pure STAR parsing (versus NMR-STAR parsing), though I would certainly to like facilitate, to the extent possible, the use of this library for working with NEF, so I appreciate you bringing any of these issues to my attention.

It may be worth me creating a special NEFEntry class (and similar for Saveframes and Loops) in the future to enable using the library for this purpose without needing workarounds.

I believe that you are correct regarding filters - you should be able to create a filter that will filter out the specific message being discussed here. (Alternatively, and certainly more hacky, is to reset the log level to whatever you desire after parsing an Entry - since PyNMRSTAR throws an exception for any true exceptions, and only logs warnings, so this will almost never lead to the suppression of anything meaningful during parsing.)

from pynmrstar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.