From c0b0920d73159f3286eef81b76d52eea3423a5c2 Mon Sep 17 00:00:00 2001 From: Jactus Date: Mon, 28 Sep 2020 14:40:12 +0800 Subject: [PATCH] Add collect_info script --- .github/ISSUE_TEMPLATE/bug-report.md | 4 +++- scripts/collect_info.py | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 scripts/collect_info.py diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 721f7113c..0ba45684e 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -28,7 +28,9 @@ Steps to reproduce the behavior: ## Environment - - Qlib version (use the command: `print(qlib.__version__)`): +**Note**: One could run `python scripts/collect_info.py` under the `qlib` directory to get the following information. + + - Qlib version: - Python version: - OS (`Windows`, `Linux`, `MacOS`): - Commit number (optional, please provide it if you are using the dev version): diff --git a/scripts/collect_info.py b/scripts/collect_info.py new file mode 100644 index 000000000..da4c406ae --- /dev/null +++ b/scripts/collect_info.py @@ -0,0 +1,24 @@ +import sys, platform +import qlib + +def linux_distribution(): + try: + return platform.linux_distribution() + except: + return "N/A" + +print('Qlib version: {} \n'.format(qlib.__version__)) +print("""Python version: {} \n +linux_distribution: {} +system: {} +machine: {} +platform: {} +version: {} +""".format( +sys.version.split('\n'), +linux_distribution(), +platform.system(), +platform.machine(), +platform.platform(), +platform.version(), +)) \ No newline at end of file