Skip to content

Commit

Permalink
config: CI, add python 3.12 (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
westonplatter authored Jun 11, 2024
1 parent 2c2468e commit 3b0cc37
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Clone repo
uses: actions/checkout@v3
Expand All @@ -72,7 +72,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Clone repo
uses: actions/checkout@v3
Expand Down
11 changes: 8 additions & 3 deletions action_files/test_ray.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import sys

import pytest

if sys.version_info >= (3, 12):
pytest.skip("Ray requires Python<3.12", allow_module_level=True)
import ray

from .utils import pipeline, pipeline_with_level, pipeline_fitted
Expand All @@ -9,20 +12,22 @@
def to_distributed(df):
return ray.data.from_pandas(df).repartition(2)


@pytest.fixture()
def sample_data(local_data):
series, X_df = local_data
return to_distributed(series), to_distributed(X_df)

@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires python >= 3.8")

def test_ray_flow(horizon, sample_data, n_series):
pipeline(*sample_data, n_series, horizon)

@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires python >= 3.8")

def test_ray_flow_with_level(horizon, sample_data, n_series):
pipeline_with_level(*sample_data, n_series, horizon)

@pytest.mark.parametrize('use_x', [True, False])

@pytest.mark.parametrize("use_x", [True, False])
def test_ray_flow_with_fitted(horizon, use_x, sample_data):
series, X_df = sample_data
if not use_x:
Expand Down
1 change: 0 additions & 1 deletion dev/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ channels:
- conda-forge
dependencies:
- coreforecast>=0.0.7
- holidays<0.21 # zone info errors
- jupyterlab
- matplotlib
- numba>=0.55.0
Expand Down
1 change: 0 additions & 1 deletion dev/local_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ channels:
- conda-forge
dependencies:
- coreforecast>=0.0.7
- holidays<0.21 # zone info errors
- jupyterlab
- matplotlib
- numba>=0.55.0
Expand Down
2 changes: 1 addition & 1 deletion dev/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
holidays<0.21
holidays<0.26
jupyterlab
matplotlib
numba>=0.55.0
Expand Down
17 changes: 13 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from pkg_resources import parse_version
from configparser import ConfigParser
import setuptools
Expand All @@ -20,9 +21,16 @@
'gpl3': ('GNU General Public License v3', 'OSI Approved :: GNU General Public License v3 (GPLv3)'),
'bsd3': ('BSD License', 'OSI Approved :: BSD License'),
}
statuses = [ '1 - Planning', '2 - Pre-Alpha', '3 - Alpha',
'4 - Beta', '5 - Production/Stable', '6 - Mature', '7 - Inactive' ]
py_versions = '3.6 3.7 3.8 3.9 3.10 3.11'.split()
statuses = [
'1 - Planning',
'2 - Pre-Alpha',
'3 - Alpha',
'4 - Beta',
'5 - Production/Stable',
'6 - Mature',
'7 - Inactive'
]
py_versions = '3.6 3.7 3.8 3.9 3.10 3.11 3.12'.split()

requirements = cfg.get('requirements','').split()
if cfg.get('pip_requirements'): requirements += cfg.get('pip_requirements','').split()
Expand All @@ -35,7 +43,8 @@
polars_requirements = cfg['polars_requirements'].split()
dev_requirements = cfg['dev_requirements'].split()
dev_requirements.extend(dask_requirements)
dev_requirements.extend(ray_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)
Expand Down

0 comments on commit 3b0cc37

Please sign in to comment.