Skip to content

Commit

Permalink
Update GitHub actions versions and support Python 3.12 testing (#73)
Browse files Browse the repository at this point in the history
* Update to latest Github Actions' versions

Signed-off-by: Ehud-Karavani <ehud.karavani@ibm.com>

* Add python 3.12 to testing

Signed-off-by: Ehud-Karavani <ehud.karavani@ibm.com>

* 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 <ehud.karavani@ibm.com>

---------

Signed-off-by: Ehud-Karavani <ehud.karavani@ibm.com>
  • Loading branch information
ehudkr authored Jul 31, 2024
1 parent 52ba5ea commit 7633453
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion causallib/contrib/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
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'

0 comments on commit 7633453

Please sign in to comment.