From f606fec67e54217c49ab9db68329e0c2ed327c09 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 7 Nov 2024 00:45:27 +0800 Subject: [PATCH] upd ci --- .github/workflows/python-app.yml | 43 ++++++++++++++++---------------- embedder.py | 6 ++--- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 001aeb8..7b21bc0 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -5,35 +5,34 @@ name: Python application on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] permissions: contents: read jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python 3.11 - uses: actions/setup-python@v3 - with: - python-version: "3.11" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # 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: Test with pytest - # run: | - # pytest + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: "3.11" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # 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: Test with pytest + run: | + python ./embedder.py diff --git a/embedder.py b/embedder.py index d6f863b..0348579 100644 --- a/embedder.py +++ b/embedder.py @@ -53,7 +53,7 @@ def data(): item["mode"], item["pitch"], item["range"], - item["variation"], + item["pitchSD"], item["tempo"], item["volume"], ] @@ -67,7 +67,7 @@ def data(): item["mode"], item["pitch"], item["range"], - item["variation"], + item["pitchSD"], item["tempo"], item["volume"], ] @@ -177,5 +177,5 @@ def dnn( if __name__ == "__main__": warnings.filterwarnings("ignore") x_train, y_train, x_test, y_test = data() - dnn(x_train, y_train, x_test, y_test) + dnn(x_train, y_train, x_test, y_test, epochs=1) # svm(x_train, y_train, x_test, y_test)