From 7633453f9b9c564278c923600f8c9a7e70a19749 Mon Sep 17 00:00:00 2001 From: Ehud Karavani <15989012+ehudkr@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:32:28 +0300 Subject: [PATCH] Update GitHub actions versions and support Python 3.12 testing (#73) * Update to latest Github Actions' versions Signed-off-by: Ehud-Karavani * Add python 3.12 to testing Signed-off-by: Ehud-Karavani * Faiss version install conditional on Python version There are no faiss 1.7.x versions built for Python 3.12: https://pypi.org/project/faiss-cpu/#files Signed-off-by: Ehud-Karavani --------- Signed-off-by: Ehud-Karavani --- .github/workflows/build.yml | 8 ++++---- causallib/contrib/requirements.txt | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c41b1cd..c89cfb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,13 +8,13 @@ jobs: strategy: fail-fast: false # Don't cancel entire run if one python-version fails matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] name: Build and test on Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} # cache: 'pip' @@ -41,7 +41,7 @@ jobs: # pytest tests.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html - name: Publish to CodeClimate - uses: paambaati/codeclimate-action@v5.0.0 + uses: paambaati/codeclimate-action@v8.0.0 env: CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_REPORTER_ID }} # Forked PRs have no access to secrets, so uploading a coverage report to Code Climate fails. diff --git a/causallib/contrib/requirements.txt b/causallib/contrib/requirements.txt index a9ef6d7..e2bbe79 100644 --- a/causallib/contrib/requirements.txt +++ b/causallib/contrib/requirements.txt @@ -1,3 +1,4 @@ -f https://download.pytorch.org/whl/cpu/ # To support cpu torch installation torch>=1.2.0 -faiss-cpu~=1.7.0 # Can also use gpu for some Python versions \ No newline at end of file +faiss-cpu~=1.7.0;python_version < '3.12' # Can also use gpu for some Python versions +faiss-cpu~=1.8.0;python_version >= '3.12' \ No newline at end of file