From a87837f84619c695bf4cfd57e61ca3fea68a22ed Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 9 Apr 2025 19:00:51 +0200 Subject: [PATCH 1/9] install this package for testing --- .../{conda-tests.yml => ci-tests.yml} | 20 ++------ environment.yml | 46 ------------------- setup.cfg | 2 - 3 files changed, 5 insertions(+), 63 deletions(-) rename .github/workflows/{conda-tests.yml => ci-tests.yml} (59%) delete mode 100644 environment.yml delete mode 100644 setup.cfg diff --git a/.github/workflows/conda-tests.yml b/.github/workflows/ci-tests.yml similarity index 59% rename from .github/workflows/conda-tests.yml rename to .github/workflows/ci-tests.yml index 1a57ed24..9a47d65c 100644 --- a/.github/workflows/conda-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -25,28 +25,18 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python version - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: '3.10' + cache: 'pip' - name: Install git-lfs run: | sudo apt-get install git-lfs git lfs install - - name: Setup Miniconda - uses: conda-incubator/setup-miniconda@v2 - with: - miniconda-version: "latest" - channels: bioconda, conda-forge, defaults, dgl - use-only-tar-bz2: true - auto-update-conda: true - auto-activate-base: true + - name: Setup environment & install dependencies + run: pip install . -U - name: Create and start Conda environment. Run tests - run: | - echo "Creating Conda Environment from environment.yml" - conda env create -q -f environment.yml - conda activate tdc-conda-env - python run_tests.py - conda deactivate + run: python run_tests.py diff --git a/environment.yml b/environment.yml deleted file mode 100644 index 5f7135e1..00000000 --- a/environment.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: tdc-conda-env -channels: - - bioconda - - conda-forge - - defaults -dependencies: - - anndata=0.6.22 - - biopython=1.78 - - dataclasses=0.8 - - fuzzywuzzy=0.18.0 - - huggingface_hub=0.20.3 - - mygene=3.2.2 - - numpy=1.26.4 - - openpyxl=3.0.10 - - python=3.10 - - pip=23.3.1 - - pandas=2.1.4 - - requests=2.31.0 - - scikit-learn=1.2.2 - - seaborn=0.12.2 - - tqdm=4.65.0 - - pip: - - accelerate==0.33.0 - - cellxgene-census==1.15.0 - - datasets<2.20.0 - - dgl==1.1.3 - - evaluate==0.4.2 - - gget==0.28.4 - - moleculeace==3.0.0 - - pydantic==2.6.3 - - gget==0.28.4 - - pydantic==2.6.3 - - gget==0.28.4 - - pydantic==2.6.3 - - pytest==8.3.2 - - rdkit==2023.9.5 - - scvi-tools==1.2.0 - - tiledbsoma==1.11.4 - - torch==2.1.1 - - torch_geometric==2.5.3 - - torchvision==0.16.1 - - transformers==4.43.4 - - yapf==0.40.2 - -variables: - KMP_DUPLICATE_LIB_OK: "TRUE" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b88034e4..00000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -description-file = README.md From 6285ebce8ea0ca167b67717f1364afeb173a7610 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 9 Apr 2025 19:17:44 +0200 Subject: [PATCH 2/9] requires_test.txt --- .github/workflows/ci-tests.yml | 2 +- requires_test.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 requires_test.txt diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 9a47d65c..0ab22880 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -36,7 +36,7 @@ jobs: git lfs install - name: Setup environment & install dependencies - run: pip install . -U + run: pip install . -U -r requires_test.txt - name: Create and start Conda environment. Run tests run: python run_tests.py diff --git a/requires_test.txt b/requires_test.txt new file mode 100644 index 00000000..35663079 --- /dev/null +++ b/requires_test.txt @@ -0,0 +1 @@ +pytest==8.3.2 \ No newline at end of file From 22bbd216f6e8bcb653ebe468724ab69ba8285045 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 9 Apr 2025 21:31:38 +0200 Subject: [PATCH 3/9] pkgs --- .github/workflows/ci-tests.yml | 10 ++++------ .github/workflows/codeql-analysis.yml | 4 ++-- requires_test.txt | 6 +++++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 0ab22880..a6738e8a 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -2,7 +2,7 @@ # More GitHub Actions for Azure: https://github.com/Azure/actions # More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions -name: Build Conda Environment And Run Python Tests +name: Run Python Tests on: push: @@ -10,17 +10,15 @@ on: - main - '*' pull_request: - branches: [ "main" ] + branches: ["main"] workflow_dispatch: jobs: - build: + pytester: runs-on: ubuntu-latest - defaults: run: - shell: bash -l {0} - + shell: bash steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a45d3b76..7f2ab558 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,10 +13,10 @@ name: "CodeQL" on: push: - branches: [ "main" ] + branches: ["main"] pull_request: # The branches below must be a subset of the branches above - branches: [ "main" ] + branches: ["main"] schedule: - cron: '35 9 * * 0' diff --git a/requires_test.txt b/requires_test.txt index 35663079..438a1629 100644 --- a/requires_test.txt +++ b/requires_test.txt @@ -1 +1,5 @@ -pytest==8.3.2 \ No newline at end of file +pytest==8.3.2 + +mygene==3.2.2 +scvi-tools==1.2.0 +dgl==1.1.3 From 2b9ed98eb26c02a349a2787cbbfaedd3123e486d Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 9 Apr 2025 21:37:59 +0200 Subject: [PATCH 4/9] python-version --- .github/workflows/ci-tests.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index a6738e8a..7e27ec26 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -15,7 +15,12 @@ on: jobs: pytester: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["ubuntu-22.04"] # todo: add `, "macOS-14", "windows-2022"` + python-version: ["3.9", "3.10", "3.11"] defaults: run: shell: bash @@ -25,7 +30,7 @@ jobs: - name: Set up Python version uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: ${{ matrix.python-version }} cache: 'pip' - name: Install git-lfs From 4b4fa39bc24007f6c73f4940893f5c0a3f640d95 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 9 Apr 2025 21:45:18 +0200 Subject: [PATCH 5/9] scvi-tools>=1.1.0, <1.3.0 --- requires_test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requires_test.txt b/requires_test.txt index 438a1629..0ebf3e49 100644 --- a/requires_test.txt +++ b/requires_test.txt @@ -1,5 +1,5 @@ pytest==8.3.2 mygene==3.2.2 -scvi-tools==1.2.0 +scvi-tools>=1.1.0, <1.3.0 dgl==1.1.3 From 4d6b9db4f1277200e826d30ca8e10df54381e012 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 9 Apr 2025 23:51:11 +0200 Subject: [PATCH 6/9] torch_geometric --- requires_test.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requires_test.txt b/requires_test.txt index 0ebf3e49..1c1646f2 100644 --- a/requires_test.txt +++ b/requires_test.txt @@ -3,3 +3,4 @@ pytest==8.3.2 mygene==3.2.2 scvi-tools>=1.1.0, <1.3.0 dgl==1.1.3 +torch_geometric==2.5.3 From dd78873ed38b85137ab894383f4bc84e96dc7fb1 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Wed, 9 Apr 2025 23:57:17 +0200 Subject: [PATCH 7/9] steps --- .github/workflows/ci-tests.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 7e27ec26..8cfc5a9b 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -6,9 +6,6 @@ name: Run Python Tests on: push: - branches: - - main - - '*' pull_request: branches: ["main"] workflow_dispatch: @@ -38,8 +35,8 @@ jobs: sudo apt-get install git-lfs git lfs install - - name: Setup environment & install dependencies + - name: Install package & dependencies run: pip install . -U -r requires_test.txt - - name: Create and start Conda environment. Run tests + - name: Run tests run: python run_tests.py From 6d894653292ccba13a43325f56040290a302c399 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Thu, 10 Apr 2025 20:23:10 +0200 Subject: [PATCH 8/9] scikit-learn>=1.2.2, <1.3.0 --- requirements.txt | 2 +- tdc/chem_utils/oracle/oracle.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index b0001814..4bc711ec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ numpy>=1.26.4,<2.0.0 openpyxl>=3.0.10,<4.0.0 pandas>=2.1.4,<3.0.0 requests>=2.31.0,<3.0.0 -scikit-learn>=1.2.2 +scikit-learn>=1.2.2, <1.3.0 seaborn>=0.12.2,<1.0.0 tqdm>=4.65.0,<5.0.0 transformers>=4.43.0,<4.51.0 diff --git a/tdc/chem_utils/oracle/oracle.py b/tdc/chem_utils/oracle/oracle.py index faa6d705..24ab8e4d 100644 --- a/tdc/chem_utils/oracle/oracle.py +++ b/tdc/chem_utils/oracle/oracle.py @@ -658,9 +658,8 @@ def SA(s): def load_gsk3b_model(): - gsk3_model_path = "oracle/gsk3b.pkl" - if SKLEARN_VERSION >= version.parse("0.24.0"): - gsk3_model_path = "oracle/gsk3b_current.pkl" + # gsk3_model_path = "oracle/gsk3b.pkl" # this was for `sklearn<=0.24` + gsk3_model_path = "oracle/gsk3b_current.pkl" return load_pickled_model(gsk3_model_path) From 73651afc0c9eac75be06e2686fd087ebd4a4bc03 Mon Sep 17 00:00:00 2001 From: Jirka B Date: Thu, 10 Apr 2025 20:52:40 +0200 Subject: [PATCH 9/9] torch==2.1.1 --- requires_test.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requires_test.txt b/requires_test.txt index 1c1646f2..fc92c1d1 100644 --- a/requires_test.txt +++ b/requires_test.txt @@ -4,3 +4,4 @@ mygene==3.2.2 scvi-tools>=1.1.0, <1.3.0 dgl==1.1.3 torch_geometric==2.5.3 +torch==2.1.1