Skip to content

Commit

Permalink
Switch to using configobj coming from astropy
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Nov 7, 2023
1 parent 0b7e4ca commit 8ca1565
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/stpipe/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@

from asdf import ValidationError as AsdfValidationError
from asdf import open as asdf_open

from . import utilities
from .config import StepConfig
from .datamodel import AbstractDataModel
from .extern.configobj.configobj import (
from astropy.extern.configobj.configobj import (
ConfigObj,
Section,
flatten_errors,
get_extra_values,
)
from .extern.configobj.validate import ValidateError, Validator, VdtTypeError
from astropy.extern.configobj.validate import ValidateError, Validator, VdtTypeError

from . import utilities
from .config import StepConfig
from .datamodel import AbstractDataModel
from .utilities import _not_set

# Configure logger
Expand Down
5 changes: 3 additions & 2 deletions src/stpipe/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
import threading
from contextlib import contextmanager

from astropy.extern.configobj import validate
from astropy.extern.configobj.configobj import ConfigObj

from . import config_parser
from .extern.configobj import validate
from .extern.configobj.configobj import ConfigObj

STPIPE_ROOT_LOGGER = "stpipe"
DEFAULT_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
Expand Down
3 changes: 2 additions & 1 deletion src/stpipe/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
from os.path import dirname, join
from typing import ClassVar

from astropy.extern.configobj.configobj import ConfigObj, Section

from . import config_parser, crds_client, log
from .extern.configobj.configobj import ConfigObj, Section
from .step import Step, get_disable_crds_steppars
from .utilities import _not_set

Expand Down
2 changes: 1 addition & 1 deletion tests/test_config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
from collections.abc import Mapping

import pytest
from astropy.extern.configobj.configobj import ConfigObj, Section

from stpipe import config_parser
from stpipe.extern.configobj.configobj import ConfigObj, Section
from stpipe.utilities import _not_set


Expand Down

0 comments on commit 8ca1565

Please sign in to comment.