Skip to content

Commit

Permalink
Python 3.11 CI support (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsarti committed Oct 30, 2022
1 parent 5246c38 commit 7791d0e
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 128 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4.3.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -28,14 +28,14 @@ jobs:
export PATH="$HOME/.poetry/env:$PATH"
- name: Set up cache
uses: actions/cache@v3.0.1
uses: actions/cache@v3.0.11
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
make install-ci
- name: Run style checks
run: |
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Expand Up @@ -44,15 +44,16 @@ poetry-remove:
.PHONY: add-torch-gpu
add-torch-gpu:
poetry run poe upgrade-pip
poetry run pip uninstall torch -y
poetry run poe torch-cuda11

.PHONY: install
install:
poetry install --no-dev
poetry install

.PHONY: install-dev
install-dev:
poetry install --extras all
poetry install --all-extras --with lint,docs --sync
# -poetry run mypy --install-types --non-interactive ./
poetry run pre-commit install
poetry run pre-commit autoupdate
Expand All @@ -63,6 +64,10 @@ install-gpu: install add-torch-gpu
.PHONY: install-dev-gpu
install-dev-gpu: install-dev add-torch-gpu

.PHONY: install-ci
install-ci:
poetry install --with lint

.PHONY: update-deps
update-deps:
poetry lock && poetry export --without-hashes > requirements.txt
Expand Down

0 comments on commit 7791d0e

Please sign in to comment.