Skip to content

Commit

Permalink
build: drop python3.8 and torch 1.12, update deps.
Browse files Browse the repository at this point in the history
- add movie writer to dev deps
- downgrade scipy to enable py3.9 support
  • Loading branch information
janfb committed Aug 26, 2024
1 parent 1a936c4 commit a1376d9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'

- name: Cache dependency
id: cache-dependencies
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8']
torch-version: ['1.11', '2.2']
python-version: ['3.9', '3.12']

steps:
- name: Checkout
Expand All @@ -40,15 +39,15 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.torch-version }}$
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
pip install -e .[dev]
- name: Run the fast CPU tests with coverage
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --show-diff-on-failure
Expand All @@ -40,14 +40,14 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'

- name: Cache dependency
id: cache-dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ubuntu-latest-pip-3.8
key: ubuntu-latest-pip-3.9
restore-keys: |
ubuntu-latest-pip-
Expand Down
15 changes: 8 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 3 - Alpha",
]
requires-python = ">=3.8"
requires-python = ">=3.9"
dynamic = ["version"]
readme = "README.md"
keywords = ["Bayesian inference", "simulation-based inference", "PyTorch"]
Expand All @@ -33,14 +33,14 @@ dependencies = [
"joblib>=1.0.0",
"jupyter",
"matplotlib",
"numpy",
"numpy<2.0.0",
"pillow",
"pyknos>=0.16.0",
"pyro-ppl>=1.3.1",
"scikit-learn",
"scipy",
"scipy<1.13",
"tensorboard",
"torch>=1.8.0",
"torch>=1.13.0",
"tqdm",
"pymc>=5.0.0",
"zuko>=1.2.0",
Expand All @@ -61,6 +61,7 @@ doc = [
"mike"
]
dev = [
"ffmpeg",
# Lint
"pre-commit == 3.5.0",
"pyyaml",
Expand Down Expand Up @@ -134,9 +135,9 @@ xfail_strict = true

# Pyright configuration
[tool.pyright]
include = ["sbi", "tests"]
exclude = ["**/__pycache__", "**/__node_modules__", ".git", "docs", "examples", "tutorials", "tests"]
python_version = "3.8"
include = ["sbi"]
exclude = ["**/__pycache__", "**/__node_modules__", ".git", "docs", "tutorials", "tests"]
python_version = "3.9"
reportUnsupportedDunderAll = false
reportGeneralTypeIssues = false
reportInvalidTypeForm = false
Expand Down

0 comments on commit a1376d9

Please sign in to comment.