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