Skip to content

Commit 131fc2a

Browse files
Modernize dependencies and CI infrastructure + minor refactor (#218)
Modernize dependencies and CI infrastructure - Add Python 3.12 support, drop Python 3.6/3.7 - Update dependencies: numpy <3, pyarrow >=16.0.0, fire <0.7.0 - Upgrade GitHub Actions: ubuntu-22.04, actions v2→v4 - Sync pyspark version in Makefile with requirements-test.txt
1 parent 936e9a9 commit 131fc2a

File tree

15 files changed

+55
-41
lines changed

15 files changed

+55
-41
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ on:
1010

1111
jobs:
1212
lint:
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-22.04
1414
steps:
15-
- uses: actions/checkout@v2
16-
- name: Set up Python 3.8
17-
uses: actions/setup-python@v2
15+
- uses: actions/checkout@v4
16+
- name: Set up Python 3.10
17+
uses: actions/setup-python@v4
1818
with:
19-
python-version: 3.8
19+
python-version: '3.10'
2020
- name: Install
2121
run: |
2222
python3 -m venv .env
@@ -28,15 +28,21 @@ jobs:
2828
source .env/bin/activate
2929
make lint
3030
tests:
31-
runs-on: ubuntu-20.04
31+
runs-on: ubuntu-22.04
3232
strategy:
33+
fail-fast: false
3334
matrix:
34-
python-version: [3.8, 3.9, '3.10', 3.11]
35+
python-version: ['3.10', 3.11, 3.12]
3536

3637
steps:
37-
- uses: actions/checkout@v2
38+
- uses: actions/checkout@v4
39+
- name: Set up Java
40+
uses: actions/setup-java@v4
41+
with:
42+
distribution: 'temurin'
43+
java-version: '17'
3844
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v2
45+
uses: actions/setup-python@v4
4046
with:
4147
python-version: ${{ matrix.python-version }}
4248
- name: Install

.github/workflows/doc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ on:
1111
jobs:
1212
build:
1313

14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-22.04
1515
strategy:
1616
matrix:
17-
python-version: [3.9]
17+
python-version: ['3.10']
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v4
2323
with:
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install pandoc

.github/workflows/publish.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@ on:
99
- master
1010
jobs:
1111
build-pex:
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-22.04
1313
strategy:
1414
matrix:
15-
python-version: [3.8]
15+
python-version: ['3.10']
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
18+
- name: Set up Java
19+
uses: actions/setup-java@v4
20+
with:
21+
distribution: 'temurin'
22+
java-version: '17'
1823
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v4
2025
with:
2126
python-version: ${{ matrix.python-version }}
2227
- name: Install dependencies
@@ -27,28 +32,33 @@ jobs:
2732
run: |
2833
make build-pex
2934
mv autofaiss.pex autofaiss-${{ matrix.python-version }}.pex
30-
- uses: actions/upload-artifact@v2
35+
- uses: actions/upload-artifact@v4
3136
with:
3237
name: autofaiss_pex
3338
path: autofaiss-${{ matrix.python-version }}.pex
3439
deploy:
3540
needs: build-pex
36-
runs-on: ubuntu-20.04
41+
runs-on: ubuntu-22.04
3742
steps:
38-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v4
44+
- name: Set up Java
45+
uses: actions/setup-java@v4
46+
with:
47+
distribution: 'temurin'
48+
java-version: '17'
3949
- uses: actions-ecosystem/action-regex-match@v2
4050
id: regex-match
4151
with:
4252
text: ${{ github.event.head_commit.message }}
4353
regex: '^Release ([^ ]+)'
4454
- name: Download pex
45-
uses: actions/download-artifact@v2
55+
uses: actions/download-artifact@v4
4656
with:
4757
name: autofaiss_pex
4858
- name: Set up Python
49-
uses: actions/setup-python@v2
59+
uses: actions/setup-python@v4
5060
with:
51-
python-version: '3.8'
61+
python-version: '3.10'
5262
- name: Install dependencies
5363
run: |
5464
python -m pip install --upgrade pip
@@ -58,7 +68,7 @@ jobs:
5868
uses: softprops/action-gh-release@v1
5969
with:
6070
files: |
61-
autofaiss-3.8.pex
71+
autofaiss-3.10.pex
6272
tag_name: ${{ steps.regex-match.outputs.group1 }}
6373
- name: Build and publish
6474
if: ${{ steps.regex-match.outputs.match != '' && github.event_name != 'pull_request' }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
.coverage*
66
*.npy
77
*.index
8-
8+
*.index*
9+
*.json*
910

1011
# Byte-compiled / optimized / DLL files
1112
__pycache__/

.nojekyll

Whitespace-only changes.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ build-dist: ## [Continuous integration] Build package for pypi
3030
build-pex:
3131
python3 -m venv .pexing
3232
. .pexing/bin/activate && python -m pip install -U pip && python -m pip install pex
33-
. .pexing/bin/activate && python -m pex setuptools pyspark==3.2.1 s3fs>=2022.1.0 . -o autofaiss.pex -v
33+
. .pexing/bin/activate && python -m pex setuptools "pyspark>=4.0.1,<5.0.0" s3fs>=2022.1.0 "numpy>=1.19.5,<2" . -o autofaiss.pex -v
3434
rm -rf .pexing
3535

3636
.PHONY: help

docs/.gitignore

100755100644
File mode changed.

docs/Makefile

100755100644
File mode changed.

docs/conf.py

100755100644
File mode changed.

docs/getting_started/quantization.rst

100755100644
File mode changed.

0 commit comments

Comments
 (0)