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 Oct 31, 2023
1 parent 0c8e8b5 commit 9b34a68
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3,959 deletions.
9 changes: 0 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ doctest_plus = true
doctest_rst = true
text_file_format = 'rst'
addopts = ''
norecursedirs = [
'src/stpipe/extern',
]
testpaths = [
'tests',
]
Expand All @@ -89,7 +86,6 @@ select = [
line-length = 88
extend-exclude = [
'docs',
'src/stpipe/extern',
'scripts/strun',
]
extend-ignore = [
Expand All @@ -100,7 +96,6 @@ extend-ignore = [
profile = "black"
filter_files = true
line_length = 88
extend_skip_glob = ["src/stpipe/extern/*"]

[tool.black]
line-length = 88
Expand All @@ -111,14 +106,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 9b34a68

Please sign in to comment.