Skip to content

Commit

Permalink
Remove src/stpipe/extern as configobj now comes from astropy
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson committed Nov 7, 2023
1 parent 8ca1565 commit 2df22bb
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3,958 deletions.
8 changes: 0 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ addopts = [
"-ra",
"--color=yes"
]
norecursedirs = [
'src/stpipe/extern',
]
testpaths = [
'tests',
]
Expand All @@ -96,7 +93,6 @@ src = [
line-length = 88
extend-exclude = [
'docs',
'src/stpipe/extern',
'scripts/strun',
]

Expand Down Expand Up @@ -156,14 +152,10 @@ force-exclude = '''
| \.git
| \.pytest_cache
| \.tox
| src/stpipe/extern
)/
)
'''

[tool.flynt]
exclude = ["src/stpipe/extern/*"]

[tool.codespell]
skip="*.pdf,*.fits,*.asdf,.tox,build,./tags,.git,docs/_build"
# ignore-words-list="""
Expand Down
8 changes: 0 additions & 8 deletions src/stpipe/extern/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +0,0 @@
"""
This package contains python package(s) that are bundled with jwst but are
external to jwst, and hence are developed in a separate source tree.
Currently the bundled external dependencies are:
.. _ConfigObj: https://github.com/DiffSK/configobj
"""
19 changes: 19 additions & 0 deletions src/stpipe/extern/configobj.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import inspect
import sys
import warnings

from astropy.extern import configobj

# Add submodules to system modules so they are available under the same path
for mod in inspect.getmembers(configobj, inspect.ismodule):
# add as a local variable
locals()[mod[0]] = mod[1]
# Add the submodule to the system modules so it can be imported
sys.modules[f"stpipe.extern.configobj.{mod[0]}"] = mod[1]


warnings.warn(
"stpipe.extern.configobj is deprecated in favor of astropy.extern.configobj, "
"please use that instead.",
DeprecationWarning,
)
Empty file.
Loading

0 comments on commit 2df22bb

Please sign in to comment.