-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* records.py * lpc.py * cov.py * endf6.py * xs.py * Delete sandy/core/ * polishing * Docstring edistr.py * docsting xs.py * docsting samples.py * docsting fy.py * docsting endf6.py * docsting errorr.py * gendef.py inport * update --------- Co-authored-by: Luca Fiorito <lfiorito@sckcen.be>
- Loading branch information
Showing
17 changed files
with
1,376 additions
and
1,577 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,76 @@ | ||
import logging | ||
import sys | ||
|
||
from .settings import * | ||
from .constants import * | ||
from .decay import * | ||
from .energy_grids import * | ||
from .errorr import * | ||
from .gendf import * | ||
from .fy import * | ||
from .tsl import * | ||
from .gls import * | ||
from .libraries import * | ||
from .pert import * | ||
from .edistr import * | ||
from sandy.zam import * | ||
from .njoy import * | ||
from .sections import * | ||
from .shared import * | ||
from .utils import * | ||
from .core import * | ||
# from .sampling import * # don't do this | ||
from .spectra import * | ||
|
||
import sandy.mcnp | ||
import sandy.aleph2 | ||
import sandy.tools | ||
import sandy.shared | ||
import sandy.sampling | ||
|
||
from .samples import * | ||
|
||
testdir = "tests" | ||
|
||
|
||
class ShutdownHandler(logging.Handler): | ||
""" | ||
Trigger exit on errors. | ||
""" | ||
|
||
def emit(self, record): | ||
logging.shutdown() | ||
sys.exit(1) | ||
|
||
|
||
class DuplicateFilter(object): | ||
""" | ||
Define a filter which keeps track of what was logged, and attach it to | ||
your logger for the duration of a loop. | ||
""" | ||
|
||
def __init__(self): | ||
self.msgs = set() | ||
|
||
def filter(self, record): | ||
rv = record.msg not in self.msgs | ||
self.msgs.add(record.msg) | ||
return rv | ||
|
||
|
||
class Error(Exception): | ||
pass | ||
|
||
|
||
FORMAT = '%(levelname)s: %(message)s' | ||
logging.basicConfig(format=FORMAT) | ||
logging.getLogger().setLevel(logging.INFO) | ||
logging.getLogger().addHandler(ShutdownHandler(level=40)) | ||
# logging.getLogger().addFilter(DuplicateFilter()) | ||
|
||
|
||
__version__ = '1.1b1' | ||
import logging | ||
import sys | ||
|
||
testdir = "tests" | ||
|
||
|
||
class ShutdownHandler(logging.Handler): | ||
""" | ||
Trigger exit on errors. | ||
""" | ||
|
||
def emit(self, record): | ||
logging.shutdown() | ||
sys.exit(1) | ||
|
||
|
||
class DuplicateFilter(object): | ||
""" | ||
Define a filter which keeps track of what was logged, and attach it to | ||
your logger for the duration of a loop. | ||
""" | ||
|
||
def __init__(self): | ||
self.msgs = set() | ||
|
||
def filter(self, record): | ||
rv = record.msg not in self.msgs | ||
self.msgs.add(record.msg) | ||
return rv | ||
|
||
|
||
class Error(Exception): | ||
pass | ||
|
||
|
||
FORMAT = '%(levelname)s: %(message)s' | ||
logging.basicConfig(format=FORMAT) | ||
logging.getLogger().setLevel(logging.INFO) | ||
logging.getLogger().addHandler(ShutdownHandler(level=40)) | ||
# logging.getLogger().addFilter(DuplicateFilter()) | ||
|
||
|
||
__version__ = '1.1b1' | ||
|
||
|
||
# Must import submodules after __version__ and everything above. | ||
from .constants import * | ||
from .cov import * | ||
from .decay import * | ||
from .endf6 import * | ||
from .energy_grids import * | ||
from .errorr import * | ||
from .fy import * | ||
from .gendf import * | ||
from .gls import * | ||
from .libraries import * | ||
from .lpc import * | ||
from .pert import * | ||
from .edistr import * | ||
from .njoy import * | ||
from .records import * | ||
from .samples import * | ||
from .sections import * | ||
from .settings import * | ||
from .shared import * | ||
from .tools import * | ||
from .tsl import * | ||
from .utils import * | ||
from .zam import * | ||
from .sampling import * | ||
from .spectra import * | ||
from .xs import * | ||
|
||
# These are folders | ||
from . import mcnp | ||
from . import aleph2 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.