Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,33 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- name: Set up Python 3
uses: actions/setup-python@v3
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"

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

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install ".[test,lgb]"
uv sync --python ${{ matrix.python-version }} --extra lgb --locked

- name: Benchmark
run: |
pytest -k "test_benchmark" -vv \
uv run pytest -k "test_benchmark" -vv \
--benchmark-name=short \
--benchmark-group-by=param \
--benchmark-min-rounds=3 \
--benchmark-columns=min,max,mean,median,stddev,rounds,iterations \
--benchmark-json=docs/benchmarks/${{ matrix.os }}.json
- uses: actions/checkout@v3

- name: Commit results
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs: Update ${{ matrix.os }} benchmark"
file_pattern: docs/benchmarks/${{ matrix.os }}.json
28 changes: 15 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
strategy:
matrix:
target: [x86_64, x86, aarch64]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -42,9 +42,9 @@ jobs:
strategy:
matrix:
target: [x64, x86]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -66,9 +66,9 @@ jobs:
strategy:
matrix:
target: [x86_64, aarch64]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -87,7 +87,7 @@ jobs:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
Expand All @@ -103,17 +103,19 @@ jobs:
name: Release
runs-on: ubuntu-latest
needs: [linux, windows, macos, sdist]
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/functime
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist

- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing *.whl
uses: pypa/gh-action-pypi-publish@release/v1

draft-notes:
runs-on: ubuntu-latest
Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/quickstart.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Quickstart

on:
Expand All @@ -19,34 +16,35 @@ jobs:
quickstart:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v3
- uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"

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

- name: Set up Rust
run: rustup show

- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Create virtual environment
run: python3 -m venv venv

- name: Install functime
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run: |
source venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install maturin
maturin develop
- name: Install extra dependencies
run: |
source venv/bin/activate
python3 -m pip install --upgrade pip
uv sync --python ${{ matrix.python-version }} --locked
uv run --with "maturin>=1.5" -- maturin develop

- name: Run Quickstart
run: |
source venv/bin/activate
python docs/code/quickstart.py
python docs/code/feature_engineering.py
uv run python docs/code/quickstart.py
uv run python docs/code/feature_engineering.py
31 changes: 13 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ jobs:
test:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v3
- uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"

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

Expand All @@ -29,26 +35,15 @@ jobs:
- name: Cache Rust
uses: Swatinem/rust-cache@v2

- name: Create virtual environment
run: python3 -m venv venv

- name: Install functime
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
run: |
source venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install maturin
maturin develop --extras=test,cat,xgb,lgb

- name: Install extra dependencies
run: |
source venv/bin/activate
python3 -m pip install --upgrade pip
uv sync --python ${{ matrix.python-version }} --extra cat --extra xgb --extra lgb --locked
uv run --with "maturin>=1.5" -- maturin develop --extras=cat,xgb,lgb

- name: Test
env:
FUNCTIME__TEST_MODE: "true"
run: |
source venv/bin/activate
pytest tests -vv --show-capture=no --tb=line --benchmark-disable -k "not test_benchmarks"
uv run pytest tests -vv --show-capture=no --tb=line --benchmark-disable -k "not test_benchmarks"
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: check-added-large-files
args: ['--maxkb=25000']
Expand All @@ -9,11 +9,11 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
rev: 0.8.1
hooks:
- id: nbstripout
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
rev: v0.13.3
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand All @@ -22,11 +22,11 @@ repos:
- id: ruff-format
types_or: [python, pyi, jupyter]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
rev: v0.24.1
hooks:
- id: validate-pyproject
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.24.0
rev: v4.9.1
hooks:
- id: commitizen-branch
stages: [push]
stages: [pre-push]
Loading
Loading