-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add soft deprecation cycle to public methods
- Loading branch information
CodyCBakerPhD
committed
Aug 13, 2024
1 parent
52708c1
commit 47e1ecb
Showing
5 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
import warnings | ||
|
||
message = ( | ||
"The 'inspector_tools' module has been deprecated. Please import the helper functions from the top-level package." | ||
"The 'nwbinspector.nwbinspector' submodule has been deprecated. " | ||
"Please import the helper functions from the top-level package." | ||
) | ||
|
||
warnings.warn(message=message, category=DeprecationWarning) | ||
|
||
# Still keep imports functional with warning for soft deprecation cycle | ||
# TODO: remove after 9/15/2024 | ||
from .._configuration import ( | ||
INTERNAL_CONFIGS, | ||
InspectorOutputJSONEncoder, | ||
validate_config, | ||
copy_check, | ||
load_config, | ||
configure_checks, | ||
) | ||
from .._inspection import ( | ||
inspect_all, | ||
inspect_nwb, # TODO: remove | ||
inspect_nwbfile, | ||
inspect_nwbfile_object, | ||
run_checks, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import warnings | ||
|
||
message = "The 'inspector_tools' submodule has been deprecated. Please import the helper functions from the top-level package." | ||
|
||
warnings.warn(message=message, category=DeprecationWarning) | ||
|
||
# Still keep imports functional with warning for soft deprecation cycle | ||
# TODO: remove after 9/15/2024 | ||
from .._organization import organize_messages, _get_report_header | ||
from .._formatting import format_message, MessageFormatter, FormatterOptions, print_to_console, save_report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import warnings | ||
|
||
message = "The 'register_checks' submodule has been deprecated. Please import the helper functions from the top-level package." | ||
|
||
warnings.warn(message=message, category=DeprecationWarning) | ||
|
||
# Still keep imports functional with warning for soft deprecation cycle | ||
# TODO: remove after 9/15/2024 | ||
from .._types import InspectorMessage, Importance, Severity | ||
from .._registration import register_check, available_checks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import warnings | ||
|
||
message = ( | ||
"The 'version' submodule has been deprecated. " | ||
"Please import the version using `importlib.metadata.version('nwbinspector')`." | ||
) | ||
|
||
warnings.warn(message=message, category=DeprecationWarning) | ||
|
||
# Still keep imports functional with warning for soft deprecation cycle | ||
# TODO: remove after 9/15/2024 | ||
from .._version import __version__ |