Skip to content

Commit e3e1842

Browse files
ddelangeJovanVeljanoskimaartenbreddelsEwoutH
authored
Support CPython 3.11, 3.12, and aarch64 processors (#2331)
* fix[ml]: adjust tests to reflect latest apis of 3rd party libraries (xgboost, lightgbm) * Build wheels on pull_request * Maximize wheel build parallellization * git submodule update --remote --merge packages/vaex-core/vendor/pybind11 * Fix gcc error * Fix workflow syntax * Remove redefinition https://github.com/pybind/pybind11/blob/769fd3b889fef6cddb060f2a0be26aee62b4da05/include/pybind11/pytypes.h#L859 https://github.com/ddelange/vaex/actions/runs/3965609112/jobs/6795506653#step:6:2110 * Disable win32 https://github.com/ddelange/vaex/actions/runs/3965689146/jobs/6795667118#step:6:538 * Remove testing leftovers * Add upper cap on lightgbm microsoft/LightGBM#5196 (comment) * Migrate to mamba-org/setup-micromamba@v1 * Upload release assets on Github (pre)release * Add missing permission for release assets * Build cp312 wheels * Remove setuptools and wheel from pyproject.toml * Replace imp with importlib * chore: trigger ci * ci: upgrade xcode for brew install libomp * update requirements-ml to comply with the latest veex-ml expectations. * try to install lightgbm via pip * fix: only the mini taxi file is on s3 for cost savings * ci: pin dask<2024.2.0 to get the same hash keys This version gives different results, although not a problem in production (it will make your cache invalid though), for CI we test that we have stable keys (fingerprints) * fix: only the mini taxi file is on s3 for cost savings (2) * ci: skip notebooks that depend on the dataframe server * ci: skip ci steps in various old python versions * Bump micromamba and other actions * ci: specific test hangs on ci+osx * Bump cibuildwheel, use native arm64 mac runners * test: log is renamed to log loss * test: skip lightgbm tests on 36 and 37 * test: skip sklearn tests on 36 and 37 * Update packages/vaex-core/setup.py Co-authored-by: ddelange <14880945+ddelange@users.noreply.github.com> * chore: drop python 3.6 and 3.7 support Co-authored-by: Ewout ter Hoeven <E.M.terHoeven@student.tudelft.nl> * test: skip a failing test for windows * ci: macOS 11 is retired as of June 28 * ci: always build wheels, but do not publish instead * ci: try with older micromamba, 1.5.6 seems to sometimes hang * Install setuptools in wheel.yml * Add sudo * Fix windows * Use sudo only on macos * Fix empty string evaluating false * Add .readthedocs.yaml * Pull submodules * Try editable rtd install * Try move editable install to requirements_rtd.txt * Allow newer sphinx * Autocancel previous runs in PRs * Autocancel all jobs * Sphinx sidebar fix https://github.com/dmwyatt/sphinx-book-theme/blob/2416ef6cebc3d83019dbc83f25c61b72719cad55/docs/customize/sidebar-primary.md#default-sidebar-elements * Remove autocancel, doesn't work from forks * Add cancel-in-progress keys * Amend to only cancel on PRs * Add CIBW_TEST_COMMAND * Disallow numpy v2 * Skip musllinux due to misding blake3 wheels * Install carco for blake3 source install * Fix CIBW_ENVIRONMENT * Add CIBW_TEST_SKIP * Build wheels with numpy v1 * run tests on 3.10-3.12 * upgrade micromamba * unpin pytest-asyncio * try different pin as <2.0 because mamba crashes on that * Fix dephell and CI hell (ddelange#3) * allow for multiple fingerprints related to package versions * explicit dtype=object * fix pandas issues * revert graphene upgrade * force uv to ignore Werkzeug (we do not use it, its a subdependency which has conflicts) * fix: work with modern scipy/sparse arrays * skip test for python 3.8 * skip test on windows * add missing import * skip some tests conditionally * tuple comparison fix * does osx run without sourcing .bash profile? * skip a few more tests * only run test on linux * Try building arm64 wheels on macos-13 * Switch to older Xcode * Fix readthedocs by manually unpinning werkzeug in the graphene-tornado v2.6.1 release # for now we leave graphene-tornado / graphene on v2 # ref #2356 (comment) # in top level vaex[ci] we added the following (additional) direct reference requirement which adds one commit (ddelange/graphene-tornado@d75f01f) on top of the 2.6.1 release to unpin werkzeug # "graphene-tornado @ https://github.com/ddelange/graphene-tornado/archive/refs/heads/2.6.1.unpin-werkzeug.zip", * Simplify * Revert "Simplify" This reverts commit 91263bc. * Add back tags event trigger for core wheel upload * Switch to trusted publishing * Add trusted publishing for vaex-core * Exclude windows 3.8 from pythonpackage.yml * Don't upload vaex-core source distribution * Disable cp38-win vaex-core wheel build * Add permission --------- Co-authored-by: Jovan Veljanoski <jovan.veljanoski@tiqets.com> Co-authored-by: Maarten A. Breddels <maartenbreddels@gmail.com> Co-authored-by: Ewout ter Hoeven <E.M.terHoeven@student.tudelft.nl>
1 parent 15245cf commit e3e1842

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+604
-1563
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 55 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -5,130 +5,74 @@ on:
55
branches:
66
- master
77
pull_request:
8-
branches:
9-
- master
10-
- docs
118
schedule:
129
- cron: "0 2 * * 1-5"
1310

14-
# to make bash use ~/.bashrc, see https://github.com/marketplace/actions/setup-miniconda#example-5-custom-installer
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
1515
defaults:
1616
run:
17-
shell: bash -l {0}
18-
19-
concurrency:
20-
group: ${{ github.ref }}
21-
cancel-in-progress: true
17+
shell: bash
2218

2319
jobs:
2420
main:
25-
env:
26-
CACHE_NUMBER_COMPILE: 6
27-
MAMBA_ROOT_PREFIX: /dev/shm/mambaroot
2821
runs-on: ${{ matrix.os }}
2922
strategy:
3023
fail-fast: false
31-
max-parallel: 12
3224
matrix:
33-
os: [ubuntu-latest, windows-latest, macOS-11]
34-
python-version: [3.6, 3.7, 3.8, 3.9]
25+
os: [ubuntu-latest, windows-latest, macos-13]
26+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
27+
exclude:
28+
- {os: windows-latest, python-version: "3.8"}
3529

3630
steps:
37-
- name: disk space
38-
if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }}
39-
run: |
40-
df -h
41-
- uses: maxim-lobanov/setup-xcode@v1
42-
# alternative would be to upgrade tapi to 1100.0.11, we can possibly remove this in the future
43-
if: matrix.os == 'macOS-11'
44-
with:
45-
xcode-version: "11.7.0"
4631
- uses: actions/checkout@v2
4732
with:
4833
submodules: true
49-
- uses: actions/checkout@v2
50-
if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }}
51-
with:
52-
repository: vaexio/vaex-enterprise
53-
token: ${{ secrets.PAT_PULL_ENTERPRISE }}
54-
path: vaex-enterprise
55-
- name: install micromamba
56-
uses: mamba-org/provision-with-micromamba@main
34+
35+
- uses: actions/setup-python@v5
5736
with:
58-
environment-name: vaex-dev
59-
environment-file: ci/conda-env.yml
60-
extra-specs: |
61-
python=${{ matrix.python-version }}
62-
- name: Extra non-windows installs
37+
python-version: ${{ matrix.python-version }}
38+
39+
- run: python -m pip install --upgrade pip setuptools wheel uv
40+
41+
# - uses: actions/checkout@v2
42+
# if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }}
43+
# with:
44+
# repository: vaexio/vaex-enterprise
45+
# token: ${{ secrets.PAT_PULL_ENTERPRISE }}
46+
# path: vaex-enterprise
47+
48+
- name: Setup Graphviz
49+
uses: ts-graphviz/setup-graphviz@v2
50+
51+
- name: Setup PCRE (Nix-only)
6352
if: matrix.os != 'windows-latest'
64-
run: |
65-
echo "not needed for now"
66-
# - name: Extra windows installs
67-
# if: matrix.os == 'windows-latest'
68-
# run: |
69-
# # not sure why, but the conda env is strange (old dask) if we put this constraint in the conda solver
70-
# # also might solve scipy issues
71-
# micromamba update scipy ipython dask
72-
# micromamba install scipy=1.7.1
73-
# - name: free disk space
74-
# if: matrix.os == 'ubuntu-latest'
75-
# run: |
76-
# sudo swapoff -a
77-
# sudo rm -f /swapfile
78-
# sudo apt clean
79-
# docker rmi $(docker image ls -aq)
80-
# df -h
53+
run: sudo -E bash bin/install_pcre.sh
54+
8155
- name: Install OpenMP runtime (Mac-only)
82-
if: matrix.os == 'macOS-11'
83-
run: |
84-
brew install libomp
85-
- name: Cache compiled binaries
86-
# this fails for this combination, leading to binaries filled with 0's
87-
if: matrix.python-version != '3.6' || matrix.os != 'macOS-11'
88-
id: cache-compiled-binaries
89-
uses: actions/cache@v2
90-
with:
91-
path: |
92-
packages/vaex-core/build/lib*/vaex/vaexfast*
93-
packages/vaex-core/build/lib*/vaex/super*
94-
key: ${{ runner.OS }}-${{ matrix.python-version }}-${{ hashFiles('packages/vaex-core/src/*') }}-${{ env.CACHE_NUMBER_COMPILE }}
95-
- name: Fix cache timestamp
96-
run: |
97-
touch packages/vaex-core/build/lib*/vaex/vaexfast* || echo "ok to fail"
98-
touch packages/vaex-core/build/lib*/vaex/super* || echo "ok to fail"
99-
ls -alh packages/vaex-core/build/lib*/vaex/ || echo "ok to fail"
56+
if: startswith(matrix.os, 'macos')
57+
run: brew install libomp
58+
59+
- name: Copy dll (Windows-only)
60+
if: (matrix.os == 'windows-latest')
61+
uses: ./ci/actions/windll
62+
10063
- name: Install vaex
101-
run: |
102-
pip install myst_parser
103-
pip install -e . -v
104-
# ./ci/03-install-vaex.sh micromamba
64+
run: uv pip install -v --system .[ci]
65+
66+
- run: uv pip freeze
67+
10568
# - name: Install vaex-enterprise
10669
# if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }}
10770
# run: |
10871
# cd vaex-enterprise
10972
# micromamba install -c conda-forge distributed
11073
# pip install ray
11174
# pip install -e .
112-
- name: Copy dll
113-
if: (matrix.os == 'windows-latest')
114-
uses: ./ci/actions/windll
115-
- name: Build Python packages
116-
run: |
117-
mkdir dist
118-
(cd packages/vaex-core && python setup.py bdist_wheel); cp packages/vaex-core/dist/* dist
119-
(cd packages/vaex-graphql && python setup.py bdist_wheel); cp packages/vaex-graphql/dist/* dist
120-
(cd packages/vaex-jupyter && python setup.py bdist_wheel); cp packages/vaex-jupyter/dist/* dist
121-
(cd packages/vaex-ml && python setup.py bdist_wheel); cp packages/vaex-ml/dist/* dist
122-
(cd packages/vaex-viz && python setup.py bdist_wheel); cp packages/vaex-viz/dist/* dist
123-
(cd packages/vaex-astro && python setup.py bdist_wheel); cp packages/vaex-astro/dist/* dist
124-
(cd packages/vaex-hdf5 && python setup.py bdist_wheel); cp packages/vaex-hdf5/dist/* dist
125-
(cd packages/vaex-server && python setup.py bdist_wheel); cp packages/vaex-server/dist/* dist
126-
(cd packages/vaex-meta && python setup.py bdist_wheel); cp packages/vaex-server/dist/* dist
127-
- name: Upload builds
128-
uses: actions/upload-artifact@v2
129-
with:
130-
name: dist-${{ github.run_number }}-${{ matrix.python-version }}-${{ matrix.os }}
131-
path: ./dist
75+
13276
# - name: Lint with flake8
13377
# run: |
13478
# echo "soon"
@@ -137,123 +81,56 @@ jobs:
13781
# # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
13882
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
13983
# # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
140-
- name: Install fixes for Python 3.6
141-
if: matrix.python-version == '3.6'
142-
run: |
143-
# by default on 3.6 we get an old version, so manually upgrade
144-
pip install gcsfs==0.8.0
145-
- name: Install pytest-asyncio correct version
146-
if: matrix.python-version != '3.10'
147-
run: |
148-
# 3.10 doesn't seem to work
149-
pip install "pytest-asyncio<0.14"
84+
15085
- name: Test with pytest
15186
run: |
15287
./ci/04-run-test-suite.sh
88+
15389
- name: Test with pytest (with cache on)
154-
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
90+
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
15591
run: |
15692
VAEX_CACHE_RESULTS=1 ./ci/04-run-test-suite.sh
93+
15794
- name: Check ml spec
158-
# no catboost for py39 and py37
159-
if: matrix.python-version != '3.9' && matrix.os != 'windows-latest' && matrix.python-version != '3.7'
16095
run: |
16196
python -m vaex.ml.spec packages/vaex-ml/vaex/ml/spec_new.json
16297
diff packages/vaex-ml/vaex/ml/spec_new.json packages/vaex-ml/vaex/ml/spec.json
98+
16399
# - name: Test with pytest (vaex-enterprise)
164100
# if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }}
165101
# run: |
166102
# py.test vaex-enterprise/tests --timeout=1000
103+
167104
- name: Test notebooks
168-
if: matrix.os != 'windows-latest' && matrix.python-version != '3.6'
169-
run: |
170-
./ci/05-run-notebooks.sh
105+
if: matrix.os != 'windows-latest'
106+
run: ./ci/05-run-notebooks.sh
107+
171108
- name: Authenticate Google Cloud Platform
172-
if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && !((matrix.os == 'windows-latest') || (matrix.os == 'macOS-11' && matrix.python-version == '3.6')) }}
109+
if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && !((matrix.os == 'windows-latest')) }}
173110
uses: google-github-actions/setup-gcloud@v0
174111
with:
175112
project_id: ${{ secrets.GCP_PROJECT_ID_VAEX }}
176113
service_account_key: ${{ secrets.GCP_SA_KEY_VAEX }}
177114
export_default_credentials: true
115+
178116
- name: Test vaex-contrib
179-
# do not run in a PR from someone else, skip windows, and osx+py36
180-
if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && !((matrix.os == 'windows-latest') || (matrix.os == 'macOS-11' && matrix.python-version == '3.6')) }}
117+
# do not run in a PR from someone else, skip windows
118+
if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os != 'windows-latest') }}
181119
env:
182120
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID_VAEX }}
183-
run: |
184-
pip install -e 'packages/vaex-contrib[gcp]'
185-
./ci/06-run-contrib-tests.sh
186-
187-
install:
188-
runs-on: ${{ matrix.os }}
189-
needs: [main]
190-
191-
strategy:
192-
fail-fast: false
193-
matrix:
194-
os: [ubuntu-latest, windows-latest, macOS-11]
195-
python-version: [3.7, 3.8, 3.9]
196-
# ssl/certifi issues with this combination
197-
exclude:
198-
- os: windows-latest
199-
python-version: 3.7
200-
201-
steps:
202-
- uses: actions/checkout@v2
203-
- uses: actions/download-artifact@v2
204-
with:
205-
name: dist-${{ github.run_number }}-${{ matrix.python-version }}-${{ matrix.os }}
206-
path: ./dist
207-
208-
- name: Install micromamba
209-
uses: mamba-org/provision-with-micromamba@main
210-
with:
211-
environment-name: vaex-test
212-
environment-file: ci/conda-base-minimal.yml
213-
extra-specs: |
214-
python=${{ matrix.python-version }}
215-
pcre
216-
rich
217-
# it shouldn't be needed to use pcre, maybe we should make the wheels similar to how we make distributions
218-
- name: Cache pip
219-
uses: actions/cache@v2
220-
env:
221-
# Increase this value to reset cache
222-
CACHE_NUMBER: 0
223-
with:
224-
path: |
225-
~/.cache/pip
226-
key:
227-
pip-${{ runner.os }}-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}
228-
229-
- name: Install core packages
230-
run: |
231-
pip install -vv dist/vaex*core* dist/vaex*hdf5*
232-
233-
- name: Test core import
234-
run: |
235-
python -c "import vaex; df = vaex.example()"
236-
237-
- name: Install all packages
238-
run: |
239-
pip install -vv dist/*
240-
241-
- name: Test import
242-
run: |
243-
python -c "import vaex; df = vaex.example()"
121+
run: ./ci/06-run-contrib-tests.sh
244122

245123
- name: Test comand line
246124
run: |
247125
vaex convert ~/.vaex/data/helmi-dezeeuw-2000-FeH-v2-10percent.hdf5 test.parquet
248-
pip install rich
249126
VAEX_PROGRESS_TYPE=rich vaex convert ~/.vaex/data/helmi-dezeeuw-2000-FeH-v2-10percent.hdf5 test.parquet
250127
vaex settings yaml
251128
vaex settings md
252129
253130
- name: Test server
254131
if: matrix.os != 'windows-latest'
255132
run: |
256-
vaex server --add-example --port 9999&
133+
vaex server --add-example --port 9999 &
257134
258135
- name: Wait for Vaex server
259136
if: matrix.os != 'windows-latest'

0 commit comments

Comments
 (0)