From 1235b9c5c39e7bb768399b6d34d56ace59a72460 Mon Sep 17 00:00:00 2001 From: Jactus Date: Sun, 27 Sep 2020 18:48:50 +0800 Subject: [PATCH] Add PEP8 style check and add bug report issue template --- .github/ISSUE_TEMPLATE/bug-report.md | 38 ++++++++++++++++++++++++++++ .github/workflows/test.yml | 14 +++++----- .gitignore | 2 ++ 3 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 000000000..7cf52786c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,38 @@ +--- +name: "\U0001F41B Bug Report" +about: Submit a bug report to help us improve Qlib +labels: bug + +--- + +## 🐛 Bug Description + + + +## To Reproduce + +Steps to reproduce the behavior: + +1. +1. +1. + + +## Expected Behavior + + + +## Screenshot + + + +## Environment + + - Qlib version: + - Python version: + - OS (`Windows`, `Linux`, `MacOS`): + - Commit number: + +## Additional Notes + + \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0814607e2..ebd708513 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: - name: Install test dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest + pip install flake8 pytest pep8 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 @@ -43,6 +43,11 @@ jobs: # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Check PEP8 python code style + run: | + find . -name \*.py -exec pep8 {} + + + - name: Test with pytest run: | pytest ../qlib @@ -57,9 +62,4 @@ jobs: python scripts/get_data.py qlib_data_cn --target_dir ~/.qlib/qlib_data/cn_data cd examples estimator -c estimator/estimator_config.yaml - jupyter nbconvert --execute estimator/analyze_from_estimator.ipynb - - - - - \ No newline at end of file + jupyter nbconvert --execute estimator/analyze_from_estimator.ipynb \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5c8ce5e3a..0af365d7b 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ mlruns/ tags +.pytest_cache/ +.vscode/