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

[WIP] Support numpy 2.0 #589

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:

# we'll need packaging, numpy, and cython to build this. let install_requires do all the
# rest of the work. We build with our lowest supported numpy version to make sure there is no regression
pip install "packaging>=17.1" "numpy~=1.19.3" "cython>=0.29,!=0.29.18,!=0.29.31"
pip install "packaging>=17.1" "numpy~=2.0.0" "cython~=3.0.0"
python setup.py sdist

cd dist
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
steps:
- checkout
- restore-whl-file:
key: "3.8"
key: "3.9"
- deploy-to-pypi

deploy-cpython39-whl:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ jobs:
# We build the source archive separately because of this: https://github.com/alkaline-ml/pmdarima/pull/136#discussion_r279781731
# We build it first because of this: https://github.com/alkaline-ml/pmdarima/issues/448
- name: Building source distribution
run: make version sdist
run: |
pip install -r build_tools/build_requirements.txt
make version sdist

- name: Install cibuildwheel
run: python -m pip install 'cibuildwheel<2.20.0'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'

- name: Posting to Slack
uses: 8398a7/action-slack@v3
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ twine-check: bdist_wheel deploy-requirements
# Check that twine will parse the README acceptably
$(PYTHON) -m twine check dist/*

version: requirements
version:
@$(PYTHON) build_tools/get_tag.py
25 changes: 5 additions & 20 deletions build_tools/build_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
numpy==1.21.2; python_version < '3.10'
numpy==1.21.6; python_version == '3.10' and platform_system != 'Windows'
numpy==1.22.3; python_version == '3.10' and platform_system == 'Windows'
numpy==1.23.2; python_version == '3.11'
numpy==1.26.0; python_version == '3.12'
scipy==1.3.2; python_version <= '3.8' and platform_machine != 'aarch64'
scipy==1.5.3; python_version <= '3.8' and platform_machine == 'aarch64'
scipy==1.5.4; python_version == '3.9'
scipy==1.7.2; python_version == '3.10'
scipy==1.9.3; python_version == '3.11'
scipy==1.11.2; python_version == '3.12'
statsmodels==0.13.2; python_version <= '3.10'
statsmodels==0.13.3; python_version == '3.11'
statsmodels==0.14.0; python_version == '3.12'
cython>=0.29,!=0.29.18,!=0.29.31
scikit-learn>=0.22
pandas>=0.19
numpy==2.0.0
scipy==1.13.0
cython==3.0.0
patsy
pytest
pytest-mpl
pytest-benchmark
setuptools>=38.6.0,!=50.0.0
packaging>=17.1 # Bundled with setuptools, but want to be explicit
wheel
twine>=1.13.0
readme_renderer
matplotlib
urllib3
setuptools>=38.6.0,!=50.0.0
packaging>=17.1 # Bundled with setuptools, but want to be explicit
2 changes: 2 additions & 0 deletions build_tools/circle/dind/install_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ set -e
# Make sure we're in the root PMDARIMA dir (mounted at /io)
cd /io

pip install -r /io/build_tools/build_requirements.txt

make develop
make testing-requirements
make test-unit
Expand Down
4 changes: 2 additions & 2 deletions pmdarima/arima/tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_nested_context():
# Test a context honors the max duration
def test_max_dur():
# set arbitrarily low to guarantee will always pass after one iter
with StepwiseContext(max_dur=.5), \
with StepwiseContext(max_dur=.1), \
pytest.warns(UserWarning) as uw:

auto_arima(lynx, stepwise=True)
Expand All @@ -79,7 +79,7 @@ def test_max_dur():
# Test that a context after the first will not inherit the first's attrs
def test_subsequent_contexts():
# Force a very fast fit
with StepwiseContext(max_dur=.5), \
with StepwiseContext(max_dur=.1), \
pytest.warns(UserWarning):
auto_arima(lynx, stepwise=True)

Expand Down
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
joblib>=0.11
Cython>=0.29,!=0.29.18,!=0.29.31
numpy>=1.21.2,<2.0.0
pandas>=0.19
scikit-learn>=0.22
scipy>=1.3.2
statsmodels>=0.13.2
urllib3
joblib>=1.2.0
Cython>=3.0.6
numpy>=2.0.0,<3
pandas>=1.4,!=2.1.0
scikit-learn>=1.5.2
scipy>=1.10.0
statsmodels>=0.14.4
urllib3>=2.2.0
setuptools>=38.6.0,!=50.0.0
packaging>=17.1 # Bundled with setuptools, but want to be explicit
Loading