Update pandas, numpy and scipy to handle the new Kaggle environment (… #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release package to PyPI | |
on: | |
push: | |
branches: | |
- "releases/**" | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
checks: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.9", "3.10", "3.11"] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
#---------------------------------------------- | |
# ----- install & configure poetry ----- | |
#---------------------------------------------- | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.5.1 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
#---------------------------------------------- | |
# load cached venv if cache exists | |
#---------------------------------------------- | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-root | |
- name: Install library | |
run: poetry install --no-interaction | |
- name: Lint with (ruff) | |
run: | | |
poetry run ruff check ./target_permutation_importances ./benchmarks ./tests | |
- name: Type Check (mypy) | |
run: | | |
poetry run mypy target_permutation_importances | |
- name: Test (pytest) | |
run: | | |
poetry run pytest --ignore=./tests/test_compute_cuml.py --cov=target_permutation_importances --no-cov-on-fail --cov-fail-under=100 --cov-report=term-missing:skip-covered -n auto ./tests | |
build: | |
needs: checks | |
runs-on: ubuntu-latest | |
environment: release | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and publish to pypi | |
uses: JRubics/poetry-publish@v1.17 | |
with: | |
pypi_token: ${{ secrets.PYPI_TOKEN }} | |
allow_poetry_pre_release: "yes" | |
ignore_dev_requirements: "yes" | |