Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removing sandy/core #350

Merged
merged 15 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 76 additions & 72 deletions sandy/__init__.py
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
5 changes: 0 additions & 5 deletions sandy/core/__init__.py

This file was deleted.

182 changes: 0 additions & 182 deletions sandy/core/classes_core.html

This file was deleted.

43 changes: 0 additions & 43 deletions sandy/core/packages_core.html

This file was deleted.

Loading
Loading