Return dict describing the context of this package Parameters ---------- pkg_path : str path containing __init__.py for package Returns ------- context : dict with named parameters of interest
(pkg_path: str)
| 68 | |
| 69 | |
| 70 | def pkg_info(pkg_path: str) -> dict: |
| 71 | """Return dict describing the context of this package |
| 72 | |
| 73 | Parameters |
| 74 | ---------- |
| 75 | pkg_path : str |
| 76 | path containing __init__.py for package |
| 77 | |
| 78 | Returns |
| 79 | ------- |
| 80 | context : dict |
| 81 | with named parameters of interest |
| 82 | """ |
| 83 | src, hsh = pkg_commit_hash(pkg_path) |
| 84 | return dict( |
| 85 | ipython_version=release.version, |
| 86 | ipython_path=pkg_path, |
| 87 | commit_source=src, |
| 88 | commit_hash=hsh, |
| 89 | sys_version=sys.version, |
| 90 | sys_executable=sys.executable, |
| 91 | sys_platform=sys.platform, |
| 92 | platform=platform.platform(), |
| 93 | os_name=os.name, |
| 94 | default_encoding=encoding.DEFAULT_ENCODING, |
| 95 | ) |
| 96 | |
| 97 | def get_sys_info() -> dict: |
| 98 | """Return useful information about IPython and the system, as a dict.""" |
no test coverage detected
searching dependent graphs…