From 682d44a2b3061c46baf96ab3fa3678aba277ad7f Mon Sep 17 00:00:00 2001 From: Flippchen <91947480+Flippchen@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:10:46 +0200 Subject: [PATCH 1/8] Create first github workflow --- .github/workflows/python-package.yml | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..0db2e60 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,37 @@ +name: Python package + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.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 From 2137f680ef08475706e59b45ba39d56848a64338 Mon Sep 17 00:00:00 2001 From: Flippchen <91947480+Flippchen@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:14:31 +0200 Subject: [PATCH 2/8] fixed dependency installation --- requirements-dev.txt | 2 +- requirements-test.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 84a6377..71dccfc 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ numpy scipy -sklearn +scikit-learn torch networkx matplotlib diff --git a/requirements-test.txt b/requirements-test.txt index 96fbca9..22cb507 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,6 +1,6 @@ numpy scipy -sklearn +scikit-learn torch networkx tensorflow From f835099c1ccb2963075f366cb37c87fc6c57ca6f Mon Sep 17 00:00:00 2001 From: Flippchen <91947480+Flippchen@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:26:58 +0200 Subject: [PATCH 3/8] fix llvm --- .github/workflows/python-package.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0db2e60..c1da85e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -21,6 +21,10 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + - name: Install llvmlite + run: | + sudo apt-get install llvm-10 + python -m pip install llvmlite==0.32.1 - name: Install dependencies run: | python -m pip install --upgrade pip From 41799421c3c6ed44360cad00ca5d791647b360b4 Mon Sep 17 00:00:00 2001 From: Flippchen <91947480+Flippchen@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:29:34 +0200 Subject: [PATCH 4/8] higher llvm version --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c1da85e..3d12731 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -23,7 +23,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install llvmlite run: | - sudo apt-get install llvm-10 + sudo apt-get install llvm-11 python -m pip install llvmlite==0.32.1 - name: Install dependencies run: | From 82127c5d12a8b249ac74258b5d49c1a1d78fdf9a Mon Sep 17 00:00:00 2001 From: Flippchen <91947480+Flippchen@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:33:53 +0200 Subject: [PATCH 5/8] fix llvm config path --- .github/workflows/python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3d12731..fee7af0 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -21,10 +21,10 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - - name: Install llvmlite + - name: Install llvm run: | sudo apt-get install llvm-11 - python -m pip install llvmlite==0.32.1 + LLVM_CONFIG=/usr/bin/llvm-config-11 pip install numba==0.45.0 llvmlite==0.32.1 - name: Install dependencies run: | python -m pip install --upgrade pip From e02561bd4c7616aaae7f8f76be8035fafe26a9d7 Mon Sep 17 00:00:00 2001 From: Flippchen <91947480+Flippchen@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:40:17 +0200 Subject: [PATCH 6/8] fix llvm und OS version --- .github/workflows/python-package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index fee7af0..82c12d8 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: @@ -23,8 +23,8 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install llvm run: | - sudo apt-get install llvm-11 - LLVM_CONFIG=/usr/bin/llvm-config-11 pip install numba==0.45.0 llvmlite==0.32.1 + sudo apt-get install llvm-8 + LLVM_CONFIG=/usr/bin/llvm-config-8 pip install numba==0.45.0 llvmlite==0.32.1 - name: Install dependencies run: | python -m pip install --upgrade pip From 61d41c5bbc18f95386a5634eb60723cb177ddc17 Mon Sep 17 00:00:00 2001 From: Flippchen <91947480+Flippchen@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:45:48 +0200 Subject: [PATCH 7/8] flake8 only warnings --- .github/workflows/python-package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 82c12d8..b9eac0d 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9"] steps: - uses: actions/checkout@v3 @@ -33,9 +33,9 @@ jobs: - 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 + flake8 numpy_ml --count --exit-zero --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 + flake8 numpy_ml --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | pytest From 448aee321bd5b90b4a0486edc954e7c3014e99b2 Mon Sep 17 00:00:00 2001 From: Flippchen <91947480+Flippchen@users.noreply.github.com> Date: Sat, 26 Aug 2023 00:56:28 +0200 Subject: [PATCH 8/8] fixed numpy version --- requirements-dev.txt | 2 +- requirements-test.txt | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 71dccfc..14e0091 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -numpy +numpy<1.24.0 scipy scikit-learn torch diff --git a/requirements-test.txt b/requirements-test.txt index 22cb507..feb5115 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ -numpy +numpy<1.24.0 scipy scikit-learn torch diff --git a/requirements.txt b/requirements.txt index 6bad103..8d64218 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -numpy +numpy<1.24.0 scipy