From 66b4002d061f1b97d148d3230574dc11c3b67952 Mon Sep 17 00:00:00 2001 From: Altaf Date: Wed, 5 Jun 2024 12:10:51 -0700 Subject: [PATCH 01/17] Create python-app.yml --- .github/workflows/python-app.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..1168bd9 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - 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 From 318674fe6baed2a5889a9cfd07a222d86f9214b7 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 12:37:44 -0700 Subject: [PATCH 02/17] testing CI --- .github/workflows/python-app.yml | 6 ++++-- environment.yml | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 1168bd9..29827fc 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -26,8 +26,10 @@ jobs: - 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 + pip install conda + conda env create -f environment.yml + conda activate protein-prediction + pip install pytest - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names diff --git a/environment.yml b/environment.yml index 9e4db18..b0f08b3 100644 --- a/environment.yml +++ b/environment.yml @@ -15,6 +15,7 @@ dependencies: - expat=2.6.2=hcec6c5f_0 - fonttools=4.51.0=py312h6c40b1e_0 - freetype=2.12.1=hd8bbffd_0 + - iniconfig=1.1.1=pyhd3eb1b0_0 - intel-openmp=2023.1.0=ha357a0b_43548 - joblib=1.4.0=py312hecd8cb5_0 - jpeg=9e=h6c40b1e_1 @@ -45,14 +46,16 @@ dependencies: - numpy=1.26.4=py312h7d6adbd_0 - numpy-base=1.26.4=py312hbb3573c_0 - openjpeg=2.4.0=h66ea3da_0 - - openssl=3.0.13=hca72f7f_1 + - openssl=3.0.13=hca72f7f_2 - packaging=23.2=py312hecd8cb5_0 - pandas=2.2.1=py312he282a81_0 - pathlib=1.0.1=pyhd3eb1b0_1 - pillow=10.3.0=py312h6c40b1e_0 - pip=24.0=py312hecd8cb5_0 + - pluggy=1.0.0=py312hecd8cb5_1 - pybind11-abi=5=hd3eb1b0_0 - pyparsing=3.0.9=py312hecd8cb5_0 + - pytest=7.4.0=py312hecd8cb5_0 - python=3.12.3=hd58486a_1 - python-dateutil=2.9.0post0=py312hecd8cb5_0 - python-tzdata=2023.3=pyhd3eb1b0_0 From ef2aacefea0fa84c34e637908356657a8e4865fd Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 12:55:32 -0700 Subject: [PATCH 03/17] testing againnnn --- .github/workflows/python-app.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 29827fc..ec925bd 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -19,17 +19,19 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v2 with: - python-version: "3.10" + auto-update-conda: true + python-version: 3.12.3 # Change this to your desired Python version + environment-file: environment.yml + activate-environment: protein-prediction # Name of your conda environment as specified in environment.yml - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install conda - conda env create -f environment.yml - conda activate protein-prediction - pip install pytest + run: conda env update --file environment.yml --name protein-prediction + - name: Set up Python 3.12.3 + uses: actions/setup-python@v3 + with: + python-version: "3.12.3" - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names From e805b92ee56d2920e1d08d609f7112ccaeb0172e Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 14:28:29 -0700 Subject: [PATCH 04/17] testinggg --- environment.yml | 145 +++++++++++++++++++++++++++--------------------- 1 file changed, 82 insertions(+), 63 deletions(-) diff --git a/environment.yml b/environment.yml index b0f08b3..db746bc 100644 --- a/environment.yml +++ b/environment.yml @@ -1,78 +1,97 @@ name: protein-prediction channels: + - conda-forge - defaults - https://conda.anaconda.org/gurobi dependencies: - - blas=1.0=openblas - - bottleneck=1.3.7=py312h32608ca_0 - - brotli=1.0.9=h6c40b1e_8 - - brotli-bin=1.0.9=h6c40b1e_8 - - bzip2=1.0.8=h6c40b1e_6 - - ca-certificates=2024.3.11=hecd8cb5_0 - - colorama=0.4.6=py312hecd8cb5_0 - - contourpy=1.2.0=py312ha357a0b_0 - - cycler=0.11.0=pyhd3eb1b0_0 - - expat=2.6.2=hcec6c5f_0 - - fonttools=4.51.0=py312h6c40b1e_0 - - freetype=2.12.1=hd8bbffd_0 - - iniconfig=1.1.1=pyhd3eb1b0_0 + - blas=2.122=openblas + - blas-devel=3.9.0=22_osx64_openblas + - bottleneck=1.3.8=py312h3f2338b_0 + - brotli=1.1.0=h0dc2134_1 + - brotli-bin=1.1.0=h0dc2134_1 + - bzip2=1.0.8=h10d778d_5 + - ca-certificates=2024.6.2=h8857fd0_0 + - certifi=2024.2.2=pyhd8ed1ab_0 + - colorama=0.4.6=pyhd8ed1ab_0 + - contourpy=1.2.1=py312h9230928_0 + - cycler=0.12.1=pyhd8ed1ab_0 + - exceptiongroup=1.2.0=pyhd8ed1ab_2 + - expat=2.6.2=h73e2aa4_0 + - fonttools=4.53.0=py312hbd25219_0 + - freetype=2.12.1=h60636b9_2 + - icu=73.2=hf5e326d_0 + - iniconfig=2.0.0=pyhd8ed1ab_0 - intel-openmp=2023.1.0=ha357a0b_43548 - - joblib=1.4.0=py312hecd8cb5_0 - - jpeg=9e=h6c40b1e_1 - - kiwisolver=1.4.4=py312hcec6c5f_0 + - joblib=1.4.2=pyhd8ed1ab_0 + - jpeg=9e=hb7f2c08_3 + - kiwisolver=1.4.5=py312h49ebfd2_1 - lcms2=2.12=hf1fd2bf_0 - lerc=3.0=he9d5cce_0 - - libbrotlicommon=1.0.9=h6c40b1e_8 - - libbrotlidec=1.0.9=h6c40b1e_8 - - libbrotlienc=1.0.9=h6c40b1e_8 - - libcxx=14.0.6=h9765a3e_0 + - libblas=3.9.0=22_osx64_openblas + - libbrotlicommon=1.1.0=h0dc2134_1 + - libbrotlidec=1.1.0=h0dc2134_1 + - libbrotlienc=1.1.0=h0dc2134_1 + - libcblas=3.9.0=22_osx64_openblas + - libcxx=17.0.6=h88467a6_0 - libdeflate=1.17=hb664fd8_1 - - libffi=3.4.4=hecd8cb5_1 - - libgfortran=5.0.0=11_3_0_hecd8cb5_28 - - libgfortran5=11.3.0=h9dfd629_28 - - libopenblas=0.3.21=h54e7dc3_0 - - libpng=1.6.39=h6c40b1e_0 + - libexpat=2.6.2=h73e2aa4_0 + - libffi=3.4.2=h0d85af4_5 + - libgfortran=5.0.0=13_2_0_h97931a8_3 + - libgfortran5=13.2.0=h2873a65_3 + - libhwloc=2.10.0=default_h456cccd_1001 + - libiconv=1.17=hd75f5a5_2 + - liblapack=3.9.0=22_osx64_openblas + - liblapacke=3.9.0=22_osx64_openblas + - libopenblas=0.3.27=openmp_hfef2a42_0 + - libpng=1.6.43=h92b6c6a_0 + - libsqlite=3.45.3=h92b6c6a_0 - libtiff=4.5.1=hcec6c5f_0 - - libwebp-base=1.3.2=h6c40b1e_0 - - llvm-openmp=14.0.6=h0dcd299_0 - - lz4-c=1.9.4=hcec6c5f_1 - - matplotlib=3.8.4=py312hecd8cb5_0 - - matplotlib-base=3.8.4=py312h7f12edd_0 - - mkl=2023.1.0=h8e150cf_43560 - - mkl-service=2.4.0=py312h6c40b1e_1 - - ncurses=6.4=hcec6c5f_0 - - networkx=3.1=py312hecd8cb5_0 - - numexpr=2.8.7=py312h7d6adbd_0 + - libwebp-base=1.4.0=h10d778d_0 + - libxml2=2.12.7=h3e169fe_1 + - libzlib=1.2.13=h87427d6_6 + - llvm-openmp=18.1.6=h15ab845_0 + - lz4-c=1.9.4=hf0c8a7f_0 + - matplotlib=3.8.4=py312hb401068_2 + - matplotlib-base=3.8.4=py312hb6d62fa_2 + - mkl=2023.2.0=h54c2260_50500 + - mkl-service=2.4.0=py312h2402a68_1 + - munkres=1.1.4=pyh9f0ad1d_0 + - ncurses=6.5=h5846eda_0 + - networkx=3.3=pyhd8ed1ab_1 + - numexpr=2.10.0=py312h1171441_0 - numpy=1.26.4=py312h7d6adbd_0 - numpy-base=1.26.4=py312hbb3573c_0 + - openblas=0.3.27=openmp_h6794695_0 - openjpeg=2.4.0=h66ea3da_0 - - openssl=3.0.13=hca72f7f_2 - - packaging=23.2=py312hecd8cb5_0 - - pandas=2.2.1=py312he282a81_0 - - pathlib=1.0.1=pyhd3eb1b0_1 + - openssl=3.3.1=h87427d6_0 + - packaging=24.0=pyhd8ed1ab_0 + - pandas=2.2.2=py312h1171441_1 + - pathlib=1.0.1=py_1 - pillow=10.3.0=py312h6c40b1e_0 - - pip=24.0=py312hecd8cb5_0 - - pluggy=1.0.0=py312hecd8cb5_1 - - pybind11-abi=5=hd3eb1b0_0 - - pyparsing=3.0.9=py312hecd8cb5_0 - - pytest=7.4.0=py312hecd8cb5_0 - - python=3.12.3=hd58486a_1 - - python-dateutil=2.9.0post0=py312hecd8cb5_0 - - python-tzdata=2023.3=pyhd3eb1b0_0 - - pytz=2024.1=py312hecd8cb5_0 - - readline=8.2=hca72f7f_0 - - scikit-learn=1.4.2=py312he282a81_1 - - scipy=1.13.0=py312hba6221a_0 - - setuptools=69.5.1=py312hecd8cb5_0 - - six=1.16.0=pyhd3eb1b0_1 - - sqlite=3.45.3=h6c40b1e_0 - - tbb=2021.8.0=ha357a0b_0 - - threadpoolctl=2.2.0=pyh0d69192_0 - - tk=8.6.14=h4d00af3_0 - - tornado=6.3.3=py312h6c40b1e_0 - - tzdata=2024a=h04d1e81_0 - - unicodedata2=15.1.0=py312h6c40b1e_0 - - wheel=0.43.0=py312hecd8cb5_0 + - pip=24.0=pyhd8ed1ab_0 + - pluggy=1.5.0=pyhd8ed1ab_0 + - pybind11-abi=4=hd8ed1ab_3 + - pyparsing=3.1.2=pyhd8ed1ab_0 + - pytest=8.2.2=pyhd8ed1ab_0 + - python=3.12.3=h1411813_0_cpython + - python-dateutil=2.9.0=pyhd8ed1ab_0 + - python-tzdata=2024.1=pyhd8ed1ab_0 + - python_abi=3.12=4_cp312 + - pytz=2024.1=pyhd8ed1ab_0 + - readline=8.2=h9e318b2_1 + - scikit-learn=1.5.0=py312hc214ba5_1 + - scipy=1.13.1=py312hb9702fa_0 + - setuptools=70.0.0=pyhd8ed1ab_0 + - six=1.16.0=pyh6c4a22f_0 + - sqlite=3.45.3=h7461747_0 + - tbb=2021.12.0=h3c5361c_1 + - threadpoolctl=3.5.0=pyhc1e730c_0 + - tk=8.6.13=h1abcd95_1 + - tomli=2.0.1=pyhd8ed1ab_0 + - tornado=6.4=py312h41838bb_0 + - tzdata=2024a=h0c530f3_0 + - unicodedata2=15.1.0=py312h104f124_0 + - wheel=0.43.0=pyhd8ed1ab_1 - xz=5.4.6=h6c40b1e_1 - - zlib=1.2.13=h4b97444_1 - - zstd=1.5.5=hc035e20_2 \ No newline at end of file + - zlib=1.2.13=h87427d6_6 + - zstd=1.5.6=h915ae27_0 \ No newline at end of file From c79699244d868cb056d717a5a57ff7fda6560308 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 14:40:58 -0700 Subject: [PATCH 05/17] testing --- .github/workflows/python-app.yml | 40 +++++++++++++------------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index ec925bd..d445b00 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,24 +1,23 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Python application +name: Python application test with Conda on: push: - branches: [ "main" ] + branches: + - main + - master pull_request: - branches: [ "main" ] - -permissions: - contents: read + branches: + - main + - master jobs: - build: - + test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Check out the code + uses: actions/checkout@v3 + - name: Set up Miniconda uses: conda-incubator/setup-miniconda@v2 with: @@ -26,18 +25,11 @@ jobs: python-version: 3.12.3 # Change this to your desired Python version environment-file: environment.yml activate-environment: protein-prediction # Name of your conda environment as specified in environment.yml + - name: Install dependencies run: conda env update --file environment.yml --name protein-prediction - - name: Set up Python 3.12.3 - uses: actions/setup-python@v3 - with: - python-version: "3.12.3" - - 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 + + - name: Run tests run: | - pytest + source activate myenv + pytest \ No newline at end of file From 96eab0eca991bf3bc80042723e5ea9567d91fd26 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 15:10:39 -0700 Subject: [PATCH 06/17] test --- .github/workflows/python-app.yml | 37 ++++++++++++++------------------ 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index d445b00..7e3a820 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -11,25 +11,20 @@ on: - master jobs: - test: - runs-on: ubuntu-latest - + example-3: + name: Ex3 Linux + runs-on: "ubuntu-latest" + defaults: + run: + shell: bash -el {0} steps: - - name: Check out the code - uses: actions/checkout@v3 - - - name: Set up Miniconda - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - python-version: 3.12.3 # Change this to your desired Python version - environment-file: environment.yml - activate-environment: protein-prediction # Name of your conda environment as specified in environment.yml - - - name: Install dependencies - run: conda env update --file environment.yml --name protein-prediction - - - name: Run tests - run: | - source activate myenv - pytest \ No newline at end of file + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: protein-prediction + environment-file: environment.yml + python-version: 3.12.3 + auto-activate-base: false + - run: | + conda info + conda list \ No newline at end of file From 432416a0d785d9a81726eefccc99a1e8636d8682 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 15:54:12 -0700 Subject: [PATCH 07/17] testing --- environment.yml | 48 +++++++++++++++--------------------------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/environment.yml b/environment.yml index db746bc..2e75a23 100644 --- a/environment.yml +++ b/environment.yml @@ -4,9 +4,6 @@ channels: - defaults - https://conda.anaconda.org/gurobi dependencies: - - blas=2.122=openblas - - blas-devel=3.9.0=22_osx64_openblas - - bottleneck=1.3.8=py312h3f2338b_0 - brotli=1.1.0=h0dc2134_1 - brotli-bin=1.1.0=h0dc2134_1 - bzip2=1.0.8=h10d778d_5 @@ -16,61 +13,48 @@ dependencies: - contourpy=1.2.1=py312h9230928_0 - cycler=0.12.1=pyhd8ed1ab_0 - exceptiongroup=1.2.0=pyhd8ed1ab_2 - - expat=2.6.2=h73e2aa4_0 - fonttools=4.53.0=py312hbd25219_0 - freetype=2.12.1=h60636b9_2 - - icu=73.2=hf5e326d_0 - iniconfig=2.0.0=pyhd8ed1ab_0 - - intel-openmp=2023.1.0=ha357a0b_43548 - joblib=1.4.2=pyhd8ed1ab_0 - - jpeg=9e=hb7f2c08_3 - kiwisolver=1.4.5=py312h49ebfd2_1 - - lcms2=2.12=hf1fd2bf_0 - - lerc=3.0=he9d5cce_0 + - lcms2=2.16=ha2f27b4_0 + - lerc=4.0.0=hb486fe8_0 - libblas=3.9.0=22_osx64_openblas - libbrotlicommon=1.1.0=h0dc2134_1 - libbrotlidec=1.1.0=h0dc2134_1 - libbrotlienc=1.1.0=h0dc2134_1 - libcblas=3.9.0=22_osx64_openblas - libcxx=17.0.6=h88467a6_0 - - libdeflate=1.17=hb664fd8_1 + - libdeflate=1.20=h49d49c5_0 - libexpat=2.6.2=h73e2aa4_0 - libffi=3.4.2=h0d85af4_5 - libgfortran=5.0.0=13_2_0_h97931a8_3 - libgfortran5=13.2.0=h2873a65_3 - - libhwloc=2.10.0=default_h456cccd_1001 - - libiconv=1.17=hd75f5a5_2 + - libjpeg-turbo=3.0.0=h0dc2134_1 - liblapack=3.9.0=22_osx64_openblas - - liblapacke=3.9.0=22_osx64_openblas - libopenblas=0.3.27=openmp_hfef2a42_0 - libpng=1.6.43=h92b6c6a_0 - libsqlite=3.45.3=h92b6c6a_0 - - libtiff=4.5.1=hcec6c5f_0 + - libtiff=4.6.0=h129831d_3 - libwebp-base=1.4.0=h10d778d_0 - - libxml2=2.12.7=h3e169fe_1 - - libzlib=1.2.13=h87427d6_6 + - libxcb=1.15=hb7f2c08_0 + - libzlib=1.3.1=h87427d6_1 - llvm-openmp=18.1.6=h15ab845_0 - - lz4-c=1.9.4=hf0c8a7f_0 - matplotlib=3.8.4=py312hb401068_2 - matplotlib-base=3.8.4=py312hb6d62fa_2 - - mkl=2023.2.0=h54c2260_50500 - - mkl-service=2.4.0=py312h2402a68_1 - munkres=1.1.4=pyh9f0ad1d_0 - ncurses=6.5=h5846eda_0 - networkx=3.3=pyhd8ed1ab_1 - - numexpr=2.10.0=py312h1171441_0 - - numpy=1.26.4=py312h7d6adbd_0 - - numpy-base=1.26.4=py312hbb3573c_0 - - openblas=0.3.27=openmp_h6794695_0 - - openjpeg=2.4.0=h66ea3da_0 + - numpy=1.26.4=py312he3a82b2_0 + - openjpeg=2.5.2=h7310d3a_0 - openssl=3.3.1=h87427d6_0 - packaging=24.0=pyhd8ed1ab_0 - pandas=2.2.2=py312h1171441_1 - - pathlib=1.0.1=py_1 - - pillow=10.3.0=py312h6c40b1e_0 + - pillow=10.3.0=py312h0c923fa_0 - pip=24.0=pyhd8ed1ab_0 - pluggy=1.5.0=pyhd8ed1ab_0 - - pybind11-abi=4=hd8ed1ab_3 + - pthread-stubs=0.4=hc929b4f_1001 - pyparsing=3.1.2=pyhd8ed1ab_0 - pytest=8.2.2=pyhd8ed1ab_0 - python=3.12.3=h1411813_0_cpython @@ -83,15 +67,13 @@ dependencies: - scipy=1.13.1=py312hb9702fa_0 - setuptools=70.0.0=pyhd8ed1ab_0 - six=1.16.0=pyh6c4a22f_0 - - sqlite=3.45.3=h7461747_0 - - tbb=2021.12.0=h3c5361c_1 - threadpoolctl=3.5.0=pyhc1e730c_0 - tk=8.6.13=h1abcd95_1 - tomli=2.0.1=pyhd8ed1ab_0 - tornado=6.4=py312h41838bb_0 - tzdata=2024a=h0c530f3_0 - - unicodedata2=15.1.0=py312h104f124_0 - wheel=0.43.0=pyhd8ed1ab_1 - - xz=5.4.6=h6c40b1e_1 - - zlib=1.2.13=h87427d6_6 - - zstd=1.5.6=h915ae27_0 \ No newline at end of file + - xorg-libxau=1.0.11=h0dc2134_0 + - xorg-libxdmcp=1.1.3=h35c211d_0 + - xz=5.2.6=h775f41a_0 + - zstd=1.5.6=h915ae27_0 From 326b8703a5a7ae9cab701280efcfe30b7fef2d87 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 15:58:00 -0700 Subject: [PATCH 08/17] test --- .github/workflows/python-app.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 7e3a820..ca107fa 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,8 +23,10 @@ jobs: with: activate-environment: protein-prediction environment-file: environment.yml - python-version: 3.12.3 + python-version: 3.12.3 auto-activate-base: false + channels: conda-forge,defaults, gurobi + - run: | conda info - conda list \ No newline at end of file + conda list From b41dfe20346a25d12e569d891cab685b6fb64b43 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 16:04:21 -0700 Subject: [PATCH 09/17] testing --- .github/workflows/python-app.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index ca107fa..926676d 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -19,14 +19,13 @@ jobs: shell: bash -el {0} steps: - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: protein-prediction - environment-file: environment.yml - python-version: 3.12.3 - auto-activate-base: false - channels: conda-forge,defaults, gurobi - + - uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: protein-prediction + environment-file: environment.yml + python-version: 3.8 # Correct the Python version here + auto-activate-base: false + channels: conda-forge, defaults - run: | conda info conda list From 91c26372901e1219916f4b0b2beac2a653f31e12 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Wed, 5 Jun 2024 16:05:25 -0700 Subject: [PATCH 10/17] testing --- .github/workflows/python-app.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 926676d..a9027ed 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -19,13 +19,13 @@ jobs: shell: bash -el {0} steps: - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: protein-prediction - environment-file: environment.yml - python-version: 3.8 # Correct the Python version here - auto-activate-base: false - channels: conda-forge, defaults + - uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: protein-prediction + environment-file: environment.yml + python-version: 3.8 # Correct the Python version here + auto-activate-base: false + channels: conda-forge, defaults - run: | conda info conda list From d61e0757314bb4a103dd8beff48a9b8a9ce5e8c8 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Fri, 7 Jun 2024 09:27:57 -0700 Subject: [PATCH 11/17] testing --- .github/workflows/python-app.yml | 56 ++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index a9027ed..8c53366 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -11,21 +11,41 @@ on: - master jobs: - example-3: - name: Ex3 Linux - runs-on: "ubuntu-latest" - defaults: - run: - shell: bash -el {0} - steps: - - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: protein-prediction - environment-file: environment.yml - python-version: 3.8 # Correct the Python version here - auto-activate-base: false - channels: conda-forge, defaults - - run: | - conda info - conda list + # example-3: + # name: Ex3 Linux + # runs-on: "ubuntu-latest" + # defaults: + # run: + # shell: bash -el {0} + # steps: + # - uses: actions/checkout@v4 + # - uses: conda-incubator/setup-miniconda@v3 + # with: + # activate-environment: protein-prediction + # environment-file: environment.yml + # python-version: 3.8 # Correct the Python version here + # auto-activate-base: false + # channels: conda-forge, defaults + # - run: | + # conda info + # conda list + conda-only: + name: Test conda environment + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest] + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install conda environment + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: protein-prediction + environment-file: environment.yml + auto-activate-base: false + miniconda-version: "latest" + # Log conda environment contents + - name: Log conda environment + shell: bash --login {0} + run: conda list From 9c8192855b100de631d70ebcbe77a40a553da581 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Fri, 7 Jun 2024 09:28:42 -0700 Subject: [PATCH 12/17] tseting --- .github/workflows/python-app.yml | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 8c53366..9821c7d 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -30,22 +30,22 @@ jobs: # conda info # conda list conda-only: - name: Test conda environment - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest, windows-latest] - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - name: Install conda environment - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: protein-prediction - environment-file: environment.yml - auto-activate-base: false - miniconda-version: "latest" - # Log conda environment contents - - name: Log conda environment - shell: bash --login {0} - run: conda list + name: Test conda environment + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, windows-latest] + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Install conda environment + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: protein-prediction + environment-file: environment.yml + auto-activate-base: false + miniconda-version: "latest" + # Log conda environment contents + - name: Log conda environment + shell: bash --login {0} + run: conda list From c8508ac4f969c2d8f0ea77115c3933ff0b07c771 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Fri, 7 Jun 2024 09:36:11 -0700 Subject: [PATCH 13/17] pytest --- .github/workflows/python-app.yml | 96 +++++++++++++++++--------------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 9821c7d..8f459c7 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,51 +1,57 @@ -name: Python application test with Conda - -on: - push: - branches: - - main - - master - pull_request: - branches: - - main - - master +name: Python package + +on: [push, pull_request] jobs: - # example-3: - # name: Ex3 Linux - # runs-on: "ubuntu-latest" - # defaults: - # run: - # shell: bash -el {0} - # steps: - # - uses: actions/checkout@v4 - # - uses: conda-incubator/setup-miniconda@v3 - # with: - # activate-environment: protein-prediction - # environment-file: environment.yml - # python-version: 3.8 # Correct the Python version here - # auto-activate-base: false - # channels: conda-forge, defaults - # - run: | - # conda info - # conda list - conda-only: - name: Test conda environment - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest, windows-latest] + test: + runs-on: ubuntu-latest + steps: - name: Checkout repository uses: actions/checkout@v2 - - name: Install conda environment - uses: conda-incubator/setup-miniconda@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.12.3" # Specify the version of Python to use + + - name: Cache conda + uses: actions/cache@v2 with: - activate-environment: protein-prediction - environment-file: environment.yml - auto-activate-base: false - miniconda-version: "latest" - # Log conda environment contents - - name: Log conda environment - shell: bash --login {0} - run: conda list + path: ~/conda_pkgs_dir + key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }} + restore-keys: | + ${{ runner.os }}-conda- + + - name: Install Miniconda + shell: bash + run: | + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh + bash miniconda.sh -b -p $HOME/miniconda + source "$HOME/miniconda/etc/profile.d/conda.sh" + conda config --set always_yes yes --set changeps1 no + conda config --add pkgs_dirs ~/conda_pkgs_dir + conda update -q conda + + - name: Create and activate conda environment + shell: bash + run: | + source "$HOME/miniconda/etc/profile.d/conda.sh" + conda env create -f environment.yml + conda activate protein-prediction + env: + CONDA_PKGS_DIRS: ~/conda_pkgs_dir + + - name: Install dependencies + shell: bash + run: | + source "$HOME/miniconda/etc/profile.d/conda.sh" + conda activate protein-prediction + pip install pytest + + - name: Run tests + shell: bash + run: | + source "$HOME/miniconda/etc/profile.d/conda.sh" + conda activate protein-prediction + pytest From f6afe34e1805f46118f5f1613f21c056bcf953db Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Fri, 7 Jun 2024 09:41:57 -0700 Subject: [PATCH 14/17] testing --- .github/workflows/python-app.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 8f459c7..523bb5d 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -33,6 +33,12 @@ jobs: conda config --add pkgs_dirs ~/conda_pkgs_dir conda update -q conda + - name: Add conda channels + shell: bash + run: | + source "$HOME/miniconda/etc/profile.d/conda.sh" + conda config --add channels conda-forge + - name: Create and activate conda environment shell: bash run: | @@ -42,12 +48,12 @@ jobs: env: CONDA_PKGS_DIRS: ~/conda_pkgs_dir - - name: Install dependencies + - name: Check Python version shell: bash run: | source "$HOME/miniconda/etc/profile.d/conda.sh" conda activate protein-prediction - pip install pytest + python --version - name: Run tests shell: bash From dff850649dfec6b376009d85b1b7c9ca05004830 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Fri, 7 Jun 2024 09:44:17 -0700 Subject: [PATCH 15/17] testing --- environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment.yml b/environment.yml index 2e75a23..590db31 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,6 @@ name: protein-prediction channels: - conda-forge - defaults - - https://conda.anaconda.org/gurobi dependencies: - brotli=1.1.0=h0dc2134_1 - brotli-bin=1.1.0=h0dc2134_1 From 0d9f37dd3cfc6d44e2b393d0387b808a49350733 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Fri, 7 Jun 2024 09:46:16 -0700 Subject: [PATCH 16/17] test --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 523bb5d..1cd15a7 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: test: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Checkout repository @@ -26,7 +26,7 @@ jobs: - name: Install Miniconda shell: bash run: | - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh bash miniconda.sh -b -p $HOME/miniconda source "$HOME/miniconda/etc/profile.d/conda.sh" conda config --set always_yes yes --set changeps1 no From 7ca52286c867677b6067bf52552116ccf2470230 Mon Sep 17 00:00:00 2001 From: ctrlaltaf Date: Fri, 7 Jun 2024 09:51:52 -0700 Subject: [PATCH 17/17] final please --- tests/test_pytest.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_pytest.py b/tests/test_pytest.py index 20acc85..38c3dd9 100644 --- a/tests/test_pytest.py +++ b/tests/test_pytest.py @@ -14,6 +14,8 @@ import_graph_from_pickle, ) from tools.workflow import run_workflow +import os + def test_algorithm_attributes(): @@ -47,6 +49,15 @@ def test_algorithm_inherits_class(): def test_algorithm_workflow(): + if not os.path.exists("output"): + os.makedirs("output") + if not os.path.exists("output/dataset"): + os.makedirs("output/dataset") + if not os.path.exists("output/data"): + os.makedirs("output/data") + if not os.path.exists("output/images"): + os.makedirs("output/images") + output_data_path = Path("./output/data/") output_image_path = Path("./output/images/") input_directory_path = Path("./tests/testing-dataset/")