Skip to content

Commit

Permalink
test support python 3.11 (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
msfidelis authored Sep 15, 2023
1 parent fea1581 commit 98cfb76
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 18 deletions.
49 changes: 33 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,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 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.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 @@ -78,14 +95,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

0 comments on commit 98cfb76

Please sign in to comment.