From 20503e6f535093920402efa30c1690ce19eb27b5 Mon Sep 17 00:00:00 2001 From: Dv1t Date: Mon, 11 Aug 2025 20:24:46 +0300 Subject: [PATCH 1/7] Update CI/CD --- .github/workflows/python-package.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0874573..603c904 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -23,11 +23,14 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + auto-activate-base: false + channels: conda-forge,bioconda,defaults - name: Install dependencies run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest pytest-cov - pip install -e .[dev] + conda create -n probest + conda activate probest + conda install --file requirements.txt + python setup.py install - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names From 0773d31526f9356e2ee1c758ac17ca1cd3e27729 Mon Sep 17 00:00:00 2001 From: Dv1t Date: Mon, 11 Aug 2025 20:40:30 +0300 Subject: [PATCH 2/7] Replace requirements.txt with environment.yml --- .github/workflows/python-package.yml | 8 ++++---- README.md | 3 +-- environment.yml | 25 +++++++++++++++++++++++++ requirements.txt | 19 ------------------- 4 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 environment.yml delete mode 100644 requirements.txt diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 603c904..798a173 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -23,13 +23,13 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} - auto-activate-base: false + activate-environment: probest + environment-file: environment.yml + auto-activate-base: false channels: conda-forge,bioconda,defaults - name: Install dependencies + shell: bash -l {0} run: | - conda create -n probest - conda activate probest - conda install --file requirements.txt python setup.py install - name: Lint with flake8 run: | diff --git a/README.md b/README.md index 55eab62..ccbc714 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,8 @@ At the core of PROBEst is an AI-enhanced workflow that combines Primer3 for init ```bash git clone https://github.com/CTLab-ITMO/PROBEst.git cd PROBEst -conda create -n probest +conda env create -f environment.yml conda activate probest -conda install --file requirements.txt python setup.py install ``` diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..6e54736 --- /dev/null +++ b/environment.yml @@ -0,0 +1,25 @@ +name: probest +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - biopython>=1.81 + - pandas>=1.5.0 + - numpy>=1.21.0 + - requests>=2.28.0 + - beautifulsoup4>=4.11.0 + - pytest>=7.0.0 + - pytest-cov>=4.0.0 + - ViennaRNA>=2.6.4 + - tqdm>=4.67.1 + - scikit-learn>=1.0.2 + - matplotlib>=3.5.0 + - seaborn>=0.12.0 + - pytorch>=2.0.0 + - blast>=2.16.0 + - primer3>=2.6.1 + #optional: PDF parsing + #- PyMuPDF>=1.23.0 + #- pdfplumber>=0.9.0 + #- PyPDF2>=3.0.0 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 97c55e0..0000000 --- a/requirements.txt +++ /dev/null @@ -1,19 +0,0 @@ -biopython>=1.81 -pandas>=1.5.0 -numpy>=1.21.0 -requests>=2.28.0 -beautifulsoup4>=4.11.0 -pytest>=7.0.0 -pytest-cov>=4.0.0 -ViennaRNA>=2.6.4 -tqdm>=4.67.1 -scikit-learn>=1.0.2 -matplotlib>=3.5.0 -seaborn>=0.12.0 -pytorch>=2.0.0 -blast>=2.16.0 -primer3>=2.6.1 -# optional: PDF parsing -## PyMuPDF>=1.23.0 -## pdfplumber>=0.9.0 -## PyPDF2>=3.0.0 \ No newline at end of file From 09416f9e4a1921cd849a13c19c72028debeea649 Mon Sep 17 00:00:00 2001 From: Dv1t Date: Mon, 11 Aug 2025 20:47:11 +0300 Subject: [PATCH 3/7] Change GitHub action in python-package.yml --- .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 798a173..25a2d2c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -20,12 +20,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: conda-incubator/setup-miniconda@v3 with: python-version: ${{ matrix.python-version }} - activate-environment: probest environment-file: environment.yml auto-activate-base: false + activate-environment: probest channels: conda-forge,bioconda,defaults - name: Install dependencies shell: bash -l {0} From 342c1155c48677f0814854fac1416b8343fc6fa1 Mon Sep 17 00:00:00 2001 From: Dv1t Date: Mon, 11 Aug 2025 20:52:16 +0300 Subject: [PATCH 4/7] Remove requirements installation from setup.py --- setup.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/setup.py b/setup.py index ac2a794..4dbbb9f 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,12 @@ from setuptools import setup, find_packages import os -def read_requirements(): - """Read requirements from requirements.txt.""" - with open('requirements.txt') as f: - return [line.strip() for line in f if line.strip() and not line.startswith('#')] - setup( name='PROBESt', version='0.1.4', packages=find_packages(where='src'), package_dir={'': 'src'}, python_requires='>=3.8', - install_requires=read_requirements(), author='Your Name', author_email='your.email@example.com', description='PROBESt: package for nucleotide probes generation', From 4708dd78d220d9dcf6df3f6e12cb64077cade28d Mon Sep 17 00:00:00 2001 From: Dv1t Date: Mon, 11 Aug 2025 21:14:17 +0300 Subject: [PATCH 5/7] add flake8 to environment --- environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.yml b/environment.yml index 6e54736..995ee62 100644 --- a/environment.yml +++ b/environment.yml @@ -19,6 +19,7 @@ dependencies: - pytorch>=2.0.0 - blast>=2.16.0 - primer3>=2.6.1 + - flake8>=7.3.0 #optional: PDF parsing #- PyMuPDF>=1.23.0 #- pdfplumber>=0.9.0 From 88032a4cb7dc3c49dab4ad8956ce3cbac9b43475 Mon Sep 17 00:00:00 2001 From: Dv1t Date: Mon, 11 Aug 2025 21:24:51 +0300 Subject: [PATCH 6/7] fix python-package.yml --- .github/workflows/python-package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 25a2d2c..d588fd9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -32,11 +32,13 @@ jobs: run: | python setup.py install - name: Lint with flake8 + shell: bash -l {0} 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 + shell: bash -l {0} run: | pytest \ No newline at end of file From e1ee970a91a034aaf1ca7c013b4cd8e6b4e234e8 Mon Sep 17 00:00:00 2001 From: Dv1t Date: Mon, 11 Aug 2025 21:45:22 +0300 Subject: [PATCH 7/7] install ViennaRna with pip --- environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 995ee62..cdfe384 100644 --- a/environment.yml +++ b/environment.yml @@ -11,7 +11,6 @@ dependencies: - beautifulsoup4>=4.11.0 - pytest>=7.0.0 - pytest-cov>=4.0.0 - - ViennaRNA>=2.6.4 - tqdm>=4.67.1 - scikit-learn>=1.0.2 - matplotlib>=3.5.0 @@ -20,6 +19,8 @@ dependencies: - blast>=2.16.0 - primer3>=2.6.1 - flake8>=7.3.0 + - pip: + - ViennaRNA==2.6.4 #optional: PDF parsing #- PyMuPDF>=1.23.0 #- pdfplumber>=0.9.0