Skip to content

Commit

Permalink
upd ci
Browse files Browse the repository at this point in the history
  • Loading branch information
admin committed Nov 6, 2024
1 parent 102b3fa commit f606fec
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def data():
item["mode"],
item["pitch"],
item["range"],
item["variation"],
item["pitchSD"],
item["tempo"],
item["volume"],
]
Expand All @@ -67,7 +67,7 @@ def data():
item["mode"],
item["pitch"],
item["range"],
item["variation"],
item["pitchSD"],
item["tempo"],
item["volume"],
]
Expand Down Expand Up @@ -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)

0 comments on commit f606fec

Please sign in to comment.