Skip to content

add docs

add docs #102

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
workflow_dispatch:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_wheels:
name: Build wheels for ${{ matrix.platform-id }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
platform-id: manylinux_x86_64
- os: windows-2019
platform-id: win_amd64
- os: macos-11
platform-id: macosx_x86_64
- os: macos-latest
platform-id: macosx_arm64
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp38-${{ matrix.platform-id }}
CIBW_ARCHS: all
CIBW_TEST_SKIP: '*-macosx_arm64'
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_BUILD_MACOS: |
sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer
pip install toml
python scripts/disable_omp_arm64.py
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
retention-days: 1
run_tests:
needs: [build_wheels]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- name: Clone repo
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: pip install -r requirements-test.txt
- name: Download wheels
uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Install the library
run: pip install --no-index --find-links dist coreforecast
- name: Run tests
run: pytest --benchmark-group-by=param:scaler_name --benchmark-sort=fullname
build_sdist:
name: Build sdist
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build sdist
run: |
python -m pip install build scikit-build-core
python -m build --sdist --outdir dist
- uses: actions/upload-artifact@v3
with:
path: ./dist/*.tar.gz
upload_to_pypi:
name: 'Upload to PyPI'
if: github.repository == 'Nixtla/coreforecast' && startsWith(github.ref, 'refs/tags/v')
needs: [build_wheels, build_sdist, run_tests]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1