From ffb1a0e7e1ddd9f89d20c2a0c5ba26113be82b15 Mon Sep 17 00:00:00 2001 From: skanda Date: Sun, 9 Nov 2025 03:28:27 +0000 Subject: [PATCH 01/10] ruff linter --- tests/common.py | 2 -- tests/pkaani_test.py | 23 +++++++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/tests/common.py b/tests/common.py index edc3d86c..aab95294 100644 --- a/tests/common.py +++ b/tests/common.py @@ -323,7 +323,6 @@ def run_pkaani_for_tests(input_pdb, compare_file, pH): for key, val in results.items(): f.write(f"{key},{val}\n") - compare = {} with open(compare_file) as f: for line in f.readlines()[1:]: @@ -349,4 +348,3 @@ def run_pkaani_for_tests(input_pdb, compare_file, pH): raise RuntimeError( f"pKa-ANI test error. pKa values changed more than 1e-3 for group {key}: new {results[key]} reference {compare[key]}" ) - diff --git a/tests/pkaani_test.py b/tests/pkaani_test.py index 88d08268..12b5d558 100644 --- a/tests/pkaani_test.py +++ b/tests/pkaani_test.py @@ -7,10 +7,16 @@ PKAANI_TEST_DIR = Path("pkaani_tests") + @pytest.mark.parametrize( - "input_pdb", - [str(PKAANI_TEST_DIR / "1brs_clean.pdb"), str(PKAANI_TEST_DIR / "1zy8_clean.pdb"), str(PKAANI_TEST_DIR / "6oge_de.pdb"), "1FCC.pdb" - ], ids=str + "input_pdb", + [ + str(PKAANI_TEST_DIR / "1brs_clean.pdb"), + str(PKAANI_TEST_DIR / "1zy8_clean.pdb"), + str(PKAANI_TEST_DIR / "6oge_de.pdb"), + "1FCC.pdb", + ], + ids=str, ) def test_pkaani_apo(input_pdb, tmp_path): """PKAANI non-regression tests on biomolecules without ligands.""" @@ -28,9 +34,14 @@ def test_pkaani_apo(input_pdb, tmp_path): @pytest.mark.parametrize( - "input_pdb", - [str(PKAANI_TEST_DIR / "1brs_clean.pdb"), str(PKAANI_TEST_DIR / "1zy8_clean.pdb"), str(PKAANI_TEST_DIR / "6oge_de.pdb"), "1FCC.pdb" - ], ids=str + "input_pdb", + [ + str(PKAANI_TEST_DIR / "1brs_clean.pdb"), + str(PKAANI_TEST_DIR / "1zy8_clean.pdb"), + str(PKAANI_TEST_DIR / "6oge_de.pdb"), + "1FCC.pdb", + ], + ids=str, ) def test_pkaani_pka(input_pdb): """PKAANI non-regression tests for pKa values on biomolecules without ligands.""" From 0bdbd937faf542d89320cd409a388218e9cc9ed7 Mon Sep 17 00:00:00 2001 From: skanda Date: Wed, 12 Nov 2025 13:50:56 -0800 Subject: [PATCH 02/10] edited github actions build pipeline to install pkaani version of pdb2pqr for tests --- .github/workflows/python-package.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index dd210b0e..5f251a83 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -25,8 +25,9 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install -e '.[test]' + python -m pip install --upgrade pip uv + export UV_TORCH_BACKEND=cpu + uv pip install -e '.[test,pkaani]' - name: Lint with ruff run: | # stop the build if there are Python syntax errors or undefined names From dca35b8b3adc615bd487ff85143ebab0863e22fc Mon Sep 17 00:00:00 2001 From: skanda Date: Wed, 12 Nov 2025 18:39:09 -0800 Subject: [PATCH 03/10] allowing uv to install to system to avoid virtual env not found error --- .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 5f251a83..0ec8c941 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -27,7 +27,7 @@ jobs: run: | python -m pip install --upgrade pip uv export UV_TORCH_BACKEND=cpu - uv pip install -e '.[test,pkaani]' + uv pip install --system -e '.[test,pkaani]' - name: Lint with ruff run: | # stop the build if there are Python syntax errors or undefined names From dce8cb7089c4f14e2512986e681b24213fed8f5c Mon Sep 17 00:00:00 2001 From: skanda Date: Wed, 12 Nov 2025 18:44:42 -0800 Subject: [PATCH 04/10] fixing uv venv not found error --- .github/workflows/python-package.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0ec8c941..d62720fa 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -18,16 +18,20 @@ jobs: python-version: ['3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install uv and activate environment + uses: astral-sh/setup-uv@v7 + with: + # Use uv venv to activate a venv ready to be used by later steps + activate-environment: "true" - name: Install dependencies - run: | - python -m pip install --upgrade pip uv - export UV_TORCH_BACKEND=cpu - uv pip install --system -e '.[test,pkaani]' + run: uv pip install -e '.[test,pkaani]' + env: + UV_TORCH_BACKEND: cpu - name: Lint with ruff run: | # stop the build if there are Python syntax errors or undefined names @@ -42,12 +46,12 @@ jobs: - name: Upload coverage results run: bash <(curl -s https://codecov.io/bash) - name: Store coverage text results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: coverage-text-my-${{ matrix.python-version }} path: coverage.txt - name: Store coverage HTML results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: coverage-html-${{ matrix.python-version }} path: htmlcov/* From eb41c857fd1efa3589ff705220ce0f0ae4003791 Mon Sep 17 00:00:00 2001 From: skanda Date: Thu, 20 Nov 2025 05:47:38 +0000 Subject: [PATCH 05/10] fixing test directory --- tests/pkaani_test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/pkaani_test.py b/tests/pkaani_test.py index 12b5d558..38f07c0c 100644 --- a/tests/pkaani_test.py +++ b/tests/pkaani_test.py @@ -5,8 +5,7 @@ import common import pytest -PKAANI_TEST_DIR = Path("pkaani_tests") - +PKAANI_TEST_DIR = Path("tests/pkaani_tests") @pytest.mark.parametrize( "input_pdb", From 2ec3822225b213c10bc0aa109090619bd7277e00 Mon Sep 17 00:00:00 2001 From: skanda Date: Thu, 20 Nov 2025 06:01:34 +0000 Subject: [PATCH 06/10] lint issue --- tests/pkaani_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/pkaani_test.py b/tests/pkaani_test.py index 38f07c0c..597832a5 100644 --- a/tests/pkaani_test.py +++ b/tests/pkaani_test.py @@ -7,6 +7,7 @@ PKAANI_TEST_DIR = Path("tests/pkaani_tests") + @pytest.mark.parametrize( "input_pdb", [ From f1aafa33e77ae19c11dd8ebb0be2fcb340d01d81 Mon Sep 17 00:00:00 2001 From: skanda Date: Thu, 20 Nov 2025 06:21:56 +0000 Subject: [PATCH 07/10] using --no-cache option in build pipeline --- .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 d62720fa..186dadff 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -29,7 +29,7 @@ jobs: # Use uv venv to activate a venv ready to be used by later steps activate-environment: "true" - name: Install dependencies - run: uv pip install -e '.[test,pkaani]' + run: uv pip install --no-cache -e '.[test,pkaani]' env: UV_TORCH_BACKEND: cpu - name: Lint with ruff From 6311952320260cf2084ab2f9fa06fa0bff67591e Mon Sep 17 00:00:00 2001 From: skanda Date: Thu, 20 Nov 2025 07:23:05 +0000 Subject: [PATCH 08/10] forcing uv to reinstall packages hopefully --- .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 186dadff..ec63285c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -29,7 +29,7 @@ jobs: # Use uv venv to activate a venv ready to be used by later steps activate-environment: "true" - name: Install dependencies - run: uv pip install --no-cache -e '.[test,pkaani]' + run: uv pip install --upgrade --refresh --no-cache -e '.[test,pkaani]' env: UV_TORCH_BACKEND: cpu - name: Lint with ruff From 6285c2a66cedab31f91efd0f1930ed3512c3ef0c Mon Sep 17 00:00:00 2001 From: skanda Date: Fri, 21 Nov 2025 00:12:47 +0000 Subject: [PATCH 09/10] removed pKa-ANI numpy pin, creating a commit to retest build pipeline From e1e13c58513e058ce761a9393a0cb6af34e94499 Mon Sep 17 00:00:00 2001 From: skanda Date: Fri, 21 Nov 2025 01:31:02 +0000 Subject: [PATCH 10/10] took out the spurious --upgrade --refresh --no-cache from uv pip pipeline --- .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 ec63285c..d62720fa 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -29,7 +29,7 @@ jobs: # Use uv venv to activate a venv ready to be used by later steps activate-environment: "true" - name: Install dependencies - run: uv pip install --upgrade --refresh --no-cache -e '.[test,pkaani]' + run: uv pip install -e '.[test,pkaani]' env: UV_TORCH_BACKEND: cpu - name: Lint with ruff