# Path: gammacat/utils.py
# def load_yaml(path):
#     """Helper function to load data from a YAML file."""
#     path = Path(path)
#     log.debug('Reading {}'.format(path))
#     with path.open() as fh:
#         data = ruamel.yaml.round_trip_load(fh)
#     return data
# 
# def write_yaml(data, path):
#     """Helper function to write data to a YAML file."""
#     path = Path(path)
#     log.info('Writing {}'.format(path))
#     with path.open('w') as fh:
#         ruamel.yaml.round_trip_dump(data, fh)


import logging
from .utils import load_yaml, write_yaml
from gammapy.catalog.gammacat import GammaCatResource
# Licensed under a 3-clause BSD style license - see LICENSE.rst

__all__ = [
    'SrcInfo',
]

log = logging.getLogger(__name__)


class SrcInfo:
    """Process a basic source info file"""
    resource_type = 'bsi'

    def __init__(self, data, resource):
        self.data = data
        self.resource = resource

    @classmethod
    def read(cls, filename):

# Path: gammacat/utils.py
# def load_yaml(path):
#     """Helper function to load data from a YAML file."""
#     path = Path(path)
#     log.debug('Reading {}'.format(path))
#     with path.open() as fh:
#         data = ruamel.yaml.round_trip_load(fh)
#     return data
# 
# def write_yaml(data, path):
#     """Helper function to write data to a YAML file."""
#     path = Path(path)
#     log.info('Writing {}'.format(path))
#     with path.open('w') as fh:
#         ruamel.yaml.round_trip_dump(data, fh)


# Path: gammacat/src_info.py
import logging
from .utils import load_yaml, write_yaml
from gammapy.catalog.gammacat import GammaCatResource

# Licensed under a 3-clause BSD style license - see LICENSE.rst

__all__ = [
    'SrcInfo',
]

log = logging.getLogger(__name__)


class SrcInfo:
    """Process a basic source info file"""
    resource_type = 'bsi'

    def __init__(self, data, resource):
        self.data = data
        self.resource = resource

    @classmethod
    def read(cls, filename):

        data = load_yaml(filename)