diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9a3c6de09..3c442b3be 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,96 +18,6 @@ env: MPLBACKEND: Agg jobs: - run-tests: - name: Run tests for cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} - runs-on: ${{ matrix.os-platform[0] }} - timeout-minutes: 60 - env: - CIBW_BUILD_FRONTEND: build[uv] - strategy: - fail-fast: false - matrix: - python-version: [310, 311, 312, 313, 314] - os-platform: - [ - [ubuntu-latest, manylinux_x86_64], - [ubuntu-latest, manylinux_aarch64], - [windows-latest, win_amd64], - [macos-15, macosx_x86_64], - [macos-14, macosx_arm64], - [macos-15, macosx_arm64], - [macos-latest, macosx_arm64], - ] - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - submodules: "true" - - - name: Set up QEMU - if: matrix.os-platform[1] == 'manylinux_aarch64' - uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 - with: - platforms: arm64 - - - name: Set up uv - uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 - with: - enable-cache: true - cache-dependency-glob: "uv.lock" - - - name: Build wheels and run all tests - if: matrix.os-platform[0] == 'ubuntu-latest' - uses: pypa/cibuildwheel@b3395e271a35f73dad77f21802abe9b986dfe299 # v4.3.1 - env: - CIBW_ENABLE: cpython-prerelease - CIBW_BUILD: cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} - CIBW_TEST_SKIP: "*linux_aarch64" - CIBW_BEFORE_TEST: > - yum install -y java-17-openjdk - CIBW_TEST_COMMAND: > - if python -c "import sys; exit(0 if sys.version_info >= (3, 14) else 1)"; then - uv pip install pytest pytest-cov "pandas<3" "dask<=2024.12.1" "fugue[dask]>=0.9.4" "fugue[spark]>=0.9.4" "pyspark" && - pytest --durations=0 {project}/action_files -k "not efficiency and not ray" --no-cov; - else - uv pip install pytest pytest-cov "pandas<3" "dask<=2024.12.1" "fugue[dask]>=0.9.4" "fugue[spark]>=0.9.4" "fugue[ray]>=0.9.4" "pyspark" && - pytest --durations=0 {project}/action_files -k "not efficiency" --no-cov; - fi - - - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 - if: github.event_name == 'push' - with: - name: artifact-cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }} - path: wheelhouse/*.whl - retention-days: 1 - - publish-nightly-wheels: - if: github.event_name == 'push' - needs: [run-tests] - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_NIXTLA_PACKAGES }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_NIXTLA_PACKAGES }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - - name: Download wheels - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 - with: - path: dist - pattern: "artifact-*" - merge-multiple: true - - - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 - with: - python-version: "3.10" - - - name: Publish wheels - run: | - pip install awscli beautifulsoup4 - aws s3 cp s3://nixtla-packages/statsforecast/index.html . - python action_files/update_index.py - aws s3 sync dist s3://nixtla-packages/statsforecast/ - test-m3-performance: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 1bd3529d6..c5324e2dc 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -47,6 +47,71 @@ jobs: MPLBACKEND: Agg RAY_ENABLE_UV_RUN_RUNTIME_ENV: 0 + wheel-tests: + name: wheel-tests (${{ matrix.os-platform[1] }}) + runs-on: ${{ matrix.os-platform[0] }} + strategy: + fail-fast: false + matrix: + os-platform: + [ + [ubuntu-latest, manylinux_x86_64], + [ubuntu-24.04-arm, manylinux_aarch64], + [windows-latest, win_amd64], + [macos-15-intel, macosx_x86_64], + [macos-latest, macosx_arm64], + ] + steps: + - name: Clone repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + submodules: true + + - name: Install uv + uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 + + - name: Export locked test dependencies + run: uv export --frozen --no-default-groups --group dev --no-emit-project --no-hashes -o test-requirements.txt + + - name: Build wheel and run tests + uses: pypa/cibuildwheel@b3395e271a35f73dad77f21802abe9b986dfe299 # v4.3.1 + env: + CIBW_BUILD: cp310-${{ matrix.os-platform[1] }} + CIBW_BEFORE_TEST: uv pip install -r {package}/test-requirements.txt + CIBW_TEST_ENVIRONMENT: MPLBACKEND=Agg + CIBW_TEST_COMMAND: pytest {project}/tests --ignore={project}/tests/test_distributed_fugue.py --no-cov + + distributed-tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + steps: + - name: Clone repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + submodules: true + + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 + with: + enable-cache: true + cache-dependency-glob: "uv.lock" + + - name: Install dependencies + run: uv sync --group all + + - name: Run pytest + run: uv run pytest action_files --ignore=action_files/test_efficiency.py --no-cov + env: + MPLBACKEND: Agg + RAY_ENABLE_UV_RUN_RUNTIME_ENV: 0 + pandas3-tests: runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 9db1a67b5..7cdac5441 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -18,7 +18,7 @@ jobs: os-platform: [ [ubuntu-latest, manylinux_x86_64], - [ubuntu-latest, manylinux_aarch64], + [ubuntu-24.04-arm, manylinux_aarch64], [windows-latest, win_amd64], [macos-15-intel, macosx_x86_64], [macos-latest, macosx_arm64], @@ -28,12 +28,6 @@ jobs: with: submodules: "true" - - name: Set up QEMU - if: matrix.os-platform[1] == 'manylinux_aarch64' - uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 - with: - platforms: arm64 - - name: Build wheels uses: pypa/cibuildwheel@b3395e271a35f73dad77f21802abe9b986dfe299 # v4.3.1 env: diff --git a/.github/workflows/test-publish.yml b/.github/workflows/test-publish.yml index 3f62bff31..ac2a67e43 100644 --- a/.github/workflows/test-publish.yml +++ b/.github/workflows/test-publish.yml @@ -17,7 +17,7 @@ jobs: os-platform: [ [ubuntu-latest, manylinux_x86_64], - [ubuntu-latest, manylinux_aarch64], + [ubuntu-24.04-arm, manylinux_aarch64], [windows-latest, win_amd64], [macos-13, macosx_x86_64], [macos-14, macosx_arm64], @@ -27,12 +27,6 @@ jobs: with: submodules: "true" - - name: Set up QEMU - if: matrix.os-platform[1] == 'manylinux_aarch64' - uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 - with: - platforms: arm64 - - name: Build wheels uses: pypa/cibuildwheel@b3395e271a35f73dad77f21802abe9b986dfe299 # v4.3.1 env: diff --git a/action_files/update_index.py b/action_files/update_index.py deleted file mode 100644 index 3afb872bc..000000000 --- a/action_files/update_index.py +++ /dev/null @@ -1,14 +0,0 @@ -from pathlib import Path -from bs4 import BeautifulSoup - -index = Path("index.html").read_text() -soup = BeautifulSoup(index, "html.parser") -wheels = [f.name for f in Path("dist").glob("*.whl")] -existing_wheels = [a["href"] for a in soup.find_all("a")] -to_add = set(wheels) - set(existing_wheels) -for wheel in to_add: - new_link = soup.new_tag("a", href=wheel) - new_link.string = wheel - soup.body.append(new_link) - soup.body.append(soup.new_tag("br")) -Path("dist/index.html").write_text(soup.prettify()) diff --git a/nbs/docs/getting-started/installation.ipynb b/nbs/docs/getting-started/installation.ipynb index d0f994580..bf99aa06d 100644 --- a/nbs/docs/getting-started/installation.ipynb +++ b/nbs/docs/getting-started/installation.ipynb @@ -61,10 +61,7 @@ "source": [ "#### Development version\n", "\n", - "If you want to try out a new feature that hasn’t made it into a release yet you have the following options:\n", - "\n", - "* Install from our nightly wheels: `pip install --extra-index-url=http://nixtla-packages.s3-website.us-east-2.amazonaws.com --trusted-host nixtla-packages.s3-website.us-east-2.amazonaws.com statsforecast`\n", - "* Install from github: `pip install git+https://github.com/Nixtla/statsforecast`. This requires that you have a C++ compiler installed, so we encourage you to try the previous option first." + "If you want to try out a new feature that hasn’t made it into a release yet you can install from github: `pip install git+https://github.com/Nixtla/statsforecast`. This requires that you have a C++ compiler installed." ] } ], diff --git a/tests/test_arima.py b/tests/test_arima.py index d3b592db1..fc2355b89 100644 --- a/tests/test_arima.py +++ b/tests/test_arima.py @@ -912,7 +912,11 @@ def test_issue_649(capsys): y = np.array(42 * [100] + [119, 525]) AutoARIMA(season_length=12, trace=True).fit(y) captured = capsys.readouterr() - expected_output = """ARIMA(2,0,2)(1,0,1)[12] with non-zero mean : inf + lines = captured.out.splitlines(keepends=True) + # this candidate's roots sit on the 1.01 rejection threshold, so whether it's + # inf depends on floating-point contraction in the build (e.g. gcc on aarch64) + lines[0] = lines[0].rpartition(" : ")[0] + " : \n" + expected_output = """ARIMA(2,0,2)(1,0,1)[12] with non-zero mean : ARIMA(0,0,0) with non-zero mean : 494.2237 ARIMA(1,0,0)(1,0,0)[12] with non-zero mean : 496.9135 ARIMA(0,0,1)(0,0,1)[12] with non-zero mean : 496.7905 @@ -924,7 +928,7 @@ def test_issue_649(capsys): ARIMA(0,0,1) with non-zero mean : 494.3700 ARIMA(1,0,1) with non-zero mean : 495.5334 """ - assert captured.out == expected_output + assert "".join(lines) == expected_output def test_issue_1167():