Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ci #874

Merged
merged 1 commit into from
Jul 16, 2024
Merged
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
12 changes: 2 additions & 10 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ on:
branches: ["main"]
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
build-docs:
runs-on: ubuntu-latest
Expand All @@ -24,15 +20,11 @@ jobs:
path: docs-scripts
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
cache: "pip"
python-version: '3.10'
cache-dependency-path: settings.ini
python-version: "3.10"
- name: Build docs
run: |
set -ux
python -m pip install --upgrade pip
pip install -Uq nbdev
pip install -e ".[dev]"
pip install uv && uv pip install --system ".[all]"
mkdir nbs/_extensions
cp -r docs-scripts/mintlify/ nbs/_extensions/
python docs-scripts/update-quarto.py
Expand Down
66 changes: 15 additions & 51 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,64 +6,34 @@ on:
pull_request:
branches: [main]

defaults:
run:
shell: bash -l {0}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
NIXTLA_NUMBA_CACHE: '1'
NIXTLA_NUMBA_CACHE: "1"

jobs:
nb-sync:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.10'

- name: Install nbdev
run: pip install nbdev

- name: Check if all notebooks are cleaned
run: |
echo "Check we are starting with clean git checkout"
if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi
echo "Trying to strip out notebooks"
./action_files/clean_nbs
echo "Check that strip out was unnecessary"
git status -s # display the status to see which nbs need cleaning up
if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks and running ./action_files/clean_nbs before committing"; false; fi

run-local-tests:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Clone repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up environment
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.0
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
environment-file: dev/local_environment.yml
create-args: python=${{ matrix.python-version }}
cache-environment: true
python-version: ${{ matrix.python-version }}

- name: Install pip requirements
run: pip install ./
run: pip install uv && uv pip install --system ".[dev,plotly]"

- name: Run local tests
run: nbdev_test --skip_file_re '(models|distributed|ets).*.ipynb' --pause 1.0 --do_print --timing
run: nbdev_test --skip_file_re '(models|distributed|ets|prophet).*.ipynb' --pause 1.0 --do_print --timing

run-tests:
runs-on: ${{ matrix.os }}
Expand All @@ -72,46 +42,40 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Clone repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up environment
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.0
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
environment-file: dev/environment.yml
create-args: python=${{ matrix.python-version }}
cache-environment: true
python-version: ${{ matrix.python-version }}

- name: Install pip requirements
run: pip install ./
run: pip install uv && uv pip install --system ".[all]"

- name: Run tests
run: nbdev_test --skip_file_re '(distributed).*.ipynb' --pause 1.0 --do_print --timing
run: nbdev_test --skip_file_re '(distributed|prophet).*.ipynb' --pause 1.0 --do_print --timing

- name: Run integration tests
run: |
pip install ".[dev]" pytest
uv pip install --system pytest
pytest --durations=0 action_files

test-m3-performance:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Clone repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up environment
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822 # v1.9.0
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
environment-file: dev/environment.yml
create-args: python=3.10
cache-environment: true
python-version: "3.10"

- name: Install library and extra deps
run: pip install ".[dev]" fire
run: pip install uv && uv pip install --system ".[dev]"

- name: Run M3 experiment
run: |
Expand Down
4 changes: 0 additions & 4 deletions dev/.help.mk

This file was deleted.

9 changes: 0 additions & 9 deletions dev/Dockerfile

This file was deleted.

29 changes: 0 additions & 29 deletions dev/environment.yml

This file was deleted.

27 changes: 0 additions & 27 deletions dev/local_environment.yml

This file was deleted.

23 changes: 0 additions & 23 deletions dev/requirements.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
"data": {
"text/html": [
"<div><style>\n",
".dataframe > thead > tr > th,\n",
".dataframe > tbody > tr > td {\n",
".dataframe > thead > tr,\n",
".dataframe > tbody > tr {\n",
" text-align: right;\n",
" white-space: pre-wrap;\n",
"}\n",
Expand Down
8 changes: 4 additions & 4 deletions settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ host = github
lib_name = statsforecast
user = Nixtla
description = Time series forecasting suite using statistical models
keywords = time-series forecasting arima ets
keywords = time-series forecasting arima ets
author = Nixtla
author_email = [email protected]
copyright = Nixtla Inc.
Expand All @@ -16,12 +16,12 @@ custom_sidebar = True
license = apache2
status = 2
requirements = cloudpickle coreforecast>=0.0.9 numba>=0.55.0 numpy>=1.21.6 pandas>=1.3.5 scipy>=1.7.3 statsmodels>=0.13.2 tqdm fugue>=0.8.1 utilsforecast>=0.1.4 threadpoolctl
polars_requirements = polars
ray_requirements = fugue[ray]>=0.8.1 protobuf>=3.15.3,<4.0.0 ray<2.8
polars_requirements = polars[numpy]
ray_requirements = fugue[ray]>=0.8.1 protobuf>=3.15.3,<4.0.0 numpy<2 pandas<2.2 ray<2.8
dask_requirements = fugue[dask]>=0.8.1
spark_requirements = fugue[spark]>=0.8.1
plotly_requirements = plotly plotly-resampler
dev_requirements = nbdev black mypy pandas[plot] pmdarima prophet pyarrow ruff scikit-learn setuptools<70 datasetsforecast supersmoother nbdev_plotly pre-commit
dev_requirements = black datasetsforecast fire nbdev nbformat nbdev_plotly pandas[plot] pmdarima polars[numpy] pre-commit prophet pyarrow scikit-learn setuptools<70 supersmoother
nbs_path = nbs
doc_path = _docs
recursive = True
Expand Down
17 changes: 9 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@
plotly_requirements = cfg['plotly_requirements'].split()
polars_requirements = cfg['polars_requirements'].split()
dev_requirements = cfg['dev_requirements'].split()
dev_requirements.extend(dask_requirements)
all_requirements = [
*dask_requirements,
*spark_requirements,
*plotly_requirements,
*polars_requirements,
*dev_requirements,
]
if sys.version_info < (3, 12):
dev_requirements.extend(ray_requirements)
dev_requirements.extend(spark_requirements)
dev_requirements.extend(plotly_requirements)
dev_requirements.extend(polars_requirements)
dev_requirements = list(set(dev_requirements))
all_requirements.extend(ray_requirements)

setuptools.setup(
name = 'statsforecast',
Expand All @@ -69,6 +71,7 @@
'spark': spark_requirements,
'plotly': plotly_requirements,
'polars': polars_requirements,
'all': all_requirements,
},
dependency_links = cfg.get('dep_links','').split(),
python_requires = '>=' + cfg['min_python'],
Expand All @@ -80,5 +83,3 @@
'nbdev': [f'{cfg.get("lib_path")}={cfg.get("lib_path")}._modidx:d']
},
**setup_cfg)


Loading