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

test support python 3.11 #425

Merged
merged 14 commits into from
Sep 15, 2023
49 changes: 33 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,54 @@ jobs:
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"; false; fi

run-local-tests:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
steps:
- name: Clone repo
uses: actions/checkout@v3

- name: Set up environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: dev/local_environment.yml
create-args: python=${{ matrix.python-version }}
cache-environment: true

- name: Install pip requirements
run: pip install ./

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

run-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, '3.10']
os: [ubuntu-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
steps:
- name: Clone repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: dev/environment.yml
extra-specs: python=${{ matrix.python-version }}
cache-env: true
create-args: python=${{ matrix.python-version }}
cache-environment: true

- name: Install pip requirements
run: pip install ./

- name: Run tests on windows
if: ${{ matrix.os == 'windows-latest' }} #until nbdev fix
run: nbdev_test --skip_file_re '(models|distributed|ets).*.ipynb' --pause 1.0

- name: Run tests
if: ${{ matrix.os != 'windows-latest' }}
run: nbdev_test --skip_file_re '(distributed).*.ipynb' --pause 1.0

- name: Run integration tests
if: ${{ matrix.os != 'windows-latest' }}
run: |
pip install ".[dev]" pytest
pytest action_files
Expand All @@ -74,14 +91,14 @@ jobs:
fail-fast: false
steps:
- name: Clone repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up environment
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: dev/environment.yml
extra-specs: python=3.10
cache-env: true
create-args: python=3.10
cache-environment: true

- name: Install library and extra deps
run: pip install ".[dev]" fire
Expand Down
2 changes: 1 addition & 1 deletion dev/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ dependencies:
- pyspark>=3.3
- pip
- prophet
- pyarrow
- scipy>=1.7.3
- statsmodels>=0.13.2
- tabulate
- plotly
- pip:
- ray<2.5.0
- fugue[dask,ray]
- nbdev
- plotly-resampler
Expand Down
23 changes: 23 additions & 0 deletions dev/local_environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: statsforecast
channels:
- conda-forge
dependencies:
- holidays<0.21 # zone info errors
- jupyterlab
- matplotlib
- numba>=0.55.0
- numpy>=1.21.6
- pandas>=1.3.5
- pip
- prophet
- pyarrow
- scipy>=1.7.3
- statsmodels>=0.13.2
- tabulate
- plotly
- pip:
- nbdev
- plotly-resampler
- polars
- supersmoother
- tqdm
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
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'.split()
py_versions = '3.6 3.7 3.8 3.9 3.10 3.11'.split()

requirements = cfg.get('requirements','').split()
if cfg.get('pip_requirements'): requirements += cfg.get('pip_requirements','').split()
Expand Down
Loading