Skip to content

Commit

Permalink
remove show_versions from top level (#2085)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewMiddlehurst authored Sep 25, 2024
1 parent 2a78e0e commit 550aca5
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 89 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ body:
Please run the following code snippet and paste the output here.
```python
from aeon import show_versions; show_versions()
from aeon.utils import show_versions; show_versions()
```
placeholder: |
<details>
Expand Down
4 changes: 0 additions & 4 deletions aeon/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
"""aeon toolkit."""

__version__ = "0.11.1"

__all__ = ["show_versions"]

from aeon.utils._maint._show_versions import show_versions
3 changes: 3 additions & 0 deletions aeon/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"COLLECTIONS_DATA_TYPES",
"SERIES_DATA_TYPES",
"HIERARCHICAL_DATA_TYPES",
# github debug util
"show_versions",
]

from aeon.utils._data_types import (
Expand All @@ -17,5 +19,6 @@
HIERARCHICAL_DATA_TYPES,
SERIES_DATA_TYPES,
)
from aeon.utils._show_versions import show_versions
from aeon.utils._split import split_series
from aeon.utils.index_functions import get_cutoff, get_window, update_data
Empty file removed aeon/utils/_maint/__init__.py
Empty file.
84 changes: 0 additions & 84 deletions aeon/utils/_maint/_show_versions.py

This file was deleted.

47 changes: 47 additions & 0 deletions aeon/utils/_show_versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"""Utility methods to print system info for debugging.
Adapted from the sklearn show_versions function.
"""

__maintainer__ = ["MatthewMiddlehurst"]
__all__ = ["show_versions"]

import platform
import sys
from importlib.metadata import PackageNotFoundError, version

from aeon import __version__

deps = [
"pip",
"setuptools",
"scikit-learn",
"numpy",
"numba",
"scipy",
"pandas",
]


def show_versions():
"""Print useful debugging information."""
sys_info = {
"python": sys.version.replace("\n", " "),
"executable": sys.executable,
"machine": platform.platform(),
}

print("\nSystem:") # noqa: T001, T201
for k, stat in sys_info.items():
print(f"{k:>10}: {stat}") # noqa: T001, T201

deps_info = {"aeon": __version__}
for modname in deps:
try:
deps_info[modname] = version(modname)
except PackageNotFoundError:
deps_info[modname] = None

print("\nPython dependencies:") # noqa: T001, T201
for k, stat in deps_info.items():
print(f"{k:>13}: {stat}") # noqa: T001, T201

0 comments on commit 550aca5

Please sign in to comment.