From 1e175c9f2ed53036eab6dd0d8843202c6f63946c Mon Sep 17 00:00:00 2001 From: Jovan Veljanoski Date: Wed, 7 Feb 2024 16:38:03 +0100 Subject: [PATCH 01/91] fix[ml]: adjust tests to reflect latest apis of 3rd party libraries (xgboost, lightgbm) --- ci/conda-env.yml | 2 +- packages/vaex-ml/vaex/ml/lightgbm.py | 13 +++++++++---- tests/ml/xgboost_test.py | 5 +---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ci/conda-env.yml b/ci/conda-env.yml index 635349147b..34138c94d7 100644 --- a/ci/conda-env.yml +++ b/ci/conda-env.yml @@ -20,7 +20,7 @@ dependencies: - h5py - httpx # for testing with starlette/fastapi - ipyvolume=0.6.0a6 -- lightgbm +- lightgbm>=4.0.0 - matplotlib-base - nest-asyncio<1.5.2 - notebook diff --git a/packages/vaex-ml/vaex/ml/lightgbm.py b/packages/vaex-ml/vaex/ml/lightgbm.py index 5fb83ea458..4dbec9d42f 100644 --- a/packages/vaex-ml/vaex/ml/lightgbm.py +++ b/packages/vaex-ml/vaex/ml/lightgbm.py @@ -86,7 +86,7 @@ def transform(self, df): copy.add_virtual_column(self.prediction_name, expression, unique=False) return copy - def fit(self, df, valid_sets=None, valid_names=None, early_stopping_rounds=None, evals_result=None, verbose_eval=None, **kwargs): + def fit(self, df, valid_sets=None, valid_names=None, early_stopping_rounds=None, evals_result=None, verbose_eval=False, **kwargs): """Fit the LightGBMModel to the DataFrame. The model will train until the validation score stops improving. @@ -112,14 +112,19 @@ def fit(self, df, valid_sets=None, valid_names=None, early_stopping_rounds=None, else: valid_sets = () + callbacks = [ + lightgbm.callback.record_evaluation(eval_result=evals_result) if evals_result is not None else None, + lightgbm.callback.early_stopping(stopping_rounds=early_stopping_rounds) if early_stopping_rounds else None, + lightgbm.callback.log_evaluation() if verbose_eval else None + ] + callbacks = [callback for callback in callbacks if callback is not None] + self.booster = lightgbm.train(params=self.params, train_set=dtrain, num_boost_round=self.num_boost_round, valid_sets=valid_sets, valid_names=valid_names, - early_stopping_rounds=early_stopping_rounds, - evals_result=evals_result, - verbose_eval=verbose_eval, + callbacks=callbacks, **kwargs) def predict(self, df, **kwargs): diff --git a/tests/ml/xgboost_test.py b/tests/ml/xgboost_test.py index 9a1a5dd371..c9c264db98 100644 --- a/tests/ml/xgboost_test.py +++ b/tests/ml/xgboost_test.py @@ -17,7 +17,6 @@ 'objective': 'multi:softmax', # learning task objective 'num_class': 3, # number of target classes (if classification) 'random_state': 42, # fixes the seed, for reproducibility - 'silent': 1, # silent mode 'n_jobs': -1 # cpu cores used } @@ -32,14 +31,13 @@ 'min_child_weight': 1, # minimum sum of instance weight (hessian) needed in a child 'objective': 'reg:linear', # learning task objective 'random_state': 42, # fixes the seed, for reproducibility - 'silent': 1, # silent mode 'n_jobs': -1 # cpu cores used } def test_xgboost(df_iris): ds = df_iris - ds_train, ds_test = ds.ml.train_test_split(test_size=0.2, verbose=False) + ds_train, ds_test = ds.ml.train_test_split(test_size=0.1, verbose=False) features = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width'] booster = vaex.ml.xgboost.XGBoostModel(num_boost_round=10, params=params_multiclass, @@ -104,7 +102,6 @@ def test_xgboost_validation_set(df_example): # fit the booster - including saving the history of the validation sets booster.fit(train, evals=[(train, 'train'), (test, 'test')], early_stopping_rounds=2, evals_result=history) - assert booster.booster.best_ntree_limit == 10 assert booster.booster.best_iteration == 9 assert len(history['train']['rmse']) == 10 assert len(history['test']['rmse']) == 10 From 8ea928d060f870512f8815111afbea8dbd3185f3 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 20 Jan 2023 07:28:44 +0100 Subject: [PATCH 02/91] Build wheels on pull_request --- .github/workflows/wheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 8d27f3e9f2..50696cdd82 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -4,6 +4,7 @@ on: push: tags: - core-* + pull_request: jobs: build_wheels: From a210a40e49d18b5790847f15794d56db126a3187 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 20 Jan 2023 07:26:36 +0100 Subject: [PATCH 03/91] Maximize wheel build parallellization --- .github/workflows/wheel.yml | 106 ++++++++++++++++++++---------------- packages/vaex-core/setup.py | 2 + 2 files changed, 61 insertions(+), 47 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 50696cdd82..fee851602f 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -7,84 +7,96 @@ on: pull_request: jobs: + build_wheels_matrix: + runs-on: ubuntu-latest + outputs: + include: ${{ steps.set-matrix.outputs.include }} + + steps: + - uses: actions/checkout@v3 + with: + submodules: true + + - uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - run: pip install cibuildwheel==2.12.0 + + - id: set-matrix + run: | + MATRIX_INCLUDE=$( + { + cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -Rc '{"only": ., "os": "ubuntu-latest"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -Rc '{"only": ., "os": "macos-latest"}' \ + && cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | grep cp | jq -Rc '{"only": ., "os": "windows-latest"}' + } | jq -sc + ) + echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT + cat $GITHUB_OUTPUT + working-directory: packages/vaex-core/ + build_wheels: - name: Build wheel on ${{ matrix.os }} + needs: build_wheels_matrix runs-on: ${{ matrix.os }} + name: Build ${{ matrix.only }} + strategy: - fail-fast: false matrix: - os: [ubuntu-20.04, macOS-11, windows-latest] - python-version: [36, 37, 38, 39, 310] + include: ${{ fromJson(needs.build_wheels_matrix.outputs.include) }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - name: Copy dll - if: (matrix.os == 'windows-latest') + if: matrix.os == 'windows-latest' uses: ./ci/actions/windll - - uses: actions/setup-python@v2 - name: Install Python - with: - python-version: '3.7' - - - name: Install cibuildwheel - run: | - python -m pip install cibuildwheel==2.8.1 - - - name: Install twine/wheel - run: | - python -m pip install twine wheel - - name: chores if: matrix.os != 'windows-latest' run: | - mkdir dist mkdir packages/vaex-core/bin cp bin/install_pcre.sh packages/vaex-core/bin/ - - name: Build vaex-core (windows) - if: (matrix.os == 'windows-latest') - env: - CIBW_BUILD: cp${{ matrix.python-version }}*64 - CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'" - run: | - python -m cibuildwheel --output-dir dist packages/vaex-core + - name: Set up QEMU + if: runner.os == 'Linux' + uses: docker/setup-qemu-action@v2 - - name: Build vaex-core (linux, osx) - if: (matrix.os != 'windows-latest') + - uses: pypa/cibuildwheel@v2.12.0 + with: + only: ${{ matrix.only }} + package-dir: packages/vaex-core/ + output-dir: packages/vaex-core/dist/ env: - CIBW_BEFORE_BUILD: bin/install_pcre.sh - CIBW_BUILD: "cp${{ matrix.python-version }}*64 cp${{ matrix.python-version }}-macosx-*" - CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'" + CIBW_BEFORE_BUILD: ${{ matrix.os == 'windows-latest' && '' || 'bin/install_pcre.sh' }} CIBW_BUILD_VERBOSITY: 2 - # needed for m1 builds + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 + CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 + CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'" CIBW_ENVIRONMENT_MACOS: "CFLAGS='-I/usr/local/include -L/usr/local/lib' CXXFLAGS='-I/usr/local/include -L/usr/local/lib' LDFLAGS='-L/usr/local/lib'" - CIBW_ARCHS_MACOS: "x86_64 arm64" - run: | - python -m cibuildwheel --output-dir dist packages/vaex-core - - name: Make source distribution - shell: bash - run: | - cd packages/vaex-core && python setup.py sdist + - uses: actions/setup-python@v4 + with: + python-version: "3.x" - - name: Copy build artifacts - shell: bash - run: | - cp packages/vaex-core/dist/* dist/ + - name: Make source distribution + run: python setup.py sdist + working-directory: packages/vaex-core/ - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v3 with: name: distributions - path: ./dist + path: packages/vaex-core/dist - name: Publish a Python distribution to PyPI + if: github.event_name == 'push' env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_core }} run: | + pip install twine wheel openssl sha256 dist/* - twine upload --skip-existing dist/vaex?core* + twine upload --skip-existing + working-directory: packages/vaex-core/ diff --git a/packages/vaex-core/setup.py b/packages/vaex-core/setup.py index b5c98c18ca..f590ee90b9 100644 --- a/packages/vaex-core/setup.py +++ b/packages/vaex-core/setup.py @@ -183,12 +183,14 @@ def __str__(self): include_package_data=True, ext_modules=([extension_vaexfast] if on_rtd else [extension_vaexfast, extension_strings, extension_superutils, extension_superagg]) if not use_skbuild else [], zip_safe=False, + python_requires=">=3.6", classifiers=[ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ], extras_require={ 'all': ["gcsfs>=0.6.2", "s3fs"] From 3395947bc12fe33ad2ed622b7c2feba80a6976a7 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 20 Jan 2023 08:11:47 +0100 Subject: [PATCH 04/91] git submodule update --remote --merge packages/vaex-core/vendor/pybind11 --- packages/vaex-core/vendor/pybind11 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vaex-core/vendor/pybind11 b/packages/vaex-core/vendor/pybind11 index 25abf7efba..a500f439d0 160000 --- a/packages/vaex-core/vendor/pybind11 +++ b/packages/vaex-core/vendor/pybind11 @@ -1 +1 @@ -Subproject commit 25abf7efba0b2990f5a6dfb0a31bc65c0f2f4d17 +Subproject commit a500f439d06d220ee2c680cdd2c8828eac8e7dfc From b6c6925426166c5510607c35e80b937e9c1a31a1 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 20 Jan 2023 08:17:15 +0100 Subject: [PATCH 05/91] Fix gcc error --- packages/vaex-core/src/superstring.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/vaex-core/src/superstring.hpp b/packages/vaex-core/src/superstring.hpp index b62d492bc2..924be203bc 100644 --- a/packages/vaex-core/src/superstring.hpp +++ b/packages/vaex-core/src/superstring.hpp @@ -3,6 +3,7 @@ #include #include +#include typedef nonstd::string_view string_view; typedef std::string string; #include From 91343013a8721f283dc96ca2e2472b24f3794d1d Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 20 Jan 2023 08:26:10 +0100 Subject: [PATCH 06/91] Fix workflow syntax --- .github/workflows/wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index fee851602f..3d6ab3c5a5 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -70,7 +70,7 @@ jobs: package-dir: packages/vaex-core/ output-dir: packages/vaex-core/dist/ env: - CIBW_BEFORE_BUILD: ${{ matrix.os == 'windows-latest' && '' || 'bin/install_pcre.sh' }} + CIBW_BEFORE_BUILD: ${{ ( matrix.os != 'windows-latest' && 'bin/install_pcre.sh' ) || '' }} CIBW_BUILD_VERBOSITY: 2 CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 From 65e1fd8e866f5f354f32b1e3d34979012d97d841 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 20 Jan 2023 08:44:18 +0100 Subject: [PATCH 07/91] 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 --- packages/vaex-core/src/hash_object.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/vaex-core/src/hash_object.cpp b/packages/vaex-core/src/hash_object.cpp index dfd99c8db4..a86287cc3a 100644 --- a/packages/vaex-core/src/hash_object.cpp +++ b/packages/vaex-core/src/hash_object.cpp @@ -13,15 +13,6 @@ typedef SSIZE_T ssize_t; namespace py = pybind11; -namespace std { - template<> - struct hash { - size_t operator()(const PyObject *const &o) const { - return PyObject_Hash((PyObject*)o); - } - }; -} - namespace vaex { struct CompareObjects From c1c15e68177e442bf0bc9d4e82e9958a758f3055 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 20 Jan 2023 08:50:35 +0100 Subject: [PATCH 08/91] Disable win32 https://github.com/ddelange/vaex/actions/runs/3965689146/jobs/6795667118#step:6:538 --- .github/workflows/wheel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 3d6ab3c5a5..17e48dc090 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -27,9 +27,9 @@ jobs: run: | MATRIX_INCLUDE=$( { - cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -Rc '{"only": ., "os": "ubuntu-latest"}' \ - && cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -Rc '{"only": ., "os": "macos-latest"}' \ - && cibuildwheel --print-build-identifiers --platform windows --arch x86,AMD64 | grep cp | jq -Rc '{"only": ., "os": "windows-latest"}' + cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ + && cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc ) echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT From 0d0b27231b85966967c6a78ba7b4d8d59c19ae82 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 20 Jan 2023 09:15:43 +0100 Subject: [PATCH 09/91] Remove testing leftovers --- .github/workflows/wheel.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 17e48dc090..6e6ef8c063 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -4,7 +4,6 @@ on: push: tags: - core-* - pull_request: jobs: build_wheels_matrix: @@ -91,7 +90,6 @@ jobs: path: packages/vaex-core/dist - name: Publish a Python distribution to PyPI - if: github.event_name == 'push' env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_core }} From 7817433cb9501e2125c893c86f454303315aaa4d Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:14:49 +0200 Subject: [PATCH 10/91] Add upper cap on lightgbm https://github.com/microsoft/LightGBM/issues/5196#issuecomment-1702252267 --- requirements-ml.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-ml.txt b/requirements-ml.txt index fde5372d8f..fc14ad510e 100644 --- a/requirements-ml.txt +++ b/requirements-ml.txt @@ -1,7 +1,7 @@ annoy scikit-learn xgboost -lightgbm +lightgbm<4 # https://github.com/microsoft/LightGBM/issues/5196#issuecomment-1702252267 catboost # tensorflow==2.1.0 # tensorflow-io==0.12.0 From f556f569fff32552ecec5afcd8aa55706727d072 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Mon, 4 Sep 2023 10:28:00 +0200 Subject: [PATCH 11/91] Migrate to mamba-org/setup-micromamba@v1 --- .github/workflows/pythonpackage.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 45601d0199..22fab1c9b4 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -53,11 +53,12 @@ jobs: token: ${{ secrets.PAT_PULL_ENTERPRISE }} path: vaex-enterprise - name: install micromamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/setup-micromamba@v1 with: + micromamba-version: 1.5.0-1 environment-name: vaex-dev environment-file: ci/conda-env.yml - extra-specs: | + create-args: >- python=${{ matrix.python-version }} - name: Extra non-windows installs if: matrix.os != 'windows-latest' @@ -206,11 +207,12 @@ jobs: path: ./dist - name: Install micromamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/setup-micromamba@v1 with: + micromamba-version: 1.5.0-1 environment-name: vaex-test environment-file: ci/conda-base-minimal.yml - extra-specs: | + create-args: >- python=${{ matrix.python-version }} pcre rich From 34b0209fa09cb3cfd8e1c819f89ef447f4eb9d02 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Sat, 14 Oct 2023 11:07:28 +0300 Subject: [PATCH 12/91] Upload release assets on Github (pre)release --- .github/workflows/wheel.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 6e6ef8c063..fb5cea7561 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -4,6 +4,9 @@ on: push: tags: - core-* + release: + types: [released, prereleased] + workflow_dispatch: # allows running workflow manually from the Actions tab jobs: build_wheels_matrix: @@ -63,7 +66,7 @@ jobs: if: runner.os == 'Linux' uses: docker/setup-qemu-action@v2 - - uses: pypa/cibuildwheel@v2.12.0 + - uses: pypa/cibuildwheel@v2.16.2 with: only: ${{ matrix.only }} package-dir: packages/vaex-core/ @@ -76,6 +79,12 @@ jobs: CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'" CIBW_ENVIRONMENT_MACOS: "CFLAGS='-I/usr/local/include -L/usr/local/lib' CXXFLAGS='-I/usr/local/include -L/usr/local/lib' LDFLAGS='-L/usr/local/lib'" + - name: Upload release assets + if: github.event_name == 'release' + uses: softprops/action-gh-release@v0.1.15 + with: + files: packages/vaex-core/dist/* + - uses: actions/setup-python@v4 with: python-version: "3.x" From 857350225c81710ed7cce9c369bdc80b558ad9a7 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Sat, 14 Oct 2023 11:33:20 +0300 Subject: [PATCH 13/91] Add missing permission for release assets --- .github/workflows/wheel.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index fb5cea7561..339de37d97 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -44,9 +44,13 @@ jobs: name: Build ${{ matrix.only }} strategy: + fail-fast: false matrix: include: ${{ fromJson(needs.build_wheels_matrix.outputs.include) }} + permissions: + contents: write # for uploading release assets + steps: - uses: actions/checkout@v3 with: From b614cd3500a238a130c8566a5c51a306af11e7f3 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Wed, 18 Oct 2023 22:46:42 +0300 Subject: [PATCH 14/91] Build cp312 wheels --- .github/workflows/wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 339de37d97..17db63b625 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -23,7 +23,7 @@ jobs: with: python-version: "3.x" - - run: pip install cibuildwheel==2.12.0 + - run: pip install cibuildwheel~=2.16 - id: set-matrix run: | From 39eed152888f281bb0d822f3206f630cfcc03275 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 19 Oct 2023 09:29:34 +0300 Subject: [PATCH 15/91] Remove setuptools and wheel from pyproject.toml --- packages/vaex-core/pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/vaex-core/pyproject.toml b/packages/vaex-core/pyproject.toml index 64ee8280fb..df5666945b 100644 --- a/packages/vaex-core/pyproject.toml +++ b/packages/vaex-core/pyproject.toml @@ -1,8 +1,6 @@ [build-system] # Minimum requirements for the build system to execute. requires = [ - "setuptools", - "wheel", "oldest-supported-numpy", "scikit-build", "cmake", From 0e37c401e271c1e60d071e3f8b08e05b503eaeb3 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 20 Oct 2023 11:14:02 +0200 Subject: [PATCH 16/91] Replace imp with importlib --- bin/webveax | 6 +++--- docs/source/conf.py | 4 ++-- packages/vaex-arrow/setup.py | 4 ++-- packages/vaex-astro/setup.py | 4 ++-- packages/vaex-contrib/setup.py | 4 ++-- packages/vaex-core/setup.py | 4 ++-- packages/vaex-core/vaex/expression.py | 4 ++-- packages/vaex-graphql/setup.py | 4 ++-- packages/vaex-hdf5/setup.py | 4 ++-- packages/vaex-jupyter/setup.py | 4 ++-- packages/vaex-meta/setup.py | 4 ++-- packages/vaex-ml/setup.py | 4 ++-- packages/vaex-server/setup.py | 4 ++-- packages/vaex-ui/setup.py | 4 ++-- packages/vaex-ui/vaex/ui/main.py | 6 +++--- packages/vaex-viz/setup.py | 4 ++-- py2app.py | 4 ++-- 17 files changed, 36 insertions(+), 36 deletions(-) diff --git a/bin/webveax b/bin/webveax index 43146b6a99..0a694002e1 100644 --- a/bin/webveax +++ b/bin/webveax @@ -12,10 +12,10 @@ import sys import time import itertools import platform +from importlib.machinery import SourceFileLoader import vaex.dataset -import imp #import matplotlib @@ -57,7 +57,7 @@ custom_module = None for path in path_list: if os.path.exists(path): print "loading", path - custom_module = imp.load_source('vaex.web.custom', path) + custom_module = SourceFileLoader('vaex.web.custom', path).load_module() else: print >>sys.stderr, path, "does not exist" if custom_module: @@ -244,4 +244,4 @@ def api_density_xy(name, x, y=None): if __name__ == '__main__': #flask.url_for('static', filename='test.html') app.run(host='0.0.0.0') - #api_density_xy("Aq-A-2-999-shuffled-1percent", "x", "y") \ No newline at end of file + #api_density_xy("Aq-A-2-999-shuffled-1percent", "x", "y") diff --git a/docs/source/conf.py b/docs/source/conf.py index be71f4a956..622638d292 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -89,7 +89,7 @@ print("failed finding vaex module, try finding version") import sys import os - import imp + from importlib.machinery import SourceFileLoader def system(cmd): print("Executing: ", cmd) @@ -102,7 +102,7 @@ def system(cmd): if not os.path.exists(path_version_file): system("version=`git describe --tags --long`; python/vaex/vaex/setversion.py ${version}") - version = imp.load_source('version', path_version_file) + version = SourceFileLoader('version', path_version_file).load_module() # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/packages/vaex-arrow/setup.py b/packages/vaex-arrow/setup.py index d12bf8b7c0..5cd9f033b7 100644 --- a/packages/vaex-arrow/setup.py +++ b/packages/vaex-arrow/setup.py @@ -1,10 +1,10 @@ import os -import imp from setuptools import setup +from importlib.machinery import SourceFileLoader dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, "vaex_arrow/_version.py") -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' diff --git a/packages/vaex-astro/setup.py b/packages/vaex-astro/setup.py index 7556cda2fa..26006116e3 100644 --- a/packages/vaex-astro/setup.py +++ b/packages/vaex-astro/setup.py @@ -1,10 +1,10 @@ import os -import imp from setuptools import setup +from importlib.machinery import SourceFileLoader dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, 'vaex/astro/_version.py') -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' author = 'Maarten A. Breddels' diff --git a/packages/vaex-contrib/setup.py b/packages/vaex-contrib/setup.py index 2aba0a1c3f..61edc62354 100644 --- a/packages/vaex-contrib/setup.py +++ b/packages/vaex-contrib/setup.py @@ -1,10 +1,10 @@ import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import setup dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, 'vaex/contrib/_version.py') -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' license = 'MIT' diff --git a/packages/vaex-core/setup.py b/packages/vaex-core/setup.py index f590ee90b9..7d04fb3e04 100644 --- a/packages/vaex-core/setup.py +++ b/packages/vaex-core/setup.py @@ -1,7 +1,7 @@ from setuptools import setup import sys import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import Extension import platform @@ -15,7 +15,7 @@ dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, "vaex/core/_version.py") -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' author = "Maarten A. Breddels" diff --git a/packages/vaex-core/vaex/expression.py b/packages/vaex-core/vaex/expression.py index 3e36e42dea..a795a17000 100644 --- a/packages/vaex-core/vaex/expression.py +++ b/packages/vaex-core/vaex/expression.py @@ -1138,7 +1138,7 @@ def jit_pythran(self, verbose=False): if not verbose: logger.setLevel(logging.ERROR) import pythran - import imp + from importlib.machinery import SourceFileLoader import hashlib # self._import_all(module) names = [] @@ -1165,7 +1165,7 @@ def f({0}): # print(m.hexdigest()) module_path = pythran.compile_pythrancode(module_name, code, extra_compile_args=["-DBOOST_SIMD", "-march=native"] + [] if verbose else ["-w"]) - module = imp.load_dynamic(module_name, module_path) + module = SourceFileLoader(module_name, module_path).load_module() function_name = "f_" + m.hexdigest() function = self.ds.add_function(function_name, module.f, unique=True) diff --git a/packages/vaex-graphql/setup.py b/packages/vaex-graphql/setup.py index c0e73d3162..8a6e8a0860 100644 --- a/packages/vaex-graphql/setup.py +++ b/packages/vaex-graphql/setup.py @@ -1,10 +1,10 @@ import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import setup dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, 'vaex/graphql/_version.py') -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' author = 'Maarten A. Breddels' diff --git a/packages/vaex-hdf5/setup.py b/packages/vaex-hdf5/setup.py index 83c0fb74d9..b21f664df5 100644 --- a/packages/vaex-hdf5/setup.py +++ b/packages/vaex-hdf5/setup.py @@ -1,11 +1,11 @@ import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import setup from setuptools import Extension dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, "vaex/hdf5/_version.py") -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' author = "Maarten A. Breddels" diff --git a/packages/vaex-jupyter/setup.py b/packages/vaex-jupyter/setup.py index 14a88ab5f6..467f4b375b 100644 --- a/packages/vaex-jupyter/setup.py +++ b/packages/vaex-jupyter/setup.py @@ -1,11 +1,11 @@ import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import setup from setuptools import Extension dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, 'vaex/jupyter/_version.py') -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' diff --git a/packages/vaex-meta/setup.py b/packages/vaex-meta/setup.py index 407578e97b..7b103103a0 100644 --- a/packages/vaex-meta/setup.py +++ b/packages/vaex-meta/setup.py @@ -1,11 +1,11 @@ import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import setup from setuptools import Extension dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, 'vaex/meta/_version.py') -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' diff --git a/packages/vaex-ml/setup.py b/packages/vaex-ml/setup.py index e2a19be820..07e76a82ea 100644 --- a/packages/vaex-ml/setup.py +++ b/packages/vaex-ml/setup.py @@ -1,10 +1,10 @@ import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import setup dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, 'vaex/ml/_version.py') -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' author = 'Jovan Veljanoski' diff --git a/packages/vaex-server/setup.py b/packages/vaex-server/setup.py index 2470e88b5e..37916d450c 100644 --- a/packages/vaex-server/setup.py +++ b/packages/vaex-server/setup.py @@ -1,11 +1,11 @@ import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import setup from setuptools import Extension dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, 'vaex/server/_version.py') -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' diff --git a/packages/vaex-ui/setup.py b/packages/vaex-ui/setup.py index 09ec130b08..401942eb6f 100644 --- a/packages/vaex-ui/setup.py +++ b/packages/vaex-ui/setup.py @@ -1,11 +1,11 @@ import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import setup from setuptools import Extension dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, "vaex/ui/_version.py") -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' author = "Maarten A. Breddels" diff --git a/packages/vaex-ui/vaex/ui/main.py b/packages/vaex-ui/vaex/ui/main.py index a1d44cb119..83716cf023 100644 --- a/packages/vaex-ui/vaex/ui/main.py +++ b/packages/vaex-ui/vaex/ui/main.py @@ -76,7 +76,7 @@ def getfilesystemencoding_wrapper(): # import subspacefind # import ctypes -import imp +from importlib.machinery import SourceFileLoader import logging logger = logging.getLogger("vaex") @@ -92,7 +92,7 @@ def getfilesystemencoding_wrapper(): custompath = path = os.path.expanduser('~/.vaex/custom.py') # print path if os.path.exists(path): - customModule = imp.load_source('vaex.custom', path) + customModule = SourceFileLoader('vaex.custom', path).load_module() # custom = customModule.Custom() else: custom = None @@ -1164,7 +1164,7 @@ def do(ignore=None, dim=dim, N=N, power=power, name=name): logger.debug("plugin file: %s" % path) filename = os.path.basename(path) name = os.path.splitext(filename)[0] - imp.load_source('vaexuser.plugin.' + name, path) + SourceFileLoader('vaexuser.plugin.' + name, path).load_module() self.open_generators = [] # for reference counts self.action_open_hdf5_gadget.triggered.connect(self.openGenerator(self.gadgethdf5, "Gadget HDF5 file", "*.hdf5")) diff --git a/packages/vaex-viz/setup.py b/packages/vaex-viz/setup.py index d824616093..e803574a0a 100644 --- a/packages/vaex-viz/setup.py +++ b/packages/vaex-viz/setup.py @@ -1,10 +1,10 @@ import os -import imp +from importlib.machinery import SourceFileLoader from setuptools import setup dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, "vaex/viz/_version.py") -version = imp.load_source('version', path_version) +version = SourceFileLoader('version', path_version).load_module() name = 'vaex' diff --git a/py2app.py b/py2app.py index 4abc694cd8..c740d49b72 100644 --- a/py2app.py +++ b/py2app.py @@ -12,7 +12,7 @@ from setuptools import setup, Extension import platform import sys -import imp +from importlib.machinery import SourceFileLoader def system(cmd): print("Executing: ", cmd) @@ -25,7 +25,7 @@ def system(cmd): if not os.path.exists(path_version_file): system("version=`git describe --tags --long`; vaex/setversion.py ${version}") -version = imp.load_source('version', path_version_file) +version = SourceFileLoader('version', path_version_file).load_module() #system("version=`git describe --tags --long`; vaex/vaex/setversion.py ${version}") From 63acdb6aac5b00f6ffac7e0987c6079e02cfd0e0 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 7 Feb 2024 09:17:47 +0100 Subject: [PATCH 17/91] chore: trigger ci From ba4943b4d93050354582bc95c355bedd54f286fd Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 7 Feb 2024 09:38:22 +0100 Subject: [PATCH 18/91] ci: upgrade xcode for brew install libomp --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 22fab1c9b4..1faa736cec 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -42,7 +42,7 @@ jobs: # alternative would be to upgrade tapi to 1100.0.11, we can possibly remove this in the future if: matrix.os == 'macOS-11' with: - xcode-version: "11.7.0" + xcode-version: "13.2.1" - uses: actions/checkout@v2 with: submodules: true From a346454e08e2f7b68daf88b647d202a5494b3767 Mon Sep 17 00:00:00 2001 From: Jovan Veljanoski Date: Fri, 9 Feb 2024 13:30:01 +0100 Subject: [PATCH 19/91] update requirements-ml to comply with the latest veex-ml expectations. --- requirements-ml.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-ml.txt b/requirements-ml.txt index fc14ad510e..b4ab89ed63 100644 --- a/requirements-ml.txt +++ b/requirements-ml.txt @@ -1,7 +1,7 @@ annoy scikit-learn xgboost -lightgbm<4 # https://github.com/microsoft/LightGBM/issues/5196#issuecomment-1702252267 +lightgbm>4 catboost # tensorflow==2.1.0 # tensorflow-io==0.12.0 From d7023a7fbe551841028e265c6eea52db02d287c8 Mon Sep 17 00:00:00 2001 From: Jovan Veljanoski Date: Fri, 9 Feb 2024 15:30:53 +0100 Subject: [PATCH 20/91] try to install lightgbm via pip --- ci/conda-env.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/conda-env.yml b/ci/conda-env.yml index 34138c94d7..2cdf9d5a21 100644 --- a/ci/conda-env.yml +++ b/ci/conda-env.yml @@ -20,7 +20,6 @@ dependencies: - h5py - httpx # for testing with starlette/fastapi - ipyvolume=0.6.0a6 -- lightgbm>=4.0.0 - matplotlib-base - nest-asyncio<1.5.2 - notebook @@ -54,3 +53,5 @@ dependencies: - python-utils - progressbar2 - zipp<3.16.0 +- pip: + - lightgbm>=4.0.0 \ No newline at end of file From 021e60f5de638bdec12a6fbe64e3841375abe3f6 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 13 Feb 2024 09:27:48 +0100 Subject: [PATCH 21/91] fix: only the mini taxi file is on s3 for cost savings --- docs/source/datasets.ipynb | 4 ++-- packages/vaex-core/vaex/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/datasets.ipynb b/docs/source/datasets.ipynb index dc9774db35..9795f60f6d 100644 --- a/docs/source/datasets.ipynb +++ b/docs/source/datasets.ipynb @@ -31,13 +31,13 @@ "One can also stream the data directly from S3. Only the data that is necessary will be streamed, and it will cached locally:\n", "```\n", "import vaex\n", - "df = vaex.open('s3://vaex/taxi/yellow_taxi_2015_f32s.hdf5?anon=true')\n", + "df = vaex.open('s3://vaex/taxi/nyc_taxi_2015_mini.hdf5?anon=true')\n", "```" ] }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2020-06-04T13:46:26.924698Z", diff --git a/packages/vaex-core/vaex/__init__.py b/packages/vaex-core/vaex/__init__.py index 4190eb9f9e..5724d9b938 100644 --- a/packages/vaex-core/vaex/__init__.py +++ b/packages/vaex-core/vaex/__init__.py @@ -155,8 +155,8 @@ def open(path, convert=False, progress=None, shuffle=False, fs_options={}, fs=No Examples: - >>> df = vaex.open('s3://vaex/taxi/yellow_taxi_2015_f32s.hdf5', fs_options={{'anonymous': True}}) - >>> df = vaex.open('s3://vaex/taxi/yellow_taxi_2015_f32s.hdf5?anon=true') + >>> df = vaex.open('s3://vaex/taxi/nyc_taxi_2015_mini.hdf5?anon=true', fs_options={{'anonymous': True}}) + >>> df = vaex.open('s3://vaex/taxi/nyc_taxi_2015_mini.hdf5?anon=true?anon=true') >>> df = vaex.open('s3://mybucket/path/to/file.hdf5', fs_options={{'access_key': my_key, 'secret_key': my_secret_key}}) >>> df = vaex.open(f's3://mybucket/path/to/file.hdf5?access_key={{my_key}}&secret_key={{my_secret_key}}') >>> df = vaex.open('s3://mybucket/path/to/file.hdf5?profile=myproject') From a44e464ecb569fd7c7d90d5cb66858263a8e86ff Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 14 Feb 2024 13:09:52 +0100 Subject: [PATCH 22/91] 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) --- ci/conda-env.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/conda-env.yml b/ci/conda-env.yml index 2cdf9d5a21..845b9f3088 100644 --- a/ci/conda-env.yml +++ b/ci/conda-env.yml @@ -10,6 +10,7 @@ dependencies: - cython - cachetools - catboost +- dask<2024.2.0 - diskcache - filelock - fsspec<2022.2.0 From 915d977edf3bda7d43fa18b3d2ad8fed22402ca9 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 14 Feb 2024 13:41:11 +0100 Subject: [PATCH 23/91] fix: only the mini taxi file is on s3 for cost savings (2) --- docs/source/tutorial.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/tutorial.ipynb b/docs/source/tutorial.ipynb index 0772357c5e..039fea5f97 100644 --- a/docs/source/tutorial.ipynb +++ b/docs/source/tutorial.ipynb @@ -799,7 +799,7 @@ ], "source": [ "# Read in the NYC Taxi dataset straight from S3\n", - "nyctaxi = vaex.open('s3://vaex/taxi/yellow_taxi_2009_2015_f32.hdf5?anon=true')\n", + "nyctaxi = vaex.open('s3://vaex/taxi/nyc_taxi_2015_mini.hdf5?anon=true')\n", "nyctaxi.head(5)" ] }, From 658816d95f7775c4e1cf039000f9c1c50ddf4dbd Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 14 Feb 2024 15:31:27 +0100 Subject: [PATCH 24/91] ci: skip notebooks that depend on the dataframe server --- ci/05-run-notebooks.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/05-run-notebooks.sh b/ci/05-run-notebooks.sh index ccbd1bcab7..ba404e9673 100755 --- a/ci/05-run-notebooks.sh +++ b/ci/05-run-notebooks.sh @@ -22,8 +22,8 @@ cd docs/source python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute guides/io.ipynb --ExecutePreprocessor.timeout=240 python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute guides/ml_iris.ipynb --ExecutePreprocessor.timeout=240 python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute guides/ml_titanic.ipynb --ExecutePreprocessor.timeout=240 - python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute example_jupyter_plotly.ipynb --ExecutePreprocessor.timeout=240 - python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute example_jupyter_ipyvolume.ipynb --ExecutePreprocessor.timeout=240 +# python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute example_jupyter_plotly.ipynb --ExecutePreprocessor.timeout=240 +# python -m nbconvert --TagRemovePreprocessor.remove_cell_tags="('skip-ci',)" --to html --execute example_jupyter_ipyvolume.ipynb --ExecutePreprocessor.timeout=240 # this does not seem to work on osx: # # make sure the ~/.ipython dir exists because multiple processes might try to create it From afa62255077753335cccb0a547947f01d3f772c3 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 14 Feb 2024 16:45:33 +0100 Subject: [PATCH 25/91] ci: skip ci steps in various old python versions --- .github/workflows/pythonpackage.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 1faa736cec..b6e9cd5371 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -156,8 +156,8 @@ jobs: run: | VAEX_CACHE_RESULTS=1 ./ci/04-run-test-suite.sh - name: Check ml spec - # no catboost for py39 and py37 - if: matrix.python-version != '3.9' && matrix.os != 'windows-latest' && matrix.python-version != '3.7' + # no catboost for py39 and py37, xgboost fails on 3.6 + if: matrix.python-version != '3.6' && matrix.python-version != '3.7' && matrix.python-version != '3.9' && matrix.os != 'windows-latest' run: | python -m vaex.ml.spec packages/vaex-ml/vaex/ml/spec_new.json diff packages/vaex-ml/vaex/ml/spec_new.json packages/vaex-ml/vaex/ml/spec.json @@ -166,7 +166,7 @@ jobs: # run: | # py.test vaex-enterprise/tests --timeout=1000 - name: Test notebooks - if: matrix.os != 'windows-latest' && matrix.python-version != '3.6' + if: matrix.os != 'windows-latest' && matrix.python-version != '3.6' && matrix.python-version != '3.7' run: | ./ci/05-run-notebooks.sh - name: Authenticate Google Cloud Platform From eb2afa32ad0187bd573752bc26e5d665e323d71b Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:29:45 +0100 Subject: [PATCH 26/91] Bump micromamba and other actions --- .github/workflows/pythonpackage.yml | 4 ++-- .github/workflows/wheel.yml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index b6e9cd5371..323c8ab512 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -55,7 +55,7 @@ jobs: - name: install micromamba uses: mamba-org/setup-micromamba@v1 with: - micromamba-version: 1.5.0-1 + micromamba-version: 1.5.6-0 environment-name: vaex-dev environment-file: ci/conda-env.yml create-args: >- @@ -209,7 +209,7 @@ jobs: - name: Install micromamba uses: mamba-org/setup-micromamba@v1 with: - micromamba-version: 1.5.0-1 + micromamba-version: 1.5.6-0 environment-name: vaex-test environment-file: ci/conda-base-minimal.yml create-args: >- diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 17db63b625..d29e002483 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -15,11 +15,11 @@ jobs: include: ${{ steps.set-matrix.outputs.include }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.x" @@ -52,7 +52,7 @@ jobs: contents: write # for uploading release assets steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true @@ -68,9 +68,9 @@ jobs: - name: Set up QEMU if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - - uses: pypa/cibuildwheel@v2.16.2 + - uses: pypa/cibuildwheel@v2.16.5 with: only: ${{ matrix.only }} package-dir: packages/vaex-core/ @@ -89,7 +89,7 @@ jobs: with: files: packages/vaex-core/dist/* - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.x" @@ -97,9 +97,9 @@ jobs: run: python setup.py sdist working-directory: packages/vaex-core/ - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: distributions + name: distribution-${{ matrix.only }} path: packages/vaex-core/dist - name: Publish a Python distribution to PyPI From 1f04e2e12f0f5543f35005284ef6e5f2bf225bca Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 5 Mar 2024 09:12:25 +0100 Subject: [PATCH 27/91] ci: specific test hangs on ci+osx --- tests/ml/lightgbm_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ml/lightgbm_test.py b/tests/ml/lightgbm_test.py index f3aa6f7cf0..36a96e88d5 100644 --- a/tests/ml/lightgbm_test.py +++ b/tests/ml/lightgbm_test.py @@ -132,6 +132,7 @@ def test_lightgbm_validation_set(df_example): @pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher") +@pytest.mark.skipif(vaex.utils.osname == 'osx', reason="hangs for unknown reason on osx") def test_lightgbm_pipeline(df_example): ds = df_example # train test splot From 167e500df0b9ff5554fb62e38b0e0d64f2248685 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 5 Apr 2024 08:36:47 +0200 Subject: [PATCH 28/91] Bump cibuildwheel, use native arm64 mac runners --- .github/workflows/wheel.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index d29e002483..dbde062dd7 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -23,14 +23,15 @@ jobs: with: python-version: "3.x" - - run: pip install cibuildwheel~=2.16 + - run: pip install cibuildwheel==2.17.0 # sync version with pypa/cibuildwheel below - id: set-matrix run: | MATRIX_INCLUDE=$( { cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ - && cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch x86_64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-13"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-14"}' \ && cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc ) @@ -70,7 +71,7 @@ jobs: if: runner.os == 'Linux' uses: docker/setup-qemu-action@v3 - - uses: pypa/cibuildwheel@v2.16.5 + - uses: pypa/cibuildwheel@v2.17.0 # sync version with pip install cibuildwheel above with: only: ${{ matrix.only }} package-dir: packages/vaex-core/ From 100a13f3b37e1dd9881b207f245057f9707403fd Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 19 Jun 2024 08:18:48 +0200 Subject: [PATCH 29/91] test: log is renamed to log loss --- tests/ml/sklearn_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ml/sklearn_test.py b/tests/ml/sklearn_test.py index 6e18efa6c4..952d52fe38 100644 --- a/tests/ml/sklearn_test.py +++ b/tests/ml/sklearn_test.py @@ -206,7 +206,7 @@ def test_sklearn_incremental_predictor_classification(prediction_type, df_iris_1 features = df_train.column_names[:4] target = 'class_' - incremental = IncrementalPredictor(model=SGDClassifier(loss='log', learning_rate='constant', eta0=0.01), + incremental = IncrementalPredictor(model=SGDClassifier(loss='log_loss', learning_rate='constant', eta0=0.01), features=features, target=target, batch_size=10_000, From d32a9a5cc0ddd097e284d546b819b4ec919e8274 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 19 Jun 2024 08:19:13 +0200 Subject: [PATCH 30/91] test: skip lightgbm tests on 36 and 37 --- tests/ml/lightgbm_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ml/lightgbm_test.py b/tests/ml/lightgbm_test.py index 36a96e88d5..87ff935848 100644 --- a/tests/ml/lightgbm_test.py +++ b/tests/ml/lightgbm_test.py @@ -1,5 +1,8 @@ import sys import pytest +# py 36 and 37 give a syntax error +if sys.version_info < (3, 8): + pytest.skip(allow_module_level=True) pytest.importorskip("lightgbm") import numpy as np From 310087cad4cf62dc69eb257425c1741fde352055 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 19 Jun 2024 09:09:05 +0200 Subject: [PATCH 31/91] test: skip sklearn tests on 36 and 37 --- tests/ml/sklearn_test.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/ml/sklearn_test.py b/tests/ml/sklearn_test.py index 952d52fe38..96830aeccd 100644 --- a/tests/ml/sklearn_test.py +++ b/tests/ml/sklearn_test.py @@ -1,6 +1,11 @@ import platform - +import sys import pytest +# py 36 and 37 not supported +if sys.version_info < (3, 8): + pytest.skip(allow_module_level=True) + + import vaex pytest.importorskip("sklearn") from vaex.ml.sklearn import Predictor, IncrementalPredictor From 12e247872d7780a05debb753f584e77d5b3e22f7 Mon Sep 17 00:00:00 2001 From: Maarten Breddels Date: Sat, 22 Jun 2024 16:00:42 +0200 Subject: [PATCH 32/91] Update packages/vaex-core/setup.py Co-authored-by: ddelange <14880945+ddelange@users.noreply.github.com> --- packages/vaex-core/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vaex-core/setup.py b/packages/vaex-core/setup.py index 7d04fb3e04..08a92d28f3 100644 --- a/packages/vaex-core/setup.py +++ b/packages/vaex-core/setup.py @@ -183,7 +183,7 @@ def __str__(self): include_package_data=True, ext_modules=([extension_vaexfast] if on_rtd else [extension_vaexfast, extension_strings, extension_superutils, extension_superagg]) if not use_skbuild else [], zip_safe=False, - python_requires=">=3.6", + python_requires=">=3.8", classifiers=[ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", From a19eb7e4b204d48fb2922fa95cc9bbfd814acd68 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 3 Jul 2024 09:05:01 +0200 Subject: [PATCH 33/91] chore: drop python 3.6 and 3.7 support Co-authored-by: Ewout ter Hoeven --- .github/workflows/pythonpackage.yml | 25 ++++++++----------------- packages/vaex-core/setup.py | 2 -- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 323c8ab512..3a8ef02496 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -31,7 +31,7 @@ jobs: max-parallel: 12 matrix: os: [ubuntu-latest, windows-latest, macOS-11] - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.8, 3.9] steps: - name: disk space @@ -85,7 +85,7 @@ jobs: brew install libomp - name: Cache compiled binaries # this fails for this combination, leading to binaries filled with 0's - if: matrix.python-version != '3.6' || matrix.os != 'macOS-11' + if: matrix.os != 'macOS-11' id: cache-compiled-binaries uses: actions/cache@v2 with: @@ -138,11 +138,6 @@ jobs: # # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Install fixes for Python 3.6 - if: matrix.python-version == '3.6' - run: | - # by default on 3.6 we get an old version, so manually upgrade - pip install gcsfs==0.8.0 - name: Install pytest-asyncio correct version if: matrix.python-version != '3.10' run: | @@ -157,7 +152,7 @@ jobs: VAEX_CACHE_RESULTS=1 ./ci/04-run-test-suite.sh - name: Check ml spec # no catboost for py39 and py37, xgboost fails on 3.6 - if: matrix.python-version != '3.6' && matrix.python-version != '3.7' && matrix.python-version != '3.9' && matrix.os != 'windows-latest' + if: matrix.python-version != '3.9' && matrix.os != 'windows-latest' run: | python -m vaex.ml.spec packages/vaex-ml/vaex/ml/spec_new.json diff packages/vaex-ml/vaex/ml/spec_new.json packages/vaex-ml/vaex/ml/spec.json @@ -166,19 +161,19 @@ jobs: # run: | # py.test vaex-enterprise/tests --timeout=1000 - name: Test notebooks - if: matrix.os != 'windows-latest' && matrix.python-version != '3.6' && matrix.python-version != '3.7' + if: matrix.os != 'windows-latest' run: | ./ci/05-run-notebooks.sh - name: Authenticate Google Cloud Platform - if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && !((matrix.os == 'windows-latest') || (matrix.os == 'macOS-11' && matrix.python-version == '3.6')) }} + if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && !((matrix.os == 'windows-latest')) }} uses: google-github-actions/setup-gcloud@v0 with: project_id: ${{ secrets.GCP_PROJECT_ID_VAEX }} service_account_key: ${{ secrets.GCP_SA_KEY_VAEX }} export_default_credentials: true - name: Test vaex-contrib - # do not run in a PR from someone else, skip windows, and osx+py36 - if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && !((matrix.os == 'windows-latest') || (matrix.os == 'macOS-11' && matrix.python-version == '3.6')) }} + # do not run in a PR from someone else, skip windows + if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && !((matrix.os == 'windows-latest')) }} env: PROJECT_ID: ${{ secrets.GCP_PROJECT_ID_VAEX }} run: | @@ -193,11 +188,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macOS-11] - python-version: [3.7, 3.8, 3.9] - # ssl/certifi issues with this combination - exclude: - - os: windows-latest - python-version: 3.7 + python-version: [3.8, 3.9] steps: - uses: actions/checkout@v2 diff --git a/packages/vaex-core/setup.py b/packages/vaex-core/setup.py index 08a92d28f3..6526084188 100644 --- a/packages/vaex-core/setup.py +++ b/packages/vaex-core/setup.py @@ -185,8 +185,6 @@ def __str__(self): zip_safe=False, python_requires=">=3.8", classifiers=[ - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", From 5a34fee5722ae9e9c90a7b72156b24c1f17aa187 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 3 Jul 2024 09:49:24 +0200 Subject: [PATCH 34/91] test: skip a failing test for windows --- packages/vaex-core/vaex/test/dataset.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/vaex-core/vaex/test/dataset.py b/packages/vaex-core/vaex/test/dataset.py index 8c4a57b79d..acfd5a9cff 100644 --- a/packages/vaex-core/vaex/test/dataset.py +++ b/packages/vaex-core/vaex/test/dataset.py @@ -1213,6 +1213,10 @@ def test_export_sorted_arrow(self): np.testing.assert_array_equal(self.dataset.data.x[self.zero_index:self.zero_index+10], np.array(ds2.data.x)[::-1]) def test_export(self): + if vx.utils.osname == "windows": + # we hit https://github.com/h5py/h5py/issues/2346 on windows + # possible due to changes in GHA? + return path = path_hdf5 = tempfile.mktemp(".hdf5") path_fits = tempfile.mktemp(".fits") path_fits_astropy = tempfile.mktemp(".fits") From a32d9cb6e93515ef2871fed3f28de96ad563ff17 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 3 Jul 2024 09:55:55 +0200 Subject: [PATCH 35/91] ci: macOS 11 is retired as of June 28 --- .github/workflows/pythonpackage.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 3a8ef02496..ae2adf9aea 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -30,7 +30,7 @@ jobs: fail-fast: false max-parallel: 12 matrix: - os: [ubuntu-latest, windows-latest, macOS-11] + os: [ubuntu-latest, windows-latest, macOS-12] python-version: [3.8, 3.9] steps: @@ -40,7 +40,7 @@ jobs: df -h - uses: maxim-lobanov/setup-xcode@v1 # alternative would be to upgrade tapi to 1100.0.11, we can possibly remove this in the future - if: matrix.os == 'macOS-11' + if: matrix.os == 'macOS-12' with: xcode-version: "13.2.1" - uses: actions/checkout@v2 @@ -80,12 +80,12 @@ jobs: # docker rmi $(docker image ls -aq) # df -h - name: Install OpenMP runtime (Mac-only) - if: matrix.os == 'macOS-11' + if: matrix.os == 'macOS-12' run: | brew install libomp - name: Cache compiled binaries # this fails for this combination, leading to binaries filled with 0's - if: matrix.os != 'macOS-11' + if: matrix.os != 'macOS-12' id: cache-compiled-binaries uses: actions/cache@v2 with: @@ -187,7 +187,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macOS-11] + os: [ubuntu-latest, windows-latest, macOS-12] python-version: [3.8, 3.9] steps: From 00d6c3a7bbb8116a38ceb7babef50460809e946e Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 3 Jul 2024 09:58:44 +0200 Subject: [PATCH 36/91] ci: always build wheels, but do not publish instead --- .github/workflows/wheel-universal.yml | 26 +++++++------------------- .github/workflows/wheel.yml | 10 ++++++++-- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.github/workflows/wheel-universal.yml b/.github/workflows/wheel-universal.yml index fe2fd092a7..0659f60bc5 100644 --- a/.github/workflows/wheel-universal.yml +++ b/.github/workflows/wheel-universal.yml @@ -2,16 +2,13 @@ name: Build universal wheel on: push: - tags: - - meta-* - - astro-* - - graphql-* - - jupyter-* - - ml-* - - viz-* - - hdf5-* - - server-* - - contrib-* + branches: + - master + pull_request: + branches: + - master + schedule: + - cron: "0 2 * * 1-5" jobs: build_wheels: @@ -41,7 +38,6 @@ jobs: mkdir dist - name: Build vaex (meta) - if: startsWith(github.ref, 'refs/tags/meta') run: | (cp README.md packages/vaex-meta/ && cd packages/vaex-meta && python setup.py sdist bdist_wheel); cp packages/vaex-meta/dist/* dist @@ -54,7 +50,6 @@ jobs: twine upload dist/vaex* dist/vaex* - name: Build vaex-graphql - if: startsWith(github.ref, 'refs/tags/graphql') run: | (cd packages/vaex-graphql && python setup.py sdist bdist_wheel); cp packages/vaex-graphql/dist/* dist @@ -68,7 +63,6 @@ jobs: - name: Build vaex-jupyter - if: startsWith(github.ref, 'refs/tags/jupyter') run: | (cd packages/vaex-jupyter && python setup.py sdist bdist_wheel); cp packages/vaex-jupyter/dist/* dist @@ -81,7 +75,6 @@ jobs: twine upload dist/vaex-jupyter* dist/vaex_jupyter* - name: Build vaex-ml - if: startsWith(github.ref, 'refs/tags/ml') run: | (cd packages/vaex-ml && python setup.py sdist bdist_wheel); cp packages/vaex-ml/dist/* dist @@ -94,7 +87,6 @@ jobs: twine upload dist/vaex-ml* dist/vaex_ml* - name: Build vaex-contrib - if: startsWith(github.ref, 'refs/tags/contrib') run: | (cd packages/vaex-contrib && python setup.py sdist bdist_wheel); cp packages/vaex-contrib/dist/* dist @@ -109,7 +101,6 @@ jobs: - name: Build vaex-viz - if: startsWith(github.ref, 'refs/tags/viz') run: | (cd packages/vaex-viz && python setup.py sdist bdist_wheel); cp packages/vaex-viz/dist/* dist @@ -122,7 +113,6 @@ jobs: twine upload dist/vaex-viz* dist/vaex_viz* - name: Build vaex-astro - if: startsWith(github.ref, 'refs/tags/astro') run: | (cd packages/vaex-astro && python setup.py sdist bdist_wheel); cp packages/vaex-astro/dist/* dist @@ -135,7 +125,6 @@ jobs: twine upload dist/vaex-astro* dist/vaex_astro* - name: Build vaex-hdf5 - if: startsWith(github.ref, 'refs/tags/hdf5') run: | (cd packages/vaex-hdf5 && python setup.py sdist bdist_wheel); cp packages/vaex-hdf5/dist/* dist @@ -148,7 +137,6 @@ jobs: twine upload dist/vaex-hdf5* dist/vaex_hdf5* - name: Build vaex-server - if: startsWith(github.ref, 'refs/tags/server') run: | (cd packages/vaex-server && python setup.py sdist bdist_wheel); cp packages/vaex-server/dist/* dist diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index dbde062dd7..ec65031329 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -2,8 +2,13 @@ name: Build binary wheel on: push: - tags: - - core-* + branches: + - master + pull_request: + branches: + - master + schedule: + - cron: "0 2 * * 1-5" release: types: [released, prereleased] workflow_dispatch: # allows running workflow manually from the Actions tab @@ -104,6 +109,7 @@ jobs: path: packages/vaex-core/dist - name: Publish a Python distribution to PyPI + if: startsWith(github.ref, 'refs/tags/core') env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_core }} From a50ddca5c94c843135c47072aec1a4ff074fbdf9 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 3 Jul 2024 11:05:49 +0200 Subject: [PATCH 37/91] ci: try with older micromamba, 1.5.6 seems to sometimes hang --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index ae2adf9aea..02f9feabdc 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -55,7 +55,7 @@ jobs: - name: install micromamba uses: mamba-org/setup-micromamba@v1 with: - micromamba-version: 1.5.6-0 + micromamba-version: 1.1.0-1 environment-name: vaex-dev environment-file: ci/conda-env.yml create-args: >- From 66a450055284e771c1a1b54e0b6b8e75eaa59a17 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:26:54 +0200 Subject: [PATCH 38/91] Install setuptools in wheel.yml --- .github/workflows/wheel.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index ec65031329..753f99c3d4 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -100,7 +100,9 @@ jobs: python-version: "3.x" - name: Make source distribution - run: python setup.py sdist + run: | + pip install -U pip setuptools wheel + python setup.py sdist working-directory: packages/vaex-core/ - uses: actions/upload-artifact@v4 @@ -114,7 +116,7 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_core }} run: | - pip install twine wheel + pip install twine openssl sha256 dist/* twine upload --skip-existing working-directory: packages/vaex-core/ From 3d078ae6e1c62483bfe316a3504761a69598a0c5 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Wed, 3 Jul 2024 15:34:21 +0200 Subject: [PATCH 39/91] Add sudo --- .github/workflows/wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 753f99c3d4..1e37690bc3 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -82,7 +82,7 @@ jobs: package-dir: packages/vaex-core/ output-dir: packages/vaex-core/dist/ env: - CIBW_BEFORE_BUILD: ${{ ( matrix.os != 'windows-latest' && 'bin/install_pcre.sh' ) || '' }} + CIBW_BEFORE_BUILD: ${{ ( matrix.os != 'windows-latest' && 'sudo bin/install_pcre.sh' ) || '' }} CIBW_BUILD_VERBOSITY: 2 CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 From 9bb79649f3ae78cb4c81ac3d05518b5a34fadf6c Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Wed, 3 Jul 2024 16:01:44 +0200 Subject: [PATCH 40/91] Fix windows --- .github/workflows/wheel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 1e37690bc3..de5325704b 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -82,7 +82,7 @@ jobs: package-dir: packages/vaex-core/ output-dir: packages/vaex-core/dist/ env: - CIBW_BEFORE_BUILD: ${{ ( matrix.os != 'windows-latest' && 'sudo bin/install_pcre.sh' ) || '' }} + CIBW_BEFORE_BUILD: ${{ ( matrix.os != 'windows-latest' && 'sudo -E bash bin/install_pcre.sh' ) || '' }} CIBW_BUILD_VERBOSITY: 2 CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 @@ -101,7 +101,7 @@ jobs: - name: Make source distribution run: | - pip install -U pip setuptools wheel + pip install setuptools python setup.py sdist working-directory: packages/vaex-core/ @@ -116,7 +116,7 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_core }} run: | - pip install twine + pip install twine wheel openssl sha256 dist/* twine upload --skip-existing working-directory: packages/vaex-core/ From 1dbdb198b152f0f7e7eaf67270e6d0be73480f8f Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 09:45:44 +0200 Subject: [PATCH 41/91] Use sudo only on macos --- .github/workflows/wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index de5325704b..be1d6608ac 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -82,7 +82,7 @@ jobs: package-dir: packages/vaex-core/ output-dir: packages/vaex-core/dist/ env: - CIBW_BEFORE_BUILD: ${{ ( matrix.os != 'windows-latest' && 'sudo -E bash bin/install_pcre.sh' ) || '' }} + CIBW_BEFORE_BUILD: ${{ ( startswith(matrix.os, 'windows') && '' ) || ( ( startswith(matrix.os, 'macos') && 'sudo -E bash bin/install_pcre.sh' ) || 'bash bin/install_pcre.sh' ) }} CIBW_BUILD_VERBOSITY: 2 CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 From 27d34e2a81ef24b9ff6cb27a21b9ce3e301a459f Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:02:45 +0200 Subject: [PATCH 42/91] Fix empty string evaluating false --- .github/workflows/wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index be1d6608ac..bb3eb704c7 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -82,7 +82,7 @@ jobs: package-dir: packages/vaex-core/ output-dir: packages/vaex-core/dist/ env: - CIBW_BEFORE_BUILD: ${{ ( startswith(matrix.os, 'windows') && '' ) || ( ( startswith(matrix.os, 'macos') && 'sudo -E bash bin/install_pcre.sh' ) || 'bash bin/install_pcre.sh' ) }} + CIBW_BEFORE_BUILD: ${{ startswith(matrix.os, 'ubuntu') && 'bash bin/install_pcre.sh' || startswith(matrix.os, 'macos') && 'sudo -E bash bin/install_pcre.sh' || '' }} CIBW_BUILD_VERBOSITY: 2 CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 From c4f234c195892cba6e79f485b90038efd0d69a34 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:10:27 +0200 Subject: [PATCH 43/91] Add .readthedocs.yaml --- .readthedocs.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000000..2f9a218707 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,33 @@ +--- +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: '3.12' + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/source/conf.py + +# Build documentation with MkDocs +#mkdocs: +# configuration: mkdocs.yml + +# Optionally build your docs in additional formats such as PDF and ePub +formats: all + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - method: pip + path: . + - requirements: requirements/docs.txt From 0d9a3ce7bd0b6b20133bd7844857bd91e9e0afce Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:22:09 +0200 Subject: [PATCH 44/91] Pull submodules --- .readthedocs.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 2f9a218707..5c40bf4481 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -23,6 +23,11 @@ sphinx: # Optionally build your docs in additional formats such as PDF and ePub formats: all +# Pull submodules +submodules: + include: all + recursive: true + # Optional but recommended, declare the Python requirements required # to build your documentation # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html From 08da37b484e9d9867e57ed9dea5a2346b4c88a63 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:28:23 +0200 Subject: [PATCH 45/91] Try editable rtd install --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 5c40bf4481..9e4767927a 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -34,5 +34,5 @@ submodules: python: install: - method: pip - path: . + path: -e. # https://github.com/vaexio/vaex/issues/271#issuecomment-496007058 - requirements: requirements/docs.txt From 8ba6441fdecb6fb79a6c1854b4c159bfca8c339d Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:31:48 +0200 Subject: [PATCH 46/91] Try move editable install to requirements_rtd.txt --- .readthedocs.yaml | 4 +--- requirements_rtd.txt | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 9e4767927a..471f074fe8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -33,6 +33,4 @@ submodules: # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: install: - - method: pip - path: -e. # https://github.com/vaexio/vaex/issues/271#issuecomment-496007058 - - requirements: requirements/docs.txt + - requirements: requirements_rtd.txt diff --git a/requirements_rtd.txt b/requirements_rtd.txt index b4334c1d42..db337fe781 100644 --- a/requirements_rtd.txt +++ b/requirements_rtd.txt @@ -1,3 +1,4 @@ +-e . sphinx-book-theme==0.0.39b1 sphinx-sitemap sphinxcontrib-googleanalytics From d46edbc28fc0abff44366798c3dd0fca9e8234e1 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:37:02 +0200 Subject: [PATCH 47/91] Allow newer sphinx --- requirements_rtd.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements_rtd.txt b/requirements_rtd.txt index db337fe781..edff735a07 100644 --- a/requirements_rtd.txt +++ b/requirements_rtd.txt @@ -1,5 +1,6 @@ -e . -sphinx-book-theme==0.0.39b1 +sphinx +sphinx-book-theme sphinx-sitemap sphinxcontrib-googleanalytics sphinxext-rediraffe @@ -25,4 +26,3 @@ xgboost sphinx_gallery catboost myst-parser -sphinx==4.2.0 From d4964f72aa14654e00c37689c5b513ed3a6520ed Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:38:26 +0200 Subject: [PATCH 48/91] Autocancel previous runs in PRs --- .github/workflows/wheel.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index bb3eb704c7..f804cb632b 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -14,6 +14,14 @@ on: workflow_dispatch: # allows running workflow manually from the Actions tab jobs: + autocancel: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: n1hility/cancel-previous-runs@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + build_wheels_matrix: runs-on: ubuntu-latest outputs: From 976b73ff95d70d1445f3d10a629581825585522f Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:39:50 +0200 Subject: [PATCH 49/91] Autocancel all jobs --- .github/workflows/pythonpackage.yml | 8 ++++++++ .github/workflows/wheel-universal.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 02f9feabdc..800b717a78 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -21,6 +21,14 @@ concurrency: cancel-in-progress: true jobs: + autocancel: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: n1hility/cancel-previous-runs@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + main: env: CACHE_NUMBER_COMPILE: 6 diff --git a/.github/workflows/wheel-universal.yml b/.github/workflows/wheel-universal.yml index 0659f60bc5..e063f292cd 100644 --- a/.github/workflows/wheel-universal.yml +++ b/.github/workflows/wheel-universal.yml @@ -11,6 +11,14 @@ on: - cron: "0 2 * * 1-5" jobs: + autocancel: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: n1hility/cancel-previous-runs@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + build_wheels: name: Build wheel on ${{ matrix.os }} runs-on: ${{ matrix.os }} From 4cf3f94d19b1cf2c8ac6def8ec5a027dcc5b87d3 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 10:49:07 +0200 Subject: [PATCH 50/91] Sphinx sidebar fix https://github.com/dmwyatt/sphinx-book-theme/blob/2416ef6cebc3d83019dbc83f25c61b72719cad55/docs/customize/sidebar-primary.md#default-sidebar-elements --- docs/source/conf.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 622638d292..f1545fdacd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -174,9 +174,6 @@ def system(cmd): extra_navbar = "

dsadsa

" -html_sidebars = { - "**": ["sbt-sidebar-footer.html", "sbt-sidebar-nav.html", "sidebar-search-bs.html"] -} html_logo = "_static/logo-grey.svg" html_favicon = "_static/vaex_alt.png" html_baseurl = "https://vaex.io/docs/" From eacef43a6d7cb5b794c21f244b51044727d01304 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:27:03 +0200 Subject: [PATCH 51/91] Remove autocancel, doesn't work from forks --- .github/workflows/pythonpackage.yml | 8 -------- .github/workflows/wheel-universal.yml | 8 -------- .github/workflows/wheel.yml | 8 -------- 3 files changed, 24 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 800b717a78..02f9feabdc 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -21,14 +21,6 @@ concurrency: cancel-in-progress: true jobs: - autocancel: - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - steps: - - uses: n1hility/cancel-previous-runs@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - main: env: CACHE_NUMBER_COMPILE: 6 diff --git a/.github/workflows/wheel-universal.yml b/.github/workflows/wheel-universal.yml index e063f292cd..0659f60bc5 100644 --- a/.github/workflows/wheel-universal.yml +++ b/.github/workflows/wheel-universal.yml @@ -11,14 +11,6 @@ on: - cron: "0 2 * * 1-5" jobs: - autocancel: - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - steps: - - uses: n1hility/cancel-previous-runs@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - build_wheels: name: Build wheel on ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index f804cb632b..bb3eb704c7 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -14,14 +14,6 @@ on: workflow_dispatch: # allows running workflow manually from the Actions tab jobs: - autocancel: - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - steps: - - uses: n1hility/cancel-previous-runs@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - build_wheels_matrix: runs-on: ubuntu-latest outputs: From 3fdd98e38eec912dfba06776dfb31ce88f32390e Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:34:37 +0200 Subject: [PATCH 52/91] Add cancel-in-progress keys --- .github/workflows/pythonpackage.yml | 2 +- .github/workflows/wheel-universal.yml | 4 ++++ .github/workflows/wheel.yml | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 02f9feabdc..e7e2abbf61 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -17,7 +17,7 @@ defaults: shell: bash -l {0} concurrency: - group: ${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} cancel-in-progress: true jobs: diff --git a/.github/workflows/wheel-universal.yml b/.github/workflows/wheel-universal.yml index 0659f60bc5..5edf56e4e3 100644 --- a/.github/workflows/wheel-universal.yml +++ b/.github/workflows/wheel-universal.yml @@ -10,6 +10,10 @@ on: schedule: - cron: "0 2 * * 1-5" +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + jobs: build_wheels: name: Build wheel on ${{ matrix.os }} diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index bb3eb704c7..ec8bb64cf2 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -13,6 +13,10 @@ on: types: [released, prereleased] workflow_dispatch: # allows running workflow manually from the Actions tab +concurrency: + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + cancel-in-progress: true + jobs: build_wheels_matrix: runs-on: ubuntu-latest From 8fb9b3eb76f81499fcd1b0efc0a0f6a143280988 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:46:07 +0200 Subject: [PATCH 53/91] Amend to only cancel on PRs --- .github/workflows/pythonpackage.yml | 2 +- .github/workflows/wheel-universal.yml | 2 +- .github/workflows/wheel.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index e7e2abbf61..2c7c878c9d 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -18,7 +18,7 @@ defaults: concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: main: diff --git a/.github/workflows/wheel-universal.yml b/.github/workflows/wheel-universal.yml index 5edf56e4e3..3be4f23408 100644 --- a/.github/workflows/wheel-universal.yml +++ b/.github/workflows/wheel-universal.yml @@ -12,7 +12,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build_wheels: diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index ec8bb64cf2..df1220e881 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -15,7 +15,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: build_wheels_matrix: From 7a78a231dde3b1b8b66ca2960056d60a911e52df Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:20:08 +0300 Subject: [PATCH 54/91] Add CIBW_TEST_COMMAND --- .github/workflows/wheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index df1220e881..db6db7bbfb 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -88,6 +88,7 @@ jobs: env: CIBW_BEFORE_BUILD: ${{ startswith(matrix.os, 'ubuntu') && 'bash bin/install_pcre.sh' || startswith(matrix.os, 'macos') && 'sudo -E bash bin/install_pcre.sh' || '' }} CIBW_BUILD_VERBOSITY: 2 + CIBW_TEST_COMMAND: python -c "import vaex; print(vaex.from_arrays(x=[1,2]))" CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'" From 1b58e089f5b108c566f889c66c2ccb26813478f0 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 5 Jul 2024 12:28:36 +0300 Subject: [PATCH 55/91] Disallow numpy v2 --- packages/vaex-core/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vaex-core/setup.py b/packages/vaex-core/setup.py index 6526084188..f6114bbdb7 100644 --- a/packages/vaex-core/setup.py +++ b/packages/vaex-core/setup.py @@ -26,7 +26,7 @@ # TODO: can we do without requests and progressbar2? # TODO: after python2 supports frops, future and futures can also be dropped # TODO: would be nice to have astropy only as dep in vaex-astro -install_requires_core = ["numpy>=1.16", "aplus", "tabulate>=0.8.3", +install_requires_core = ["numpy~=1.16", "aplus", "tabulate>=0.8.3", "future>=0.15.2", "pyyaml", "progressbar2", "requests", "six", "cloudpickle", "pandas", "dask!=2022.4.0", "nest-asyncio>=1.3.3", "pyarrow>=5.0.0", "frozendict!=2.2.0", From 4fc584da30ef1cdf7da929a48961633a222d4718 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 5 Jul 2024 13:30:46 +0300 Subject: [PATCH 56/91] Skip musllinux due to misding blake3 wheels --- .github/workflows/wheel.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index db6db7bbfb..d4d94cdb7f 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -35,13 +35,15 @@ jobs: - run: pip install cibuildwheel==2.17.0 # sync version with pypa/cibuildwheel below - id: set-matrix + env: + CIBW_SKIP: pp* *musllinux* run: | MATRIX_INCLUDE=$( { - cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ - && cibuildwheel --print-build-identifiers --platform macos --arch x86_64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-13"}' \ - && cibuildwheel --print-build-identifiers --platform macos --arch arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-14"}' \ - && cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' + cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch x86_64 | jq -nRc '{"only": inputs, "os": "macos-13"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch arm64 | jq -nRc '{"only": inputs, "os": "macos-14"}' \ + && cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc ) echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT From 3536f89a426eb4906788bea27e9beedbd1ebf790 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 5 Jul 2024 14:53:11 +0300 Subject: [PATCH 57/91] Install carco for blake3 source install --- .github/workflows/wheel.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index d4d94cdb7f..6ffdae53da 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -36,7 +36,7 @@ jobs: - id: set-matrix env: - CIBW_SKIP: pp* *musllinux* + CIBW_SKIP: pp* run: | MATRIX_INCLUDE=$( { @@ -90,6 +90,8 @@ jobs: env: CIBW_BEFORE_BUILD: ${{ startswith(matrix.os, 'ubuntu') && 'bash bin/install_pcre.sh' || startswith(matrix.os, 'macos') && 'sudo -E bash bin/install_pcre.sh' || '' }} CIBW_BUILD_VERBOSITY: 2 + CIBW_BEFORE_TEST: ${{ startswith(matrix.os, 'ubuntu') && 'curl https://sh.rustup.rs -sSf | sh -s -- -y' || '' }} + CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"' CIBW_TEST_COMMAND: python -c "import vaex; print(vaex.from_arrays(x=[1,2]))" CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 From 808a0deaff4728a1cdb3cdf9b0cd227626b128b0 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:19:18 +0300 Subject: [PATCH 58/91] Fix CIBW_ENVIRONMENT --- .github/workflows/wheel.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 6ffdae53da..3d0c3eb99c 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -91,12 +91,11 @@ jobs: CIBW_BEFORE_BUILD: ${{ startswith(matrix.os, 'ubuntu') && 'bash bin/install_pcre.sh' || startswith(matrix.os, 'macos') && 'sudo -E bash bin/install_pcre.sh' || '' }} CIBW_BUILD_VERBOSITY: 2 CIBW_BEFORE_TEST: ${{ startswith(matrix.os, 'ubuntu') && 'curl https://sh.rustup.rs -sSf | sh -s -- -y' || '' }} - CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"' CIBW_TEST_COMMAND: python -c "import vaex; print(vaex.from_arrays(x=[1,2]))" CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 - CIBW_ENVIRONMENT_LINUX: "CFLAGS='-Wl,-strip-all' CXXFLAGS='-Wl,-strip-all'" - CIBW_ENVIRONMENT_MACOS: "CFLAGS='-I/usr/local/include -L/usr/local/lib' CXXFLAGS='-I/usr/local/include -L/usr/local/lib' LDFLAGS='-L/usr/local/lib'" + CIBW_ENVIRONMENT_LINUX: 'CFLAGS="-Wl,-strip-all" CXXFLAGS="-Wl,-strip-all" PATH="$HOME/.cargo/bin:$PATH"' + CIBW_ENVIRONMENT_MACOS: 'CFLAGS="-I/usr/local/include -L/usr/local/lib" CXXFLAGS="-I/usr/local/include -L/usr/local/lib" LDFLAGS="-L/usr/local/lib"' - name: Upload release assets if: github.event_name == 'release' From 169a236b5025c1db6a379b0ecbcfea4211778118 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 5 Jul 2024 16:26:23 +0300 Subject: [PATCH 59/91] Add CIBW_TEST_SKIP --- .github/workflows/wheel.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 3d0c3eb99c..027c9f90b1 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -90,7 +90,11 @@ jobs: env: CIBW_BEFORE_BUILD: ${{ startswith(matrix.os, 'ubuntu') && 'bash bin/install_pcre.sh' || startswith(matrix.os, 'macos') && 'sudo -E bash bin/install_pcre.sh' || '' }} CIBW_BUILD_VERBOSITY: 2 + # cargo needed because of missing blake3 wheels (aarch64 and musllinux missing) + # cargo added to path in CIBW_ENVIRONMENT_LINUX below CIBW_BEFORE_TEST: ${{ startswith(matrix.os, 'ubuntu') && 'curl https://sh.rustup.rs -sSf | sh -s -- -y' || '' }} + # no test on musllinux due to missing pyarrow wheels ref https://github.com/apache/arrow/pull/40177 + CIBW_TEST_SKIP: '*musllinux*' CIBW_TEST_COMMAND: python -c "import vaex; print(vaex.from_arrays(x=[1,2]))" CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 From 735c319557f1819a82b33d3a12fc8c48c919c442 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 5 Jul 2024 16:42:11 +0300 Subject: [PATCH 60/91] Build wheels with numpy v1 --- packages/vaex-core/setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/vaex-core/setup.py b/packages/vaex-core/setup.py index f6114bbdb7..cba3be7472 100644 --- a/packages/vaex-core/setup.py +++ b/packages/vaex-core/setup.py @@ -26,6 +26,7 @@ # TODO: can we do without requests and progressbar2? # TODO: after python2 supports frops, future and futures can also be dropped # TODO: would be nice to have astropy only as dep in vaex-astro +setup_requires = ["numpy~=1.16"] install_requires_core = ["numpy~=1.16", "aplus", "tabulate>=0.8.3", "future>=0.15.2", "pyyaml", "progressbar2", "requests", "six", "cloudpickle", "pandas", "dask!=2022.4.0", @@ -175,7 +176,7 @@ def __str__(self): url=url, author=author, author_email=author_email, - setup_requires=['numpy'], + setup_requires=setup_requires, install_requires=install_requires_core, license=license, package_data={'vaex': dll_files + ['test/files/*.fits', 'test/files/*.vot', 'test/files/*.hdf5']}, From f371ba7f1320dee6255463dc87a1567da3e6d351 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Sun, 7 Jul 2024 12:44:18 +0200 Subject: [PATCH 61/91] run tests on 3.10-3.12 --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 2c7c878c9d..4bf1c90d93 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -31,7 +31,7 @@ jobs: max-parallel: 12 matrix: os: [ubuntu-latest, windows-latest, macOS-12] - python-version: [3.8, 3.9] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] steps: - name: disk space From 777b0bfc7d0a397e3d0b408424ac1a67c2169cf3 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Sun, 7 Jul 2024 12:54:52 +0200 Subject: [PATCH 62/91] upgrade micromamba --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 4bf1c90d93..3c33bfa942 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -55,7 +55,7 @@ jobs: - name: install micromamba uses: mamba-org/setup-micromamba@v1 with: - micromamba-version: 1.1.0-1 + micromamba-version: 1.5.8-0 environment-name: vaex-dev environment-file: ci/conda-env.yml create-args: >- From 5b9d775ada9da93df0aaa57ec068b1e2235493fc Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Sun, 7 Jul 2024 13:34:22 +0200 Subject: [PATCH 63/91] unpin pytest-asyncio --- ci/conda-env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/conda-env.yml b/ci/conda-env.yml index 845b9f3088..348cf51f0b 100644 --- a/ci/conda-env.yml +++ b/ci/conda-env.yml @@ -34,7 +34,7 @@ dependencies: - pyarrow>=5.0.0 - pyqt - pytest -- pytest-asyncio<0.14 +- pytest-asyncio - pytest-mpl - pytest-timeout - python-graphviz From 6ea1171036c1a2c332ea567cdf8fd0d1ade9fb93 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Tue, 16 Jul 2024 12:17:57 +0200 Subject: [PATCH 64/91] try different pin as <2.0 because mamba crashes on that --- ci/conda-env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/conda-env.yml b/ci/conda-env.yml index 348cf51f0b..10b0f18fca 100644 --- a/ci/conda-env.yml +++ b/ci/conda-env.yml @@ -25,7 +25,7 @@ dependencies: - nest-asyncio<1.5.2 - notebook - numba -- numpy<1.21 +- numpy<1.26.4 - pandas - pcre - pip==20.3.4 From 04828873670143b15a4e761b7858f8c6bb614f89 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:59:12 +0300 Subject: [PATCH 65/91] Fix dephell and CI hell (ddelange#3) --- .github/workflows/pythonpackage.yml | 216 +++---------- .github/workflows/wheel-universal.yml | 2 +- .readthedocs.yaml | 5 +- .releash.py | 6 +- asv.conf.json | 105 ------ ci/04-run-test-suite.sh | 21 +- ci/conda-base-minimal.yml | 7 - ci/conda-env-extra.yml | 1 - ci/conda-env-nightlies.yml | 1 - ci/conda-env-notebooks.yml | 2 - ci/conda-env.yml | 58 ---- dodo.py | 4 +- misc/conda/aplus/bld.bat | 8 - misc/conda/aplus/build.sh | 9 - misc/conda/aplus/meta.yaml | 60 ---- misc/conda/attrdict/bld.bat | 8 - misc/conda/attrdict/build.sh | 9 - misc/conda/attrdict/meta.yaml | 65 ---- misc/conda/cachetools/bld.bat | 8 - misc/conda/cachetools/build.sh | 9 - misc/conda/cachetools/meta.yaml | 61 ---- misc/conda/jprops/bld.bat | 8 - misc/conda/jprops/build.sh | 9 - misc/conda/jprops/meta.yaml | 60 ---- misc/conda/kapteyn/bld.bat | 8 - misc/conda/kapteyn/build.sh | 9 - misc/conda/kapteyn/meta.yaml | 64 ---- misc/conda/layeredconfig/bld.bat | 8 - misc/conda/layeredconfig/build.sh | 9 - misc/conda/layeredconfig/meta.yaml | 65 ---- misc/conda/progressbar2/bld.bat | 8 - misc/conda/progressbar2/build.sh | 9 - misc/conda/progressbar2/meta.yaml | 61 ---- misc/conda/vaex/bld.bat | 8 - misc/conda/vaex/build.sh | 9 - misc/conda/vaex/meta.yaml | 117 ------- packages/vaex-astro/setup.py | 2 +- packages/vaex-contrib/setup.py | 4 +- packages/vaex-core/setup.py | 306 +++++++++++------- packages/vaex-core/vaex/functions.py | 2 +- packages/vaex-graphql/setup.py | 2 +- packages/vaex-hdf5/setup.py | 2 +- packages/vaex-jupyter/setup.py | 2 +- packages/vaex-ml/setup.py | 15 +- packages/vaex-ml/vaex/ml/tensorflow.py | 18 +- packages/vaex-ml/vaex/ml/transformations.py | 2 +- packages/vaex-server/setup.py | 2 +- packages/vaex-ui/setup.py | 2 +- packages/{vaex-meta => vaex}/LICENSE.txt | 0 packages/{vaex-meta => vaex}/MANIFEST.in | 0 packages/{vaex-meta => vaex}/README.md | 0 packages/{vaex-meta => vaex}/setup.py | 0 .../{vaex-meta => vaex}/vaex/meta/__init__.py | 0 .../{vaex-meta => vaex}/vaex/meta/_version.py | 0 requirements-ml.txt | 7 - requirements_rtd.txt | 28 -- setup.py | 118 +++---- tests/agg_test.py | 4 +- tests/datetime_test.py | 2 +- tests/export_test.py | 4 +- tests/from_pandas_test.py | 2 +- tests/ml/tensorflow_test.py | 2 +- tests/strings_test.py | 6 +- 63 files changed, 342 insertions(+), 1307 deletions(-) delete mode 100644 asv.conf.json delete mode 100644 ci/conda-base-minimal.yml delete mode 100644 ci/conda-env-extra.yml delete mode 100644 ci/conda-env-nightlies.yml delete mode 100644 ci/conda-env-notebooks.yml delete mode 100644 ci/conda-env.yml delete mode 100644 misc/conda/aplus/bld.bat delete mode 100644 misc/conda/aplus/build.sh delete mode 100644 misc/conda/aplus/meta.yaml delete mode 100644 misc/conda/attrdict/bld.bat delete mode 100644 misc/conda/attrdict/build.sh delete mode 100644 misc/conda/attrdict/meta.yaml delete mode 100644 misc/conda/cachetools/bld.bat delete mode 100644 misc/conda/cachetools/build.sh delete mode 100644 misc/conda/cachetools/meta.yaml delete mode 100644 misc/conda/jprops/bld.bat delete mode 100644 misc/conda/jprops/build.sh delete mode 100644 misc/conda/jprops/meta.yaml delete mode 100644 misc/conda/kapteyn/bld.bat delete mode 100644 misc/conda/kapteyn/build.sh delete mode 100644 misc/conda/kapteyn/meta.yaml delete mode 100644 misc/conda/layeredconfig/bld.bat delete mode 100644 misc/conda/layeredconfig/build.sh delete mode 100644 misc/conda/layeredconfig/meta.yaml delete mode 100644 misc/conda/progressbar2/bld.bat delete mode 100644 misc/conda/progressbar2/build.sh delete mode 100644 misc/conda/progressbar2/meta.yaml delete mode 100644 misc/conda/vaex/bld.bat delete mode 100644 misc/conda/vaex/build.sh delete mode 100644 misc/conda/vaex/meta.yaml rename packages/{vaex-meta => vaex}/LICENSE.txt (100%) rename packages/{vaex-meta => vaex}/MANIFEST.in (100%) rename packages/{vaex-meta => vaex}/README.md (100%) rename packages/{vaex-meta => vaex}/setup.py (100%) rename packages/{vaex-meta => vaex}/vaex/meta/__init__.py (100%) rename packages/{vaex-meta => vaex}/vaex/meta/_version.py (100%) delete mode 100644 requirements-ml.txt delete mode 100644 requirements_rtd.txt diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 3c33bfa942..c1e6627e0b 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -5,104 +5,64 @@ on: branches: - master pull_request: - branches: - - master - - docs schedule: - cron: "0 2 * * 1-5" -# to make bash use ~/.bashrc, see https://github.com/marketplace/actions/setup-miniconda#example-5-custom-installer -defaults: - run: - shell: bash -l {0} - concurrency: group: ${{ github.workflow }}-${{ github.ref || github.run_id }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} +defaults: + run: + shell: bash + jobs: main: - env: - CACHE_NUMBER_COMPILE: 6 - MAMBA_ROOT_PREFIX: /dev/shm/mambaroot runs-on: ${{ matrix.os }} strategy: fail-fast: false - max-parallel: 12 matrix: - os: [ubuntu-latest, windows-latest, macOS-12] - python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] + os: [ubuntu-latest, windows-latest, macos-13] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - name: disk space - if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }} - run: | - df -h - - uses: maxim-lobanov/setup-xcode@v1 - # alternative would be to upgrade tapi to 1100.0.11, we can possibly remove this in the future - if: matrix.os == 'macOS-12' - with: - xcode-version: "13.2.1" - uses: actions/checkout@v2 with: submodules: true - - uses: actions/checkout@v2 - if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }} - with: - repository: vaexio/vaex-enterprise - token: ${{ secrets.PAT_PULL_ENTERPRISE }} - path: vaex-enterprise - - name: install micromamba - uses: mamba-org/setup-micromamba@v1 + + - uses: actions/setup-python@v5 with: - micromamba-version: 1.5.8-0 - environment-name: vaex-dev - environment-file: ci/conda-env.yml - create-args: >- - python=${{ matrix.python-version }} - - name: Extra non-windows installs + python-version: ${{ matrix.python-version }} + + - run: python -m pip install --upgrade pip setuptools wheel uv + + # - uses: actions/checkout@v2 + # if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }} + # with: + # repository: vaexio/vaex-enterprise + # token: ${{ secrets.PAT_PULL_ENTERPRISE }} + # path: vaex-enterprise + + - name: Setup Graphviz + uses: ts-graphviz/setup-graphviz@v2 + + - name: Setup PCRE (Nix-only) if: matrix.os != 'windows-latest' - run: | - echo "not needed for now" - # - name: Extra windows installs - # if: matrix.os == 'windows-latest' - # run: | - # # not sure why, but the conda env is strange (old dask) if we put this constraint in the conda solver - # # also might solve scipy issues - # micromamba update scipy ipython dask - # micromamba install scipy=1.7.1 - # - name: free disk space - # if: matrix.os == 'ubuntu-latest' - # run: | - # sudo swapoff -a - # sudo rm -f /swapfile - # sudo apt clean - # docker rmi $(docker image ls -aq) - # df -h + run: sudo -E bash bin/install_pcre.sh + - name: Install OpenMP runtime (Mac-only) - if: matrix.os == 'macOS-12' - run: | - brew install libomp - - name: Cache compiled binaries - # this fails for this combination, leading to binaries filled with 0's - if: matrix.os != 'macOS-12' - id: cache-compiled-binaries - uses: actions/cache@v2 - with: - path: | - packages/vaex-core/build/lib*/vaex/vaexfast* - packages/vaex-core/build/lib*/vaex/super* - key: ${{ runner.OS }}-${{ matrix.python-version }}-${{ hashFiles('packages/vaex-core/src/*') }}-${{ env.CACHE_NUMBER_COMPILE }} - - name: Fix cache timestamp - run: | - touch packages/vaex-core/build/lib*/vaex/vaexfast* || echo "ok to fail" - touch packages/vaex-core/build/lib*/vaex/super* || echo "ok to fail" - ls -alh packages/vaex-core/build/lib*/vaex/ || echo "ok to fail" + if: startswith(matrix.os, 'macos') + run: brew install libomp + + - name: Copy dll (Windows-only) + if: (matrix.os == 'windows-latest') + uses: ./ci/actions/windll + - name: Install vaex - run: | - pip install myst_parser - pip install -e . -v - # ./ci/03-install-vaex.sh micromamba + run: uv pip install -v --system .[ci] + + - run: uv pip freeze + # - name: Install vaex-enterprise # if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }} # run: | @@ -110,26 +70,7 @@ jobs: # micromamba install -c conda-forge distributed # pip install ray # pip install -e . - - name: Copy dll - if: (matrix.os == 'windows-latest') - uses: ./ci/actions/windll - - name: Build Python packages - run: | - mkdir dist - (cd packages/vaex-core && python setup.py bdist_wheel); cp packages/vaex-core/dist/* dist - (cd packages/vaex-graphql && python setup.py bdist_wheel); cp packages/vaex-graphql/dist/* dist - (cd packages/vaex-jupyter && python setup.py bdist_wheel); cp packages/vaex-jupyter/dist/* dist - (cd packages/vaex-ml && python setup.py bdist_wheel); cp packages/vaex-ml/dist/* dist - (cd packages/vaex-viz && python setup.py bdist_wheel); cp packages/vaex-viz/dist/* dist - (cd packages/vaex-astro && python setup.py bdist_wheel); cp packages/vaex-astro/dist/* dist - (cd packages/vaex-hdf5 && python setup.py bdist_wheel); cp packages/vaex-hdf5/dist/* dist - (cd packages/vaex-server && python setup.py bdist_wheel); cp packages/vaex-server/dist/* dist - (cd packages/vaex-meta && python setup.py bdist_wheel); cp packages/vaex-server/dist/* dist - - name: Upload builds - uses: actions/upload-artifact@v2 - with: - name: dist-${{ github.run_number }}-${{ matrix.python-version }}-${{ matrix.os }} - path: ./dist + # - name: Lint with flake8 # run: | # echo "soon" @@ -138,32 +79,30 @@ jobs: # # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Install pytest-asyncio correct version - if: matrix.python-version != '3.10' - run: | - # 3.10 doesn't seem to work - pip install "pytest-asyncio<0.14" + - name: Test with pytest run: | ./ci/04-run-test-suite.sh + - name: Test with pytest (with cache on) - if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' run: | VAEX_CACHE_RESULTS=1 ./ci/04-run-test-suite.sh + - name: Check ml spec - # no catboost for py39 and py37, xgboost fails on 3.6 - if: matrix.python-version != '3.9' && matrix.os != 'windows-latest' run: | python -m vaex.ml.spec packages/vaex-ml/vaex/ml/spec_new.json diff packages/vaex-ml/vaex/ml/spec_new.json packages/vaex-ml/vaex/ml/spec.json + # - name: Test with pytest (vaex-enterprise) # if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os == 'ubuntu-latest') }} # run: | # py.test vaex-enterprise/tests --timeout=1000 + - name: Test notebooks if: matrix.os != 'windows-latest' - run: | - ./ci/05-run-notebooks.sh + run: ./ci/05-run-notebooks.sh + - name: Authenticate Google Cloud Platform if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && !((matrix.os == 'windows-latest')) }} uses: google-github-actions/setup-gcloud@v0 @@ -171,74 +110,17 @@ jobs: project_id: ${{ secrets.GCP_PROJECT_ID_VAEX }} service_account_key: ${{ secrets.GCP_SA_KEY_VAEX }} export_default_credentials: true + - name: Test vaex-contrib # do not run in a PR from someone else, skip windows - if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && !((matrix.os == 'windows-latest')) }} + if: ${{ (github.event.pull_request.head.repo.full_name == 'vaexio/vaex') && (matrix.os != 'windows-latest') }} env: PROJECT_ID: ${{ secrets.GCP_PROJECT_ID_VAEX }} - run: | - pip install -e 'packages/vaex-contrib[gcp]' - ./ci/06-run-contrib-tests.sh - - install: - runs-on: ${{ matrix.os }} - needs: [main] - - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macOS-12] - python-version: [3.8, 3.9] - - steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 - with: - name: dist-${{ github.run_number }}-${{ matrix.python-version }}-${{ matrix.os }} - path: ./dist - - - name: Install micromamba - uses: mamba-org/setup-micromamba@v1 - with: - micromamba-version: 1.5.6-0 - environment-name: vaex-test - environment-file: ci/conda-base-minimal.yml - create-args: >- - python=${{ matrix.python-version }} - pcre - rich - # it shouldn't be needed to use pcre, maybe we should make the wheels similar to how we make distributions - - name: Cache pip - uses: actions/cache@v2 - env: - # Increase this value to reset cache - CACHE_NUMBER: 0 - with: - path: | - ~/.cache/pip - key: - pip-${{ runner.os }}-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }} - - - name: Install core packages - run: | - pip install -vv dist/vaex*core* dist/vaex*hdf5* - - - name: Test core import - run: | - python -c "import vaex; df = vaex.example()" - - - name: Install all packages - run: | - pip install -vv dist/* - - - name: Test import - run: | - python -c "import vaex; df = vaex.example()" + run: ./ci/06-run-contrib-tests.sh - name: Test comand line run: | vaex convert ~/.vaex/data/helmi-dezeeuw-2000-FeH-v2-10percent.hdf5 test.parquet - pip install rich VAEX_PROGRESS_TYPE=rich vaex convert ~/.vaex/data/helmi-dezeeuw-2000-FeH-v2-10percent.hdf5 test.parquet vaex settings yaml vaex settings md @@ -246,7 +128,7 @@ jobs: - name: Test server if: matrix.os != 'windows-latest' run: | - vaex server --add-example --port 9999& + vaex server --add-example --port 9999 & - name: Wait for Vaex server if: matrix.os != 'windows-latest' diff --git a/.github/workflows/wheel-universal.yml b/.github/workflows/wheel-universal.yml index 3be4f23408..48fb563c30 100644 --- a/.github/workflows/wheel-universal.yml +++ b/.github/workflows/wheel-universal.yml @@ -43,7 +43,7 @@ jobs: - name: Build vaex (meta) run: | - (cp README.md packages/vaex-meta/ && cd packages/vaex-meta && python setup.py sdist bdist_wheel); cp packages/vaex-meta/dist/* dist + (cp README.md packages/vaex/ && cd packages/vaex && python setup.py sdist bdist_wheel); cp packages/vaex/dist/* dist - name: Publish a Python distribution to PyPI if: startsWith(github.ref, 'refs/tags/meta') diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 471f074fe8..4341992e1f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -33,4 +33,7 @@ submodules: # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: install: - - requirements: requirements_rtd.txt + - method: pip + path: . + extra_requirements: + - ci diff --git a/.releash.py b/.releash.py index 1aa9745f3e..5d52b0c6b9 100644 --- a/.releash.py +++ b/.releash.py @@ -10,7 +10,7 @@ core.version_source = version_core core.version_targets.append(VersionTarget(core, '{path}/vaex/core/_version.py')) core.version_targets.append(VersionTargetReplace(core, [ - 'packages/vaex-meta/setup.py', + 'packages/vaex/setup.py', ])) @@ -32,7 +32,7 @@ def add_version_replace(package): def add_meta_version_replace(package): # always bump the meta package package.version_targets.append(VersionTargetReplace(package, [ - 'packages/vaex-meta/setup.py', + 'packages/vaex/setup.py', ], pattern='{name}(?P[^0-9]*)' + str(package.version_source), )) add_version_replace(core) @@ -43,7 +43,7 @@ def add_meta_version_replace(package): #core.release_targets.append(gitpush) core.release_targets.append(ReleaseTargetCondaForge(core, '../feedstocks/vaex-core-feedstock')) -packages = ['vaex-core', 'vaex-meta', 'vaex-viz', 'vaex-hdf5', 'vaex-server', 'vaex-astro', 'vaex-jupyter', 'vaex-ml', 'vaex-graphql', 'vaex-contrib'] +packages = ['vaex-core', 'vaex', 'vaex-viz', 'vaex-hdf5', 'vaex-server', 'vaex-astro', 'vaex-jupyter', 'vaex-ml', 'vaex-graphql', 'vaex-contrib'] names = [k[5:] for k in packages[1:]] for name in names: diff --git a/asv.conf.json b/asv.conf.json deleted file mode 100644 index c0496bfffc..0000000000 --- a/asv.conf.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "version": 1, - "project": "vaex", - "project_url": "https://vaex.io/", - "repo": ".", - "environment_type": "conda", - "show_commit_url": "http://github.com/vaexio/vaex/commit/", - "env_dir": ".asv/env", - "results_dir": ".asv/results", - "html_dir": ".asv/html", - "conda_channels": [ - "conda-forge", - "defaults" - ], - "pythons": [ - "3.7" - ], - "matrix": { - "setuptools": [ - "42.0.2" - ], - "certifi": [ - "2019.6.16" - ], - "pip": [], - "numpy": [], - "scipy": [], - "pyqt": [], - "matplotlib": [], - "pyopengl": [], - "h5py": [], - "numexpr": [], - "astropy": [], - "tornado": [], - "cython": [], - "runipy": [], - "pandas": [], - "pytest": [], - "numba": [], - "pyarrow": [ - "0.15.1" - ], - "graphviz": [], - "python-graphviz": [], - "pcre": [], - "catboost": [], - "libcxx": [ - "9.0.0" - ], - "notebook": [], - "scikit-learn": [], - "lightgbm": [], - "py-xgboost": [], - "bqplot": [ - "0.12.6" - ], - "ipyleaflet": [ - "0.12.3" - ], - "ipympl": [ - "0.5.6" - ], - "ipyvolume": [ - "0.5.2" - ], - "graphene": [ - "2.1.8" - ], - "graphene-tornado": [ - "2.6.1" - ], - "pip+python-dateutil": [ - "2.8.0" - ], - "pip+aplus": [], - "pip+futures": [ - "3.1.1" - ], - "pip+future": [ - "0.18.2" - ], - "pip+pyyaml": [], - "pip+cachetools": [], - "pip+progressbar2": [], - "pip+psutil": [ - "5.6.7" - ], - "pip+pillow": [], - "pip+requests": [], - "pip+s3fs": [ - "0.2.2" - ], - "pip+ipyvuetify": [] - }, - "install_timeout": 1800, - "install_command": [ - "in-dir={env_dir} python -mpip install {wheel_file}", - "in-dir={env_dir} pip install {build_dir} --verbose" - ], - "build_command": [ - "in-dir={build_dir}/packages/vaex-core python setup.py build", - "PIP_NO_BUILD_ISOLATION=false python -mpip wheel --no-deps --no-index -w {build_cache_dir} {build_dir}/packages/vaex-core" - ], - "build_cache_size": 5 -} diff --git a/ci/04-run-test-suite.sh b/ci/04-run-test-suite.sh index 504d1a5a13..0c0e90efa2 100755 --- a/ci/04-run-test-suite.sh +++ b/ci/04-run-test-suite.sh @@ -3,17 +3,16 @@ set -e if [ -f ${HOME}/.bashrc ]; then source ${HOME}/.bashrc -else +elif [ -f ${HOME}/.bash_profile ]; then source ${HOME}/.bash_profile fi export VAEX_SERVER_OVERRIDE='{"dataframe.vaex.io":"dataframe-dev.vaex.io"}' -pytest tests\ - packages/vaex-core/vaex/datatype_test.py\ - packages/vaex-core/vaex/file/\ - packages/vaex-core/vaex/test/dataset.py::TestDataset\ - --doctest-modules\ - packages/vaex-core/vaex/datatype.py\ - packages/vaex-core/vaex/utils.py\ - packages/vaex-core/vaex/struct.py\ - packages/vaex-core/vaex/groupby.py\ - --timeout=1000 +python -m pytest --pyargs --doctest-modules --timeout=1000\ + tests\ + vaex.datatype_test\ + vaex.file\ + vaex.test.dataset::TestDataset\ + vaex.datatype\ + vaex.utils\ + vaex.struct\ + vaex.groupby diff --git a/ci/conda-base-minimal.yml b/ci/conda-base-minimal.yml deleted file mode 100644 index d80a0e2f94..0000000000 --- a/ci/conda-base-minimal.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: vaex-dev -channels: - - conda-forge -dependencies: -- numpy<1.21 -- pandas -- scipy diff --git a/ci/conda-env-extra.yml b/ci/conda-env-extra.yml deleted file mode 100644 index d8e29b3e7f..0000000000 --- a/ci/conda-env-extra.yml +++ /dev/null @@ -1 +0,0 @@ -catboost diff --git a/ci/conda-env-nightlies.yml b/ci/conda-env-nightlies.yml deleted file mode 100644 index 19d8363071..0000000000 --- a/ci/conda-env-nightlies.yml +++ /dev/null @@ -1 +0,0 @@ -pyarrow diff --git a/ci/conda-env-notebooks.yml b/ci/conda-env-notebooks.yml deleted file mode 100644 index 66c0b11ef2..0000000000 --- a/ci/conda-env-notebooks.yml +++ /dev/null @@ -1,2 +0,0 @@ -plotly -ipyvolume==0.6.0a6 diff --git a/ci/conda-env.yml b/ci/conda-env.yml deleted file mode 100644 index 10b0f18fca..0000000000 --- a/ci/conda-env.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: vaex-dev -channels: - - msys2 - - conda-forge - - numba/label/dev -dependencies: -- aplus -- astropy -- blake3 -- cython -- cachetools -- catboost -- dask<2024.2.0 -- diskcache -- filelock -- fsspec<2022.2.0 -- gcsfs -- geopandas -- graphviz -- joblib<1.3 # 1.3 is broken for py36 -- h5py -- httpx # for testing with starlette/fastapi -- ipyvolume=0.6.0a6 -- matplotlib-base -- nest-asyncio<1.5.2 -- notebook -- numba -- numpy<1.26.4 -- pandas -- pcre -- pip==20.3.4 -- plotly -- python-annoy -- pyarrow>=5.0.0 -- pyqt -- pytest -- pytest-asyncio -- pytest-mpl -- pytest-timeout -- python-graphviz -- py-xgboost -- pyyaml -- rich -- s3fs>=2021.8.0 -- scikit-learn -- scipy -- tabulate -- tornado -- uvicorn<0.16 -- xarray<2022.6.0 -# currently not using this, since the test that requires this is flakey -# - myst-parser<0.18 # 0.18 breaks our test, missing main -- pytz # for some reason, pip has trouble resolving this, and the libraries below -- python-utils -- progressbar2 -- zipp<3.16.0 -- pip: - - lightgbm>=4.0.0 \ No newline at end of file diff --git a/dodo.py b/dodo.py index 2dccf0c355..7e71a921e4 100644 --- a/dodo.py +++ b/dodo.py @@ -23,7 +23,7 @@ def action(targets): return { 'actions': [action], 'targets': ["binder/requirements.txt"], - 'file_dep': ['packages/vaex-meta/vaex/meta/_version.py'] + 'file_dep': ['packages/vaex/vaex/meta/_version.py'] } @@ -35,6 +35,6 @@ def action(targets): return { 'actions': [action], - 'targets': ["packages/vaex-meta/README.md"], + 'targets': ["packages/vaex/README.md"], 'file_dep': ['README.md'] } diff --git a/misc/conda/aplus/bld.bat b/misc/conda/aplus/bld.bat deleted file mode 100644 index 87b1481d74..0000000000 --- a/misc/conda/aplus/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/misc/conda/aplus/build.sh b/misc/conda/aplus/build.sh deleted file mode 100644 index 4d7fc032b8..0000000000 --- a/misc/conda/aplus/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/misc/conda/aplus/meta.yaml b/misc/conda/aplus/meta.yaml deleted file mode 100644 index 66682292f2..0000000000 --- a/misc/conda/aplus/meta.yaml +++ /dev/null @@ -1,60 +0,0 @@ -package: - name: aplus - version: "0.11.0" - -source: - fn: aplus-0.11.0.tar.gz - url: https://files.pythonhosted.org/packages/9a/25/58f13028bc43c2d219e32402995275ed577cb02da7e43876a4020727c66a/aplus-0.11.0.tar.gz - md5: cb3009b753154aea6bbf3c6088b2a509 -# patches: - # List any patch files here - # - fix.patch - -# build: - # noarch_python: True - # preserve_egg_dir: True - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - aplus = aplus:main - # - # Would create an entry point called aplus that calls aplus.main() - - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - run: - - python - -test: - # Python imports - imports: - - aplus - - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - #home: The package home page - license: UNKNOWN - summary: 'UNKNOWN' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/misc/conda/attrdict/bld.bat b/misc/conda/attrdict/bld.bat deleted file mode 100644 index 87b1481d74..0000000000 --- a/misc/conda/attrdict/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/misc/conda/attrdict/build.sh b/misc/conda/attrdict/build.sh deleted file mode 100644 index 4d7fc032b8..0000000000 --- a/misc/conda/attrdict/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/misc/conda/attrdict/meta.yaml b/misc/conda/attrdict/meta.yaml deleted file mode 100644 index 09ad147433..0000000000 --- a/misc/conda/attrdict/meta.yaml +++ /dev/null @@ -1,65 +0,0 @@ -package: - name: attrdict - version: "2.0.0" - -source: - fn: attrdict-2.0.0.tar.gz - url: https://files.pythonhosted.org/packages/35/bb/bac3e42ae04bc082c28cd8186bfb5b50fb240a4f7419f876c683125ccc8b/attrdict-2.0.0.tar.gz - md5: 8a7c1a4e737fe9e2b2b8844c0f7746f8 -# patches: - # List any patch files here - # - fix.patch - -# build: - # noarch_python: True - # preserve_egg_dir: True - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - attrdict = attrdict:main - # - # Would create an entry point called attrdict that calls attrdict.main() - - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - setuptools - - six - - run: - - python - - six - -test: - # Python imports - imports: - - attrdict - - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - requires: - - coverage - - nose >=1.0 - # Put any additional test requirements here. For example - # - nose - -about: - home: https://github.com/bcj/AttrDict - license: MIT License - summary: 'A dict with attribute-style access' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/misc/conda/cachetools/bld.bat b/misc/conda/cachetools/bld.bat deleted file mode 100644 index 87b1481d74..0000000000 --- a/misc/conda/cachetools/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/misc/conda/cachetools/build.sh b/misc/conda/cachetools/build.sh deleted file mode 100644 index 4d7fc032b8..0000000000 --- a/misc/conda/cachetools/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/misc/conda/cachetools/meta.yaml b/misc/conda/cachetools/meta.yaml deleted file mode 100644 index f4520bc9d2..0000000000 --- a/misc/conda/cachetools/meta.yaml +++ /dev/null @@ -1,61 +0,0 @@ -package: - name: cachetools - version: "1.1.6" - -source: - fn: cachetools-1.1.6.tar.gz - url: https://files.pythonhosted.org/packages/ba/00/b0ec69e21142cd838b2383a7881cf18368e35847cb66f908c8f25bcbaafc/cachetools-1.1.6.tar.gz - md5: 387d7f34effd9335ae55bd0762e77bfa -# patches: - # List any patch files here - # - fix.patch - -# build: - # noarch_python: True - # preserve_egg_dir: True - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - cachetools = cachetools:main - # - # Would create an entry point called cachetools that calls cachetools.main() - - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - setuptools - - run: - - python - -test: - # Python imports - imports: - - cachetools - - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - home: https://github.com/tkem/cachetools - license: MIT License - summary: 'Extensible memoizing collections and decorators' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/misc/conda/jprops/bld.bat b/misc/conda/jprops/bld.bat deleted file mode 100644 index 87b1481d74..0000000000 --- a/misc/conda/jprops/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/misc/conda/jprops/build.sh b/misc/conda/jprops/build.sh deleted file mode 100644 index 4d7fc032b8..0000000000 --- a/misc/conda/jprops/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/misc/conda/jprops/meta.yaml b/misc/conda/jprops/meta.yaml deleted file mode 100644 index f868524422..0000000000 --- a/misc/conda/jprops/meta.yaml +++ /dev/null @@ -1,60 +0,0 @@ -package: - name: jprops - version: "1.0" - -source: - fn: jprops-1.0.tar.gz - url: https://files.pythonhosted.org/packages/1f/57/42e0088e3607b2d157bb039ba5c19536010f3d505871573cb28020e1e1d6/jprops-1.0.tar.gz - md5: d150084738d03d8046418a0f79879821 -# patches: - # List any patch files here - # - fix.patch - -# build: - # noarch_python: True - # preserve_egg_dir: True - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - jprops = jprops:main - # - # Would create an entry point called jprops that calls jprops.main() - - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - setuptools - - run: - - python - -# test: - # Python imports - # imports: - - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - home: http://mgood.github.com/jprops/ - license: BSD - summary: 'Parser for Java .properties files' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/misc/conda/kapteyn/bld.bat b/misc/conda/kapteyn/bld.bat deleted file mode 100644 index 87b1481d74..0000000000 --- a/misc/conda/kapteyn/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/misc/conda/kapteyn/build.sh b/misc/conda/kapteyn/build.sh deleted file mode 100644 index 4d7fc032b8..0000000000 --- a/misc/conda/kapteyn/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/misc/conda/kapteyn/meta.yaml b/misc/conda/kapteyn/meta.yaml deleted file mode 100644 index 03e176960e..0000000000 --- a/misc/conda/kapteyn/meta.yaml +++ /dev/null @@ -1,64 +0,0 @@ -package: - name: kapteyn - version: "2.3" - -source: - fn: kapteyn-2.3.tar.gz - url: https://files.pythonhosted.org/packages/0a/c3/4ceffdeb87918ade3dc9649e100d3b0be0fdc38b5105324b17686a3e0e48/kapteyn-2.3.tar.gz - md5: 9abb373995d1b683936c48485a41c2b4 -# patches: - # List any patch files here - # - fix.patch - -# build: - # noarch_python: True - # preserve_egg_dir: True - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - kapteyn = kapteyn:main - # - # Would create an entry point called kapteyn that calls kapteyn.main() - - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - setuptools - - six - - numpy - - cython - run: - - python - - numpy - - six -test: - # Python imports - imports: - - kapteyn - - kapteyn.wcs - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - home: http://www.astro.rug.nl/software/kapteyn/ - license: BSD License or GNU Library or Lesser General Public License (LGPL) - summary: 'Kapteyn Package: Python modules for astronomical applications' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/misc/conda/layeredconfig/bld.bat b/misc/conda/layeredconfig/bld.bat deleted file mode 100644 index 87b1481d74..0000000000 --- a/misc/conda/layeredconfig/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/misc/conda/layeredconfig/build.sh b/misc/conda/layeredconfig/build.sh deleted file mode 100644 index 4d7fc032b8..0000000000 --- a/misc/conda/layeredconfig/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/misc/conda/layeredconfig/meta.yaml b/misc/conda/layeredconfig/meta.yaml deleted file mode 100644 index 6bbaefb55c..0000000000 --- a/misc/conda/layeredconfig/meta.yaml +++ /dev/null @@ -1,65 +0,0 @@ -package: - name: layeredconfig - version: "0.1.0" - -source: - fn: layeredconfig-0.1.0.tar.gz - url: https://files.pythonhosted.org/packages/d8/a3/9818f77bda2e9c1a490f353d6f9bd5a1d301e20c7b7172600b0a69829291/layeredconfig-0.1.0.tar.gz - md5: c19b10f505fa39f4656ac64072c5619d -# patches: - # List any patch files here - # - fix.patch - -# build: - # noarch_python: True - # preserve_egg_dir: True - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - layeredconfig = layeredconfig:main - # - # Would create an entry point called layeredconfig that calls layeredconfig.main() - - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - setuptools - - six - - pyyaml - - run: - - python - - six - - pyyaml - - requests -test: - # Python imports - imports: - - layeredconfig - - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - home: https://github.com/staffanm/layeredconfig - license: BSD License - summary: 'Manages configuration coming from config files, environment variables, command line arguments, code defaults or other sources' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/misc/conda/progressbar2/bld.bat b/misc/conda/progressbar2/bld.bat deleted file mode 100644 index 87b1481d74..0000000000 --- a/misc/conda/progressbar2/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/misc/conda/progressbar2/build.sh b/misc/conda/progressbar2/build.sh deleted file mode 100644 index 4d7fc032b8..0000000000 --- a/misc/conda/progressbar2/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/misc/conda/progressbar2/meta.yaml b/misc/conda/progressbar2/meta.yaml deleted file mode 100644 index 9680ebbda1..0000000000 --- a/misc/conda/progressbar2/meta.yaml +++ /dev/null @@ -1,61 +0,0 @@ -package: - name: progressbar2 - version: "3.6.0" - -source: - fn: progressbar2-3.6.0.tar.gz - url: https://files.pythonhosted.org/packages/c0/06/b85e78d16a802ed3d7b100762f45a377bb57ee71cb66b3d8b0aec98f4039/progressbar2-3.6.0.tar.gz - md5: cb839d723cf5747fdd159050dd8b612f -# patches: - # List any patch files here - # - fix.patch - -# build: - # noarch_python: True - # preserve_egg_dir: True - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - progressbar2 = progressbar2:main - # - # Would create an entry point called progressbar2 that calls progressbar2.main() - - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - -requirements: - build: - - python - - setuptools - - run: - - python - -test: - # Python imports - imports: - - progressbar - - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - home: https://github.com/WoLpH/python-progressbar - license: BSD License - summary: 'A Python Progressbar library to provide visual (yet text based) progress to\nlong running operations.' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/misc/conda/vaex/bld.bat b/misc/conda/vaex/bld.bat deleted file mode 100644 index 87b1481d74..0000000000 --- a/misc/conda/vaex/bld.bat +++ /dev/null @@ -1,8 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See -:: http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/misc/conda/vaex/build.sh b/misc/conda/vaex/build.sh deleted file mode 100644 index 2d466c4513..0000000000 --- a/misc/conda/vaex/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install --single-version-externally-managed --record=record.txt - -# Add more build steps here, if they are necessary. - -# See -# http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/misc/conda/vaex/meta.yaml b/misc/conda/vaex/meta.yaml deleted file mode 100644 index 97b47c7a37..0000000000 --- a/misc/conda/vaex/meta.yaml +++ /dev/null @@ -1,117 +0,0 @@ -package: - name: vaex - version: "1.0.0b2" - -source: - fn: vaex-1.0.0b2.tar.gz - url: https://pypi.python.org/packages/c5/f2/4956c264012df7cd936b8b5deba675f30ec830c707f55345e9ecba1eec36/vaex-1.0.0b2.tar.gz - md5: 012070a8a6ffe1de8c2bbfadf8958ba7 -# patches: - # List any patch files here - # - fix.patch - -build: - script: python setup.py install --single-version-externally-managed --record record.txt - osx_is_app: True - # noarch_python: True - # preserve_egg_dir: True - entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - vaex = vaex:main - # - # Would create an entry point called vaex that calls vaex.main() - - - vaex=vaex.ui.main:main - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 1 - - -requirements: - build: - - python - - pyopengl >=3.1.0 - - numpy >=1.7.2 - - scipy >=0.1 - - astropy >=0.3 - - h5py >=2.2.1 - - jprops - - matplotlib >=1.3.1 - - numexpr - - psutil >=1.2.1 - - aplus - - tornado >4.1 - - futures - - future >=0.15.2 - - pyyaml - - cachetools - - progressbar2 - - attrdict - - pandas - - pillow - - run: - - python - - pyopengl >=3.1.0 - - numpy >=1.7.2 - - scipy >=0.1 - - astropy >=0.3 - - h5py >=2.2.1 - - jprops - - matplotlib >=1.3.1 - - numexpr - - psutil >=1.2.1 - - aplus - - tornado >4.1 - - futures - - future >=0.15.2 - - pyyaml - - cachetools - - progressbar2 - - attrdict - - pandas - - pillow - - python.app # [osx] - -test: - # Python imports - imports: - - vaex - - vaex.file - - vaex.misc - - vaex.test - - vaex.ui - - vaex.ui.icons - - vaex.ui.plugin - - commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - #- vaex --help - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose -app: - entry: vaex - summary: 'Vaex is a graphical tool to visualize and explore large tabular datasets.' - icon: vaex32.png - type: desk - - -about: - home: https://www.astro.rug.nl/~breddels/vaex - license: MIT -# license_file: LICENSE - summary: 'Vaex is a graphical tool and library to visualize and explore large tabular datasets.' - -# See -# http://docs.continuum.io/conda/build.html for -# more information about meta.yaml diff --git a/packages/vaex-astro/setup.py b/packages/vaex-astro/setup.py index 26006116e3..8ae1e3ade4 100644 --- a/packages/vaex-astro/setup.py +++ b/packages/vaex-astro/setup.py @@ -12,7 +12,7 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/maartenbreddels/vaex' -install_requires_astro = ['vaex-core>=4.5.0,<5', 'astropy'] +install_requires_astro = ['vaex-core~=4.5', 'astropy'] setup( name=name + '-astro', diff --git a/packages/vaex-contrib/setup.py b/packages/vaex-contrib/setup.py index 61edc62354..4121424de4 100644 --- a/packages/vaex-contrib/setup.py +++ b/packages/vaex-contrib/setup.py @@ -10,7 +10,7 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/vaexio/vaex' -install_requires_contrib = ['vaex-core>=4.0.0,<5'] +install_requires_contrib = ['vaex-core~=4.0'] setup(name=name + '-contrib', version=version, @@ -18,7 +18,7 @@ url=url, install_requires=install_requires_contrib, extras_require={ - 'gcp': ['google-cloud-bigquery', 'google-cloud-bigquery-storage'], + 'all': ['google-cloud-bigquery', 'google-cloud-bigquery-storage'], }, license=license, packages=['vaex.contrib', 'vaex.contrib.io'], diff --git a/packages/vaex-core/setup.py b/packages/vaex-core/setup.py index cba3be7472..669875ffa9 100644 --- a/packages/vaex-core/setup.py +++ b/packages/vaex-core/setup.py @@ -5,38 +5,58 @@ from setuptools import Extension import platform -use_skbuild = len(os.environ.get('VAEX_BUILD_SKBUILD', '')) > 0 +use_skbuild = len(os.environ.get("VAEX_BUILD_SKBUILD", "")) > 0 if use_skbuild: from skbuild import setup import skbuild.command.build_ext -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +on_rtd = os.environ.get("READTHEDOCS", None) == "True" dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, "vaex/core/_version.py") -version = SourceFileLoader('version', path_version).load_module() +version = SourceFileLoader("version", path_version).load_module() -name = 'vaex' +name = "vaex" author = "Maarten A. Breddels" author_email = "maartenbreddels@gmail.com" -license = 'MIT' +license = "MIT" version = version.__version__ -url = 'https://www.github.com/maartenbreddels/vaex' -# TODO: can we do without requests and progressbar2? +url = "https://www.github.com/maartenbreddels/vaex" # TODO: after python2 supports frops, future and futures can also be dropped -# TODO: would be nice to have astropy only as dep in vaex-astro -setup_requires = ["numpy~=1.16"] -install_requires_core = ["numpy~=1.16", "aplus", "tabulate>=0.8.3", - "future>=0.15.2", "pyyaml", "progressbar2", - "requests", "six", "cloudpickle", "pandas", "dask!=2022.4.0", - "nest-asyncio>=1.3.3", "pyarrow>=5.0.0", "frozendict!=2.2.0", - "blake3", "filelock", "pydantic>=1.8.0", "rich", - ] -if sys.version_info[0] == 2: - install_requires_core.append("futures>=2.2.0") -install_requires_viz = ["matplotlib>=1.3.1", ] -install_requires_astro = ["kapteyn"] +setup_requires = ["numpy~=1.17"] +install_requires_core = [ + "numpy~=1.17", + "aplus", + "tabulate>=0.8.3", + "dask!=2022.4.0", + "future>=0.15.2", + "pyyaml", + "six", + "cloudpickle", + "pandas>=1.0,<3", + "nest_asyncio>=1.3.3", + "pyarrow>=5.0.0", + "frozendict!=2.2.0", + "blake3", + "filelock", + "pydantic>=1.8.0", + "rich", +] +extras_require_core = { + "all": [ + "gcsfs>=0.6.2", + "s3fs", + "ipyvolume", + "diskcache", + "fsspec", + "h5py", + "httpx", + "aplus", + "psutil", + "graphviz", + ], +} if "MACOSX_DEPLOYMENT_TARGET" not in os.environ: os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.9" @@ -45,24 +65,27 @@ # MB: I like these options during development, the second if for ccache # extra_dev_options = ['-fmax-errors=4', '-fdiagnostics-color', '-pedantic-errors'] + class get_numpy_include(object): """Helper class to determine the numpy include path The purpose of this class is to postpone importing numpy until it is actually installed, so that the ``get_include()`` - method can be invoked. """ + method can be invoked.""" def __init__(self): pass def __str__(self): import numpy as np + return np.get_include() + class get_pybind_include(object): """Helper class to determine the pybind11 include path The purpose of this class is to postpone importing pybind11 until it is actually installed, so that the ``get_include()`` - method can be invoked. """ + method can be invoked.""" def __init__(self, user=False): self.user = user @@ -71,7 +94,7 @@ def __str__(self): # this trick does not work anymore it seems, we now just vendor it # import pybind11 # return pybind11.get_include(self.user) - return 'vendor/pybind11/include' + return "vendor/pybind11/include" USE_ABSL = False @@ -79,71 +102,102 @@ def __str__(self): define_macros = [] if USE_ABSL: - define_macros += [('VAEX_USE_ABSL', None)] + define_macros += [("VAEX_USE_ABSL", None)] if USE_TSL: - define_macros += [('VAEX_USE_TSL', None)] + define_macros += [("VAEX_USE_TSL", None)] dll_files = [] -if platform.system().lower() == 'windows': +if platform.system().lower() == "windows": extra_compile_args = ["/EHsc"] - dll_files = ['pcre.dll', 'pcrecpp.dll', 'vcruntime140_1.dll'] + dll_files = ["pcre.dll", "pcrecpp.dll", "vcruntime140_1.dll"] else: # TODO: maybe enable these flags for non-wheel/conda builds? ["-mtune=native", "-march=native"] - extra_compile_args = ["-std=c++11", "-O3", "-funroll-loops", "-Werror=return-type", "-Wno-unused-parameter"] + extra_compile_args = [ + "-std=c++11", + "-O3", + "-funroll-loops", + "-Werror=return-type", + "-Wno-unused-parameter", + ] extra_compile_args.append("-g") extra_compile_args += extra_dev_options -if sys.platform == 'darwin': +if sys.platform == "darwin": extra_compile_args.append("-mmacosx-version-min=10.9") # on windows (Conda-forge builds), the dirname is an absolute path -extension_vaexfast = Extension("vaex.vaexfast", [os.path.relpath(os.path.join(dirname, "src/vaexfast.cpp"))], - include_dirs=[get_numpy_include()], - extra_compile_args=extra_compile_args) -extension_strings = Extension("vaex.superstrings", [ - os.path.relpath(os.path.join(dirname, "src/strings.cpp")), - os.path.relpath(os.path.join(dirname, "src/string_utils.cpp")), +extension_vaexfast = Extension( + "vaex.vaexfast", + [os.path.relpath(os.path.join(dirname, "src/vaexfast.cpp"))], + include_dirs=[get_numpy_include()], + extra_compile_args=extra_compile_args, +) +extension_strings = Extension( + "vaex.superstrings", + [ + os.path.relpath(os.path.join(dirname, "src/strings.cpp")), + os.path.relpath(os.path.join(dirname, "src/string_utils.cpp")), ], include_dirs=[ get_numpy_include(), get_pybind_include(), get_pybind_include(user=True), - 'vendor/string-view-lite/include', - 'vendor/boost', - os.path.join(sys.prefix, 'include'), - os.path.join(sys.prefix, 'Library', 'include'), # windows - os.path.join(dirname, 'vendor', 'pcre', 'Library', 'include') # windows pcre from conda-forge + "vendor/string-view-lite/include", + "vendor/boost", + os.path.join(sys.prefix, "include"), + os.path.join(sys.prefix, "Library", "include"), # windows + os.path.join( + dirname, "vendor", "pcre", "Library", "include" + ), # windows pcre from conda-forge ], library_dirs=[ - os.path.join(sys.prefix, 'lib'), - os.path.join(sys.prefix, 'Library', 'lib'), # windows - os.path.join(dirname, 'vendor', 'pcre', 'Library', 'lib'), # windows pcre from conda-forge + os.path.join(sys.prefix, "lib"), + os.path.join(sys.prefix, "Library", "lib"), # windows + os.path.join( + dirname, "vendor", "pcre", "Library", "lib" + ), # windows pcre from conda-forge ], extra_compile_args=extra_compile_args, - libraries=['pcre', 'pcrecpp'] + libraries=["pcre", "pcrecpp"], ) -extension_superutils = Extension("vaex.superutils", [ +extension_superutils = Extension( + "vaex.superutils", + [ os.path.relpath(os.path.join(dirname, "src/hash_string.cpp")), os.path.relpath(os.path.join(dirname, "src/hash_primitives_pot.cpp")), os.path.relpath(os.path.join(dirname, "src/hash_object.cpp")), os.path.relpath(os.path.join(dirname, "src/hash_primitives_prime.cpp")), os.path.relpath(os.path.join(dirname, "src/superutils.cpp")), os.path.relpath(os.path.join(dirname, "src/string_utils.cpp")), - ] + ([os.path.relpath(os.path.join(dirname, "vendor/abseil-cpp/absl/container/internal/raw_hash_set.cc"))] if USE_ABSL else []), + ] + + ( + [ + os.path.relpath( + os.path.join( + dirname, "vendor/abseil-cpp/absl/container/internal/raw_hash_set.cc" + ) + ) + ] + if USE_ABSL + else [] + ), include_dirs=[ - get_numpy_include(), get_pybind_include(), + get_numpy_include(), + get_pybind_include(), get_pybind_include(user=True), - 'vendor/abseil-cpp', - 'vendor/flat_hash_map', - 'vendor/sparse-map/include', - 'vendor/hopscotch-map/include', - 'vendor/string-view-lite/include', + "vendor/abseil-cpp", + "vendor/flat_hash_map", + "vendor/sparse-map/include", + "vendor/hopscotch-map/include", + "vendor/string-view-lite/include", ], extra_compile_args=extra_compile_args, define_macros=define_macros, - ) +) -extension_superagg = Extension("vaex.superagg", [ +extension_superagg = Extension( + "vaex.superagg", + [ os.path.relpath(os.path.join(dirname, "src/agg_nunique_string.cpp")), os.path.relpath(os.path.join(dirname, "src/agg_minmax.cpp")), os.path.relpath(os.path.join(dirname, "src/agg_nunique.cpp")), @@ -159,69 +213,93 @@ def __str__(self): os.path.relpath(os.path.join(dirname, "src/string_utils.cpp")), ], include_dirs=[ - get_numpy_include(), get_pybind_include(), + get_numpy_include(), + get_pybind_include(), get_pybind_include(user=True), - 'vendor/flat_hash_map', - 'vendor/sparse-map/include', - 'vendor/hopscotch-map/include', - 'vendor/string-view-lite/include' + "vendor/flat_hash_map", + "vendor/sparse-map/include", + "vendor/hopscotch-map/include", + "vendor/string-view-lite/include", ], extra_compile_args=extra_compile_args, define_macros=define_macros, - ) +) -setup(name=name + '-core', - version=version, - description='Core of vaex', - url=url, - author=author, - author_email=author_email, - setup_requires=setup_requires, - install_requires=install_requires_core, - license=license, - package_data={'vaex': dll_files + ['test/files/*.fits', 'test/files/*.vot', 'test/files/*.hdf5']}, - packages=['vaex', 'vaex.arrow', 'vaex.core', 'vaex.file', 'vaex.test', 'vaex.ext', 'vaex.misc', 'vaex.datasets'], - include_package_data=True, - ext_modules=([extension_vaexfast] if on_rtd else [extension_vaexfast, extension_strings, extension_superutils, extension_superagg]) if not use_skbuild else [], - zip_safe=False, - python_requires=">=3.8", - classifiers=[ - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - ], - extras_require={ - 'all': ["gcsfs>=0.6.2", "s3fs"] - }, - entry_points={ - 'console_scripts': ['vaex = vaex.__main__:main'], - 'gui_scripts': ['vaexgui = vaex.__main__:main'], # sometimes in osx, you need to run with this - 'vaex.dataframe.accessor': [ - 'geo = vaex.geo:DataFrameAccessorGeo', - 'struct = vaex.struct:DataFrameAccessorStruct', - ], - 'vaex.dataset.opener': [ - 'csv = vaex.csv:DatasetCsvLazy', - 'arrow = vaex.arrow.opener:ArrowOpener', - 'parquet = vaex.arrow.opener:ParquetOpener', - 'feather = vaex.arrow.opener:FeatherOpener', - ], - 'vaex.memory.tracker': [ - 'default = vaex.memory:MemoryTracker' - ], - 'vaex.progressbar': [ - 'vaex = vaex.progress:simple', - 'simple = vaex.progress:simple', - 'widget = vaex.progress:widget', - 'rich = vaex.progress:rich', - ], - 'vaex.file.scheme': [ - 's3 = vaex.file.s3', - 'fsspec+s3 = vaex.file.s3fs', - 'arrow+s3 = vaex.file.s3arrow', - 'gs = vaex.file.gcs', - 'fsspec+gs = vaex.file.gcs', - ] - } - ) +setup( + name=name + "-core", + version=version, + description="Core of vaex", + url=url, + author=author, + author_email=author_email, + setup_requires=setup_requires, + install_requires=install_requires_core, + license=license, + package_data={ + "vaex": dll_files + + ["test/files/*.fits", "test/files/*.vot", "test/files/*.hdf5"] + }, + packages=[ + "vaex", + "vaex.arrow", + "vaex.core", + "vaex.file", + "vaex.test", + "vaex.ext", + "vaex.misc", + "vaex.datasets", + ], + include_package_data=True, + ext_modules=( + [extension_vaexfast] + if on_rtd + else [ + extension_vaexfast, + extension_strings, + extension_superutils, + extension_superagg, + ] + ) + if not use_skbuild + else [], + zip_safe=False, + python_requires=">=3.8", + classifiers=[ + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + ], + extras_require=extras_require_core, + entry_points={ + "console_scripts": ["vaex = vaex.__main__:main"], + "gui_scripts": [ + "vaexgui = vaex.__main__:main" + ], # sometimes in osx, you need to run with this + "vaex.dataframe.accessor": [ + "geo = vaex.geo:DataFrameAccessorGeo", + "struct = vaex.struct:DataFrameAccessorStruct", + ], + "vaex.dataset.opener": [ + "csv = vaex.csv:DatasetCsvLazy", + "arrow = vaex.arrow.opener:ArrowOpener", + "parquet = vaex.arrow.opener:ParquetOpener", + "feather = vaex.arrow.opener:FeatherOpener", + ], + "vaex.memory.tracker": ["default = vaex.memory:MemoryTracker"], + "vaex.progressbar": [ + "vaex = vaex.progress:simple", + "simple = vaex.progress:simple", + "widget = vaex.progress:widget", + "rich = vaex.progress:rich", + ], + "vaex.file.scheme": [ + "s3 = vaex.file.s3", + "fsspec+s3 = vaex.file.s3fs", + "arrow+s3 = vaex.file.s3arrow", + "gs = vaex.file.gcs", + "fsspec+gs = vaex.file.gcs", + ], + }, +) diff --git a/packages/vaex-core/vaex/functions.py b/packages/vaex-core/vaex/functions.py index fcfc69e6ee..5da4b05da7 100644 --- a/packages/vaex-core/vaex/functions.py +++ b/packages/vaex-core/vaex/functions.py @@ -605,7 +605,7 @@ def dt_weekofyear(x): 1 6 2 46 """ - return _to_pandas_series(x).dt.weekofyear.values + return _to_pandas_series(x).dt.isocalendar().week.values @register_function(scope='dt', as_property=True) def dt_hour(x): diff --git a/packages/vaex-graphql/setup.py b/packages/vaex-graphql/setup.py index 8a6e8a0860..ab3fcc5e5e 100644 --- a/packages/vaex-graphql/setup.py +++ b/packages/vaex-graphql/setup.py @@ -12,7 +12,7 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/vaexio/vaex' -install_requires_graphql = ['vaex-core>=4.0.0,<5', 'graphene>=2.1.8,<3', 'graphene>=2.1.8,<3', 'graphene-tornado>=2.5.1,<3'] +install_requires_graphql = ['vaex-core~=4.0', 'graphene-tornado~=3.0.0b2'] setup( name=name + '-graphql', diff --git a/packages/vaex-hdf5/setup.py b/packages/vaex-hdf5/setup.py index b21f664df5..5588b9e9b2 100644 --- a/packages/vaex-hdf5/setup.py +++ b/packages/vaex-hdf5/setup.py @@ -13,7 +13,7 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/maartenbreddels/vaex' -install_requires_hdf5 = ["vaex-core>=4.0.0,<5", "h5py>=2.9"] +install_requires_hdf5 = ["vaex-core~=4.0", "h5py>=2.9"] setup(name=name + '-hdf5', version=version, diff --git a/packages/vaex-jupyter/setup.py b/packages/vaex-jupyter/setup.py index 467f4b375b..d6ca98eb6a 100644 --- a/packages/vaex-jupyter/setup.py +++ b/packages/vaex-jupyter/setup.py @@ -14,7 +14,7 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/maartenbreddels/vaex' -install_requires_jupyter = ['vaex-core>=4.7.0,<5', 'vaex-viz', 'bqplot>=0.10.1', 'ipyvolume>=0.4', 'ipyleaflet', 'ipympl', 'ipyvuetify>=1.2.2,<2', 'xarray'] +install_requires_jupyter = ['vaex-core~=4.7', 'vaex-viz', 'bqplot>=0.10.1', 'ipyvolume>=0.4', 'ipyleaflet', 'ipympl', 'ipyvuetify>=1.2.2,<2', 'xarray'] setup(name=name + '-jupyter', version=version, diff --git a/packages/vaex-ml/setup.py b/packages/vaex-ml/setup.py index 07e76a82ea..04ed2e7725 100644 --- a/packages/vaex-ml/setup.py +++ b/packages/vaex-ml/setup.py @@ -12,7 +12,18 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/vaexio/vaex' -install_requires_ml = ['vaex-core>=4.8.0,<5', 'numba', 'traitlets', 'jinja2'] +install_requires_ml = [ + 'vaex-core~=4.8', + 'numba', + 'traitlets', + 'jinja2', + 'annoy', + 'scikit-learn', + 'xgboost', + 'lightgbm~=4.0', + 'catboost', +] +extras_require_ml = {'all': ['tensorflow~=2.1']} setup(name=name + '-ml', version=version, @@ -21,7 +32,7 @@ author=author, author_email=author_email, install_requires=install_requires_ml, - extras_require={'all': ['tensorflow>=2.1.0', 'tensorflow-io>=0.12.0']}, + extras_require=extras_require_ml, license=license, packages=['vaex.ml', 'vaex.ml.incubator'], include_package_data=True, diff --git a/packages/vaex-ml/vaex/ml/tensorflow.py b/packages/vaex-ml/vaex/ml/tensorflow.py index 8256a91d24..43d4337883 100644 --- a/packages/vaex-ml/vaex/ml/tensorflow.py +++ b/packages/vaex-ml/vaex/ml/tensorflow.py @@ -1,6 +1,6 @@ import base64 import tempfile -import shutil +import os.path import numpy as np @@ -177,13 +177,12 @@ def transform(self, df): def state_get(self): state = super(KerasModel, self).state_get() - with tempfile.TemporaryDirectory() as directory: - self.model.save(directory) - zip_path = tempfile.mktemp(".zip") - shutil.make_archive(zip_path[:-4], 'zip', directory) - with open(zip_path, 'rb') as f: + filepath = os.path.join(directory, 'model.keras') + self.model.save(filepath) + with open(filepath, 'rb') as f: data = f.read() + # store model as raw zip bytes base64 encoded state['model'] = base64.encodebytes(data).decode('ascii') return state @@ -194,8 +193,7 @@ def state_set(self, state, trusted=True): data = base64.decodebytes(model_data.encode('ascii')) with tempfile.TemporaryDirectory() as directory: - zip_path = tempfile.mktemp('.zip') - with open(zip_path, 'wb') as f: + filepath = os.path.join(directory, 'model.keras') + with open(filepath, 'wb') as f: f.write(data) - shutil.unpack_archive(zip_path, directory) - self.model = K.models.load_model(directory, custom_objects=self.custom_objects) + self.model = K.models.load_model(filepath, custom_objects=self.custom_objects) diff --git a/packages/vaex-ml/vaex/ml/transformations.py b/packages/vaex-ml/vaex/ml/transformations.py index cca5eaac6a..90b70c8008 100644 --- a/packages/vaex-ml/vaex/ml/transformations.py +++ b/packages/vaex-ml/vaex/ml/transformations.py @@ -432,7 +432,7 @@ def transform(self, df): column_name = self.prefix + feature + '_' + str_value if value is None: copy[column_name] = copy.func.where(copy[feature].ismissing(), self.one, self.zero, dtype=dtype) - elif isinstance(value, np.float) and np.isnan(value): + elif isinstance(value, float) and np.isnan(value): copy[column_name] = copy.func.where(copy[feature].isnan(), self.one, self.zero, dtype=dtype) else: copy[column_name] = copy.func.where(copy[feature] == value, self.one, self.zero, dtype=dtype) diff --git a/packages/vaex-server/setup.py b/packages/vaex-server/setup.py index 37916d450c..a54fbc1355 100644 --- a/packages/vaex-server/setup.py +++ b/packages/vaex-server/setup.py @@ -14,7 +14,7 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/maartenbreddels/vaex' -install_requires_server = ['vaex-core>=4.7.0,<5', 'tornado>4.1', 'cachetools', 'fastapi', 'uvicorn[standard]'] +install_requires_server = ['vaex-core~=4.7', 'tornado>4.1', 'cachetools', 'fastapi', 'uvicorn[standard]'] setup(name=name + '-server', version=version, diff --git a/packages/vaex-ui/setup.py b/packages/vaex-ui/setup.py index 401942eb6f..5e378b3145 100644 --- a/packages/vaex-ui/setup.py +++ b/packages/vaex-ui/setup.py @@ -13,7 +13,7 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/maartenbreddels/vaex' -install_requires_ui = ["vaex-core>=0.6.1", "PyOpenGL", "scipy", "matplotlib", "vaex-hdf5", "vaex-astro"] +install_requires_ui = ["vaex-core>=0.6.1", "PyOpenGL", "scipy", "matplotlib", "vaex-hdf5", "vaex-astro", "PyQt5"] setup(name=name + '-ui', version=version, diff --git a/packages/vaex-meta/LICENSE.txt b/packages/vaex/LICENSE.txt similarity index 100% rename from packages/vaex-meta/LICENSE.txt rename to packages/vaex/LICENSE.txt diff --git a/packages/vaex-meta/MANIFEST.in b/packages/vaex/MANIFEST.in similarity index 100% rename from packages/vaex-meta/MANIFEST.in rename to packages/vaex/MANIFEST.in diff --git a/packages/vaex-meta/README.md b/packages/vaex/README.md similarity index 100% rename from packages/vaex-meta/README.md rename to packages/vaex/README.md diff --git a/packages/vaex-meta/setup.py b/packages/vaex/setup.py similarity index 100% rename from packages/vaex-meta/setup.py rename to packages/vaex/setup.py diff --git a/packages/vaex-meta/vaex/meta/__init__.py b/packages/vaex/vaex/meta/__init__.py similarity index 100% rename from packages/vaex-meta/vaex/meta/__init__.py rename to packages/vaex/vaex/meta/__init__.py diff --git a/packages/vaex-meta/vaex/meta/_version.py b/packages/vaex/vaex/meta/_version.py similarity index 100% rename from packages/vaex-meta/vaex/meta/_version.py rename to packages/vaex/vaex/meta/_version.py diff --git a/requirements-ml.txt b/requirements-ml.txt deleted file mode 100644 index b4ab89ed63..0000000000 --- a/requirements-ml.txt +++ /dev/null @@ -1,7 +0,0 @@ -annoy -scikit-learn -xgboost -lightgbm>4 -catboost -# tensorflow==2.1.0 -# tensorflow-io==0.12.0 diff --git a/requirements_rtd.txt b/requirements_rtd.txt deleted file mode 100644 index edff735a07..0000000000 --- a/requirements_rtd.txt +++ /dev/null @@ -1,28 +0,0 @@ --e . -sphinx -sphinx-book-theme -sphinx-sitemap -sphinxcontrib-googleanalytics -sphinxext-rediraffe -future -pyyaml -astropy -psutil>=1.2.1 -numpy>=1.13 -aplus -tornado>=5.0 -futures==2.2.0 -cachetools -progressbar2 -jupyter -nbconvert>=5.1.1 -nbsphinx>=0.2.18 -ipython -jupyter-sphinx>=0.1.2 -pip>=10.0 -annoy -lightgbm -xgboost -sphinx_gallery -catboost -myst-parser diff --git a/setup.py b/setup.py index 6f6c02be06..4dbfba4ab0 100644 --- a/setup.py +++ b/setup.py @@ -1,94 +1,56 @@ -from setuptools import setup -from setuptools.command.develop import develop -from setuptools.command.install import install -import pip -import os -import sys -import contextlib - - -@contextlib.contextmanager -def cwd(path): - curdir = os.getcwd() - try: - os.chdir(path) - yield - finally: - os.chdir(curdir) - -# inspired by https://blog.shazam.com/python-microlibs-5be9461ad979 - - -packages = ['vaex-core', 'vaex-viz', 'vaex-hdf5', 'vaex-server', 'vaex-astro', 'vaex-jupyter', 'vaex-ml', 'vaex-meta', 'vaex-graphql', 'vaex-contrib'] -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +# only for local development / install from source, e.g. +# pip install https://github.com/vaexio/vaex/archive/refs/heads/master.zip +from pathlib import Path -class DevelopCmd(develop): - def run(self): - relative = os.path.abspath(os.path.join('packages', 'vaex-core', 'vaex')) - for package in packages: - with cwd(os.path.join('packages', package)): - err = os.system(f'{sys.executable} -m pip install -e .') - if err: - raise RuntimeError(f'Oops, failed to install {package}') - # we need to make symbolic links from vaex-core/vaex/ to vaex-/vaex/ - # otherwise development install do not work - if package not in ['vaex-core']: - name = package.split('-')[1] - - source = os.path.abspath(os.path.join('packages', package, 'vaex', name)) - rel_source = os.path.relpath(source, relative) - with cwd(relative): - print('symlinking', source, name, rel_source) - if os.path.exists(name) and os.readlink(name) == rel_source: - print('symlink ok') - else: - if os.path.exists(name): - print('old symlink', os.readlink(name)) - os.remove(name) - os.symlink(rel_source, name) - - -class InstallCmd(install): - """ Add custom steps for the install command """ - def run(self): - for package in packages: - with cwd(os.path.join('packages', package)): - os.system(f'{sys.executable} -m pip install --no-deps .') - for package in packages: - with cwd(os.path.join('packages', package)): - os.system(f'{sys.executable} -m pip install --upgrade .') +from setuptools import setup +packages = [ + "vaex-core", + "vaex-viz", + "vaex-hdf5", + "vaex-server", + "vaex-astro", + "vaex-jupyter", + "vaex-ml", + "vaex-graphql", + "vaex-contrib", + "vaex", +] setup( - name='vaex-meta', + name="vaex-meta", version="0.1.0", description="Convenience setup.py for when installing from the git repo", classifiers=[ - 'Private :: Do Not Upload to pypi server', + "Private :: Do Not Upload to pypi server", ], packages=[], install_requires=[ - 'pip', + f"{package}[all] @ {(Path(__file__).parent / 'packages' / package).as_uri()}" + for package in packages ], extras_require={ - 'dev': [ - 'pytest', - 'gcsfs', - 's3fs', - 'graphviz', - 'myst_parser', - 'rich', - # For generating the documentation - 'sphinx', - 'nbsphinx', - 'sphinx_gallery', - 'sphinx_sitemap', - 'sphinx_book_theme', + "ci": [ + # readthedocs + "sphinx", + "sphinx_book_theme", + "sphinx_sitemap", + "sphinxcontrib_googleanalytics", + "sphinxext_rediraffe", + "sphinx_gallery", + "nbsphinx", + "jupyter_sphinx", + "myst_parser", + # tests + "pytest", + "pytest-asyncio", + "pytest-mpl", + "pytest-timeout", + # ipynb tests + "nbconvert", + "jupyterlab", + "plotly", ] }, - cmdclass={ - 'install': InstallCmd, - 'develop': DevelopCmd, - }, ) diff --git a/tests/agg_test.py b/tests/agg_test.py index 9c94e18ec8..9681639db0 100644 --- a/tests/agg_test.py +++ b/tests/agg_test.py @@ -247,8 +247,8 @@ def test_minmax_all_dfs(df): def test_minmax_mixed_types(): - x = np.array([1, 0], dtype=np.int) - y = np.array([0.5, 1.5], dtype=np.float) + x = np.array([1, 0], dtype=int) + y = np.array([0.5, 1.5], dtype=float) df = vaex.from_arrays(x=x, y=y) with pytest.raises(TypeError): df.minmax(['x', 'y']) diff --git a/tests/datetime_test.py b/tests/datetime_test.py index 78a55f3fa7..af9397cb36 100644 --- a/tests/datetime_test.py +++ b/tests/datetime_test.py @@ -25,7 +25,7 @@ def test_datetime_operations(): assert df.date.dt.year.tolist() == pandas_df.date.dt.year.values.tolist() assert df.date.dt.is_leap_year.tolist() == pandas_df.date.dt.is_leap_year.values.tolist() assert any(df.date.dt.is_leap_year.tolist()) - assert df.date.dt.weekofyear.tolist() == pandas_df.date.dt.weekofyear.values.tolist() + assert df.date.dt.weekofyear.tolist() == pandas_df.date.dt.isocalendar().week.values.tolist() assert df.date.dt.dayofyear.tolist() == pandas_df.date.dt.dayofyear.values.tolist() assert df.date.dt.dayofweek.tolist() == pandas_df.date.dt.dayofweek.values.tolist() assert df.date.dt.floor('H').tolist() == pandas_df.date.dt.floor('H').values.tolist() diff --git a/tests/export_test.py b/tests/export_test.py index 41c40f6299..c310f77b0f 100644 --- a/tests/export_test.py +++ b/tests/export_test.py @@ -194,7 +194,7 @@ def test_export_unicode_column_name_hdf5(tmpdir): # assert df[0:2].s.tolist() == ['x', 'x'] # assert df[-3:-1].s.tolist() == ['y', 'y'] -@pytest.mark.parametrize("dtypes", [{}, {'name': np.object, 'age': 'Int64', 'weight': np.float}]) +@pytest.mark.parametrize("dtypes", [{}, {'name': object, 'age': int, 'weight': float}]) def test_multi_file_naive_read_convert_export(tmpdir, dtypes): current_dir = os.path.dirname(__file__) @@ -236,7 +236,7 @@ def test_export_csv(df_local, tmpdir): assert '123456' in vaex.open(path) -@pytest.mark.parametrize("dtypes", [{}, {'name': np.object, 'age': 'Int64', 'weight': np.float}]) +@pytest.mark.parametrize("dtypes", [{}, {'name': object, 'age': int, 'weight': float}]) def test_export_generates_same_hdf5_shasum(tmpdir, dtypes): current_dir = os.path.dirname(__file__) diff --git a/tests/from_pandas_test.py b/tests/from_pandas_test.py index edc60662c6..ab70500263 100644 --- a/tests/from_pandas_test.py +++ b/tests/from_pandas_test.py @@ -20,7 +20,7 @@ def test_from_pandas(): 'int_missing': pd.Series([1, None, 5, 1, 10], dtype='Int64'), 'datetime_1': [pd.NaT, datetime.datetime(2019, 1, 1, 1, 1, 1), datetime.datetime(2019, 1, 1, 1, 1, 1), datetime.datetime(2019, 1, 1, 1, 1, 1), datetime.datetime(2019, 1, 1, 1, 1, 1)], 'datetime_2': [pd.NaT, None, pd.NaT, pd.NaT, pd.NaT], - 'datetime_3': [pd.Timedelta('1M'), pd.Timedelta('1D'), pd.Timedelta('100M'), pd.Timedelta('2D'), pd.Timedelta('1H')], + 'datetime_3': [pd.Timedelta(days=30.5), pd.Timedelta(hours=24), pd.Timedelta(days=30.5 * 100), pd.Timedelta(days=2), pd.Timedelta(hours=1)], 'datetime_4': [pd.Timestamp('2001-1-1 2:2:11'), pd.Timestamp('2001-12'), pd.Timestamp('2001-10-1'), pd.Timestamp('2001-03-1 2:2:11'), pd.Timestamp('2001-1-1 2:2:11')], 'datetime_5': [datetime.date(2010, 1, 1), datetime.date(2010, 1, 1), datetime.date(2010, 1, 1), datetime.date(2010, 1, 1), datetime.date(2010, 1, 1)], 'datetime_6': [datetime.time(21, 1, 1), datetime.time(21, 1, 1), datetime.time(21, 1, 1), datetime.time(21, 1, 1), datetime.time(21, 1, 1)], diff --git a/tests/ml/tensorflow_test.py b/tests/ml/tensorflow_test.py index 66222d24d6..d4026edac0 100644 --- a/tests/ml/tensorflow_test.py +++ b/tests/ml/tensorflow_test.py @@ -33,7 +33,7 @@ def test_keras_model_classification(tmpdir, df_iris): nn_model.add(K.layers.Dense(3, activation='softmax')) nn_model.compile(optimizer=K.optimizers.RMSprop(learning_rate=0.01), loss=K.losses.categorical_crossentropy, - metrics='accuracy') + metrics=['accuracy']) X = df[features].values y = df[targets].values diff --git a/tests/strings_test.py b/tests/strings_test.py index d1c2c0d99b..746bb64be9 100644 --- a/tests/strings_test.py +++ b/tests/strings_test.py @@ -12,8 +12,8 @@ @pytest.mark.skipif(vaex.utils.osname == 'windows', reason="windows' snprintf seems buggy") def test_format(): - num1 = np.array([1, 2, 3], dtype=np.int32) - num2 = np.array([1.1, 2.2, 3.3], dtype=np.float32) + num1 = np.array([1, 2, 3], dtype=int) + num2 = np.array([1.1, 2.2, 3.3], dtype=float) text = ['Here', 'we', 'go'] df = vaex.from_arrays(num1=num1, num2=num2, text=text) @@ -77,7 +77,7 @@ def test_concat(): ds = ds1.concat(ds2) assert len(ds) == len(ds1) + len(ds2) assert ds.data_type('names') == pa.string() - assert ds.data_type('names') != np.object + assert ds.data_type('names') != object def test_string_count_stat(): From aabd6fd96b4c95080ebac5ef426ca335de5c147f Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 28 Aug 2024 12:48:03 +0200 Subject: [PATCH 66/91] allow for multiple fingerprints related to package versions --- tests/fingerprint_test.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/fingerprint_test.py b/tests/fingerprint_test.py index 004b3b44f2..769ac7132e 100644 --- a/tests/fingerprint_test.py +++ b/tests/fingerprint_test.py @@ -96,17 +96,17 @@ def test_dataset_arrays(): 'y': '4d48c88e587db8f3855eed9f5d5f51eea769451b7371ecf7bdee4e0258238631', 'z': 'a4cead13bef1fd1ec5974d1a2f5ceffd243a7aa6c6b08b80e09a7454b7d04293' } - assert ds.fingerprint == 'dataset-arrays-hashed-88244cf38fe91c6bf435caa6160b089b' + assert ds.fingerprint in ['dataset-arrays-hashed-88244cf38fe91c6bf435caa6160b089b', 'dataset-arrays-hashed-148c30472b155430f46bfb94d5509cf4'] -df_fingerprint_xy = 'dataframe-943761acaa2ff2060d21ef519c77e1b9' +df_fingerprints_xy = ['dataframe-943761acaa2ff2060d21ef519c77e1b9', 'dataframe-1c2f7e9c53dbd30220792e425418e343'] def test_df(): x = np.arange(10, dtype='i4') y = x**2 df = vaex.from_arrays(x=x, y=y, z=x+y) - assert df.fingerprint() == df_fingerprint_xy + assert df.fingerprint() in df_fingerprints_xy def test_df_different_virtual_columns(): @@ -114,10 +114,10 @@ def test_df_different_virtual_columns(): y = x**2 df1 = vaex.from_arrays(x=x, y=y, z=x+y) df1['z'] = df1.x + df1.z - assert df1.fingerprint() == 'dataframe-8f2202e2b4e7845c8ace767db5a49bc4' + assert df1.fingerprint() in ['dataframe-8f2202e2b4e7845c8ace767db5a49bc4', 'dataframe-b72cf197307aa4b9806e6ce3199b2960'] df2 = vaex.from_arrays(x=x, y=y, z=x+y) df2['z'] = df2.x - df2.z - assert df2.fingerprint() == 'dataframe-81043a3c5b32eaa4b18bf4a915492e23' + assert df2.fingerprint() in ['dataframe-81043a3c5b32eaa4b18bf4a915492e23', 'dataframe-0e9a4e2753715ff592527dcee1f1e8c2'] def test_df_with_dependencies(): @@ -125,8 +125,8 @@ def test_df_with_dependencies(): y = x**2 df = vaex.from_arrays(x=x, y=y, z=x+y) df['q'] = df.x + df.y - assert df.fingerprint() != df_fingerprint_xy - assert df.fingerprint(dependencies={'x', 'y', 'z'}) == df_fingerprint_xy + assert df.fingerprint() not in df_fingerprints_xy + assert df.fingerprint(dependencies={'x', 'y', 'z'}) in df_fingerprints_xy def test_df_project(): @@ -137,7 +137,7 @@ def test_df_project(): df_a = df[['x', 'y']] df_b = df[['x', 'y']] assert df_a.fingerprint() == df_b.fingerprint() - assert df_a.fingerprint() == 'dataframe-c13a4ab588272f03855ae5627731f7e5' + assert df_a.fingerprint() in ['dataframe-c13a4ab588272f03855ae5627731f7e5', 'dataframe-d4565ca8187231a051a9ff888ba16e7c'] def test_df_selection_references_virtual_column(): From d76a36b4faca17b54cbe069dc887020ce584b7b4 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Wed, 28 Aug 2024 22:32:09 +0200 Subject: [PATCH 67/91] explicit dtype=object --- tests/column_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/column_test.py b/tests/column_test.py index 3e3f9895d9..21eacb1d26 100644 --- a/tests/column_test.py +++ b/tests/column_test.py @@ -132,8 +132,8 @@ def test_plain_strings(): def test_dtype_object_with_arrays(): x = np.arange(10) y = np.arange(11) ** 2 - z = np.array([x, y]) - assert z.dtype == np.object + z = np.array([x, y], dtype=object) + assert z.dtype == object df = vaex.from_arrays(z=z) assert df.z.tolist()[0].tolist() == x.tolist() assert df.z.tolist()[1].tolist() == y.tolist() From 8ec050e787e38ffbd605c07cd690d48be67a947f Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 10:11:33 +0200 Subject: [PATCH 68/91] fix pandas issues --- packages/vaex-core/vaex/dataframe.py | 3 +++ tests/export_test.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/vaex-core/vaex/dataframe.py b/packages/vaex-core/vaex/dataframe.py index febf8e78af..9198f53176 100644 --- a/packages/vaex-core/vaex/dataframe.py +++ b/packages/vaex-core/vaex/dataframe.py @@ -2281,9 +2281,12 @@ def data_type(self, expression, array_type=None, internal=False, axis=0): data = data.to_arrow() data_type = data.type else: + import pandas # when we eval constants, let arrow find it out if isinstance(data, numbers.Number): data_type = pa.array([data]).type + elif isinstance(data, pandas.core.arrays.base.ExtensionArray): + data_type = data.dtype.type else: data_type = data.type # assuming arrow diff --git a/tests/export_test.py b/tests/export_test.py index c310f77b0f..a97925a0f7 100644 --- a/tests/export_test.py +++ b/tests/export_test.py @@ -194,7 +194,7 @@ def test_export_unicode_column_name_hdf5(tmpdir): # assert df[0:2].s.tolist() == ['x', 'x'] # assert df[-3:-1].s.tolist() == ['y', 'y'] -@pytest.mark.parametrize("dtypes", [{}, {'name': object, 'age': int, 'weight': float}]) +@pytest.mark.parametrize("dtypes", [{}, {'name': 'string', 'age': 'Int64', 'weight': 'Float32'}]) def test_multi_file_naive_read_convert_export(tmpdir, dtypes): current_dir = os.path.dirname(__file__) @@ -236,7 +236,7 @@ def test_export_csv(df_local, tmpdir): assert '123456' in vaex.open(path) -@pytest.mark.parametrize("dtypes", [{}, {'name': object, 'age': int, 'weight': float}]) +@pytest.mark.parametrize("dtypes", [{}, {'name': 'string', 'age': 'Int64', 'weight': 'Float32'}]) def test_export_generates_same_hdf5_shasum(tmpdir, dtypes): current_dir = os.path.dirname(__file__) From 3569f0aacbabdd03b43246a7904f7a34a2f3da40 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 10:12:33 +0200 Subject: [PATCH 69/91] revert graphene upgrade --- packages/vaex-graphql/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vaex-graphql/setup.py b/packages/vaex-graphql/setup.py index ab3fcc5e5e..8a6e8a0860 100644 --- a/packages/vaex-graphql/setup.py +++ b/packages/vaex-graphql/setup.py @@ -12,7 +12,7 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/vaexio/vaex' -install_requires_graphql = ['vaex-core~=4.0', 'graphene-tornado~=3.0.0b2'] +install_requires_graphql = ['vaex-core>=4.0.0,<5', 'graphene>=2.1.8,<3', 'graphene>=2.1.8,<3', 'graphene-tornado>=2.5.1,<3'] setup( name=name + '-graphql', From 2fe29d45ae79fe03912eea5441f90536b88bfae0 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 12:15:10 +0200 Subject: [PATCH 70/91] force uv to ignore Werkzeug (we do not use it, its a subdependency which has conflicts) --- .github/workflows/pythonpackage.yml | 2 +- requirements-override.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 requirements-override.txt diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index c1e6627e0b..6d2a548b20 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -59,7 +59,7 @@ jobs: uses: ./ci/actions/windll - name: Install vaex - run: uv pip install -v --system .[ci] + run: uv pip install -v --override requirements-override.txt --system .[ci] - run: uv pip freeze diff --git a/requirements-override.txt b/requirements-override.txt new file mode 100644 index 0000000000..ce454c6b98 --- /dev/null +++ b/requirements-override.txt @@ -0,0 +1 @@ +Werkzeug>1.0.1 From aaae4db54379cd302d8ec707bcb445baeea7e1fc Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 13:06:54 +0200 Subject: [PATCH 71/91] fix: work with modern scipy/sparse arrays --- packages/vaex-core/vaex/column.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/vaex-core/vaex/column.py b/packages/vaex-core/vaex/column.py index 40de5aab72..ed07ff2351 100644 --- a/packages/vaex-core/vaex/column.py +++ b/packages/vaex-core/vaex/column.py @@ -163,7 +163,10 @@ def trim(self, i1, i2): def __getitem__(self, slice): # not sure if this is the fastest - return self.matrix[slice, self.column_index].A[:,0] + mat = self.matrix[slice, self.column_index] + dense = mat.todense() + column_part = np.asarray(dense)[:,0] + return column_part class ColumnNumpyLike(Column): From cc8429e62a3ca9cd430b20120a14f895cb8e3d06 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 13:11:04 +0200 Subject: [PATCH 72/91] skip test for python 3.8 --- tests/ml/tensorflow_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ml/tensorflow_test.py b/tests/ml/tensorflow_test.py index d4026edac0..f3691b0d85 100644 --- a/tests/ml/tensorflow_test.py +++ b/tests/ml/tensorflow_test.py @@ -50,6 +50,7 @@ def test_keras_model_classification(tmpdir, df_iris): assert copy.pred.shape == (150, 3) +@pytest.mark.skipif(sys.version_info < (3, 8), reason="Doesn't run on keras that gets installed with Python 3.8") def test_keras_model_regression(df_example): df = df_example df = df[:1_000] # To make the tests run faster From 66d0b88c93dcdb6c60389bc2bbd1be7c80e7136b Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 13:11:15 +0200 Subject: [PATCH 73/91] skip test on windows --- tests/ml/ml_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ml/ml_test.py b/tests/ml/ml_test.py index 848cefcec6..1fec233da0 100644 --- a/tests/ml/ml_test.py +++ b/tests/ml/ml_test.py @@ -358,7 +358,7 @@ def test_maxabs_scaler(df_factory): import platform version = tuple(map(int, numpy.__version__.split('.'))) -@pytest.mark.skipif((np_version[0] == 1) & (np_version[1] < 21), reason="strange ref count issue with numpy") +@pytest.mark.skipif((np_version[0] == 1) & (np_version[1] < 21) or sys.platform == "win32" , reason="strange ref count issue with numpy, especially on windows") def test_robust_scaler(df_factory): x = np.array([-2.65395789, -7.97116295, -4.76729177, -0.76885033, -6.45609635]) y = np.array([-8.9480332, -4.81582449, -3.73537263, -3.46051912, 1.35137275]) From 857786f46979a10209fe2d68b06dcf969ea3b807 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 13:27:07 +0200 Subject: [PATCH 74/91] add missing import --- tests/ml/tensorflow_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ml/tensorflow_test.py b/tests/ml/tensorflow_test.py index f3691b0d85..8c264bb5b3 100644 --- a/tests/ml/tensorflow_test.py +++ b/tests/ml/tensorflow_test.py @@ -1,3 +1,4 @@ +import sys import pytest pytest.importorskip("tensorflow") From 0383e3a9eef9bb5fe609a945d48cc96de8527f5d Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 16:11:31 +0200 Subject: [PATCH 75/91] skip some tests conditionally --- tests/ml/tensorflow_test.py | 2 +- tests/percentile_approx_test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ml/tensorflow_test.py b/tests/ml/tensorflow_test.py index 8c264bb5b3..7b91ae41f4 100644 --- a/tests/ml/tensorflow_test.py +++ b/tests/ml/tensorflow_test.py @@ -51,7 +51,7 @@ def test_keras_model_classification(tmpdir, df_iris): assert copy.pred.shape == (150, 3) -@pytest.mark.skipif(sys.version_info < (3, 8), reason="Doesn't run on keras that gets installed with Python 3.8") +@pytest.mark.skipif(sys.version_info <= (3, 8), reason="Doesn't run on keras that gets installed with Python 3.8") def test_keras_model_regression(df_example): df = df_example df = df[:1_000] # To make the tests run faster diff --git a/tests/percentile_approx_test.py b/tests/percentile_approx_test.py index 216d819772..0796f8aeed 100644 --- a/tests/percentile_approx_test.py +++ b/tests/percentile_approx_test.py @@ -7,7 +7,7 @@ np_version = tuple(map(int, np.__version__.split('.'))) -@pytest.mark.skipif((np_version[0] == 1) & (np_version[1] < 21), reason="strange ref count issue with numpy") +@pytest.mark.skipif(sys.platform != "linux", reason="strange ref count issue with numpy") def test_percentile_approx(): df = vaex.example() # Simple test @@ -26,7 +26,7 @@ def test_percentile_approx(): np.testing.assert_array_almost_equal(percentiles_2d, expected_result, decimal=1) -@pytest.mark.skipif((np_version[0] == 1) & (np_version[1] < 21), reason="strange ref count issue with numpy") +@pytest.mark.skipif(sys.platform != "linux", reason="strange ref count issue with numpy") def test_percentile_1d(): x = np.array([0, 0, 10, 100, 200]) df = vaex.from_arrays(x=x) From 37d7e8f7f7aed764d5d26b815155740ff9941c05 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 16:34:07 +0200 Subject: [PATCH 76/91] tuple comparison fix --- tests/ml/tensorflow_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ml/tensorflow_test.py b/tests/ml/tensorflow_test.py index 7b91ae41f4..5fbf50fdf7 100644 --- a/tests/ml/tensorflow_test.py +++ b/tests/ml/tensorflow_test.py @@ -51,7 +51,7 @@ def test_keras_model_classification(tmpdir, df_iris): assert copy.pred.shape == (150, 3) -@pytest.mark.skipif(sys.version_info <= (3, 8), reason="Doesn't run on keras that gets installed with Python 3.8") +@pytest.mark.skipif(sys.version_info[:2] < (3, 8), reason="Doesn't run on keras that gets installed with Python 3.8") def test_keras_model_regression(df_example): df = df_example df = df[:1_000] # To make the tests run faster From b7da7069b1bd9b893286f240c0afed82f5281ec4 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 16:45:59 +0200 Subject: [PATCH 77/91] does osx run without sourcing .bash profile? --- ci/04-run-test-suite.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ci/04-run-test-suite.sh b/ci/04-run-test-suite.sh index 0c0e90efa2..f80738fc17 100755 --- a/ci/04-run-test-suite.sh +++ b/ci/04-run-test-suite.sh @@ -1,11 +1,7 @@ #!/bin/bash set -e -if [ -f ${HOME}/.bashrc ]; then - source ${HOME}/.bashrc -elif [ -f ${HOME}/.bash_profile ]; then - source ${HOME}/.bash_profile -fi + export VAEX_SERVER_OVERRIDE='{"dataframe.vaex.io":"dataframe-dev.vaex.io"}' python -m pytest --pyargs --doctest-modules --timeout=1000\ tests\ From 288d37851d1e404a408cf729b0dbcd7719cdac22 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 18:13:40 +0200 Subject: [PATCH 78/91] skip a few more tests --- tests/agg_test.py | 1 + tests/ml/tensorflow_test.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/agg_test.py b/tests/agg_test.py index 9681639db0..83eff48d02 100644 --- a/tests/agg_test.py +++ b/tests/agg_test.py @@ -290,6 +290,7 @@ def test_expr(): assert counts.tolist() == np.ones(10).tolist() +@pytest.mark.skipif(sys.version_info[:2] < (3, 9) and sys.platform == "win32" , reason="Issue on windows and python 3.8 only?") def test_nunique(): s = ['aap', 'aap', 'noot', 'mies', None, 'mies', 'kees', 'mies', 'aap'] x = [0, 0, 0, 0, 0, 1, 1, 1, 2] diff --git a/tests/ml/tensorflow_test.py b/tests/ml/tensorflow_test.py index 5fbf50fdf7..e5749e557e 100644 --- a/tests/ml/tensorflow_test.py +++ b/tests/ml/tensorflow_test.py @@ -51,7 +51,7 @@ def test_keras_model_classification(tmpdir, df_iris): assert copy.pred.shape == (150, 3) -@pytest.mark.skipif(sys.version_info[:2] < (3, 8), reason="Doesn't run on keras that gets installed with Python 3.8") +@pytest.mark.skipif(sys.version_info[:2] < (3, 9), reason="Doesn't run on keras that gets installed with Python 3.8") def test_keras_model_regression(df_example): df = df_example df = df[:1_000] # To make the tests run faster From 7600119f92a60d1869bafc982bfc8c54b3ffc835 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Thu, 29 Aug 2024 20:33:28 +0200 Subject: [PATCH 79/91] only run test on linux --- tests/ml/ml_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ml/ml_test.py b/tests/ml/ml_test.py index 1fec233da0..69a5634fb4 100644 --- a/tests/ml/ml_test.py +++ b/tests/ml/ml_test.py @@ -358,7 +358,7 @@ def test_maxabs_scaler(df_factory): import platform version = tuple(map(int, numpy.__version__.split('.'))) -@pytest.mark.skipif((np_version[0] == 1) & (np_version[1] < 21) or sys.platform == "win32" , reason="strange ref count issue with numpy, especially on windows") +@pytest.mark.skipif(sys.platform != "linux" , reason="strange ref count issue with numpy") def test_robust_scaler(df_factory): x = np.array([-2.65395789, -7.97116295, -4.76729177, -0.76885033, -6.45609635]) y = np.array([-8.9480332, -4.81582449, -3.73537263, -3.46051912, 1.35137275]) From 2c8bb2f92fbad8c904417f0f0a1a4c5f6ae00273 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:50:41 +0300 Subject: [PATCH 80/91] Try building arm64 wheels on macos-13 --- .github/workflows/wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 027c9f90b1..a372c75050 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -42,7 +42,7 @@ jobs: { cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ && cibuildwheel --print-build-identifiers --platform macos --arch x86_64 | jq -nRc '{"only": inputs, "os": "macos-13"}' \ - && cibuildwheel --print-build-identifiers --platform macos --arch arm64 | jq -nRc '{"only": inputs, "os": "macos-14"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch arm64 | jq -nRc '{"only": inputs, "os": "macos-13"}' \ && cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc ) From 3efae4b2d9f50ebe4d07bafcfddbe32dd562e38a Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 02:00:11 +0300 Subject: [PATCH 81/91] Switch to older Xcode --- .github/workflows/wheel.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index a372c75050..192794bdb3 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -42,7 +42,7 @@ jobs: { cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ && cibuildwheel --print-build-identifiers --platform macos --arch x86_64 | jq -nRc '{"only": inputs, "os": "macos-13"}' \ - && cibuildwheel --print-build-identifiers --platform macos --arch arm64 | jq -nRc '{"only": inputs, "os": "macos-13"}' \ + && cibuildwheel --print-build-identifiers --platform macos --arch arm64 | jq -nRc '{"only": inputs, "os": "macos-14"}' \ && cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc ) @@ -82,6 +82,10 @@ jobs: if: runner.os == 'Linux' uses: docker/setup-qemu-action@v3 + - name: Switch to older Xcode + if: startswith(matrix.os, 'macos') + run: sudo xcode-select -s "/Applications/Xcode_15.0.1.app" + - uses: pypa/cibuildwheel@v2.17.0 # sync version with pip install cibuildwheel above with: only: ${{ matrix.only }} From 7ed1b54c979d131f75bca5537d24ff6fa5f7ab4d Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:10:09 +0200 Subject: [PATCH 82/91] Fix readthedocs by manually unpinning werkzeug in the graphene-tornado v2.6.1 release # for now we leave graphene-tornado / graphene on v2 # ref https://github.com/vaexio/vaex/pull/2356#issuecomment-2320707228 # in top level vaex[ci] we added the following (additional) direct reference requirement which adds one commit (https://github.com/ddelange/graphene-tornado/commit/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", --- .github/workflows/pythonpackage.yml | 2 +- packages/vaex-graphql/setup.py | 6 +++++- requirements-override.txt | 1 - setup.py | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 requirements-override.txt diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 6d2a548b20..c1e6627e0b 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -59,7 +59,7 @@ jobs: uses: ./ci/actions/windll - name: Install vaex - run: uv pip install -v --override requirements-override.txt --system .[ci] + run: uv pip install -v --system .[ci] - run: uv pip freeze diff --git a/packages/vaex-graphql/setup.py b/packages/vaex-graphql/setup.py index 8a6e8a0860..1be0a1053b 100644 --- a/packages/vaex-graphql/setup.py +++ b/packages/vaex-graphql/setup.py @@ -12,7 +12,11 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/vaexio/vaex' -install_requires_graphql = ['vaex-core>=4.0.0,<5', 'graphene>=2.1.8,<3', 'graphene>=2.1.8,<3', 'graphene-tornado>=2.5.1,<3'] +# for now we leave graphene-tornado / graphene on v2 +# ref https://github.com/vaexio/vaex/pull/2356#issuecomment-2320707228 +# in top level vaex[ci] we added the following (additional) direct reference requirement which adds one commit (https://github.com/ddelange/graphene-tornado/commit/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", +install_requires_graphql = ['vaex-core~=4.0', 'graphene-tornado~=2.5'] setup( name=name + '-graphql', diff --git a/requirements-override.txt b/requirements-override.txt deleted file mode 100644 index ce454c6b98..0000000000 --- a/requirements-override.txt +++ /dev/null @@ -1 +0,0 @@ -Werkzeug>1.0.1 diff --git a/setup.py b/setup.py index 4dbfba4ab0..9288f3ac58 100644 --- a/setup.py +++ b/setup.py @@ -51,6 +51,8 @@ "nbconvert", "jupyterlab", "plotly", + # https://github.com/vaexio/vaex/pull/2356#issuecomment-2320707228 + "graphene-tornado @ https://github.com/ddelange/graphene-tornado/archive/refs/heads/2.6.1.unpin-werkzeug.zip", ] }, ) From 91263bce18acda4a31f6f2599df1ab6f0d2ca41d Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:25:37 +0200 Subject: [PATCH 83/91] Simplify --- packages/vaex-graphql/setup.py | 8 +++----- setup.py | 2 -- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/vaex-graphql/setup.py b/packages/vaex-graphql/setup.py index 1be0a1053b..51e4d66339 100644 --- a/packages/vaex-graphql/setup.py +++ b/packages/vaex-graphql/setup.py @@ -12,11 +12,9 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/vaexio/vaex' -# for now we leave graphene-tornado / graphene on v2 -# ref https://github.com/vaexio/vaex/pull/2356#issuecomment-2320707228 -# in top level vaex[ci] we added the following (additional) direct reference requirement which adds one commit (https://github.com/ddelange/graphene-tornado/commit/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", -install_requires_graphql = ['vaex-core~=4.0', 'graphene-tornado~=2.5'] +# graphene-tornado<3 pins werkzeug 0.12, which creates a conflict with vaex-ml (tensorflow 2.16+ required on python 3.12) +# upgrading to graphene-tornado==3.0.0b2 caused CI to fail, so instead we pin to graphene-tornado==2.6.1 with unpinned werkzeug +install_requires_graphql = ['vaex-core~=4.0', 'graphene-tornado @ https://github.com/ddelange/graphene-tornado/archive/refs/heads/2.6.1.unpin-werkzeug.zip'] setup( name=name + '-graphql', diff --git a/setup.py b/setup.py index 9288f3ac58..4dbfba4ab0 100644 --- a/setup.py +++ b/setup.py @@ -51,8 +51,6 @@ "nbconvert", "jupyterlab", "plotly", - # https://github.com/vaexio/vaex/pull/2356#issuecomment-2320707228 - "graphene-tornado @ https://github.com/ddelange/graphene-tornado/archive/refs/heads/2.6.1.unpin-werkzeug.zip", ] }, ) From 39953026bfc36784ff6956adffe8d08847354db0 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 12:30:45 +0200 Subject: [PATCH 84/91] Revert "Simplify" This reverts commit 91263bce18acda4a31f6f2599df1ab6f0d2ca41d. --- packages/vaex-graphql/setup.py | 8 +++++--- setup.py | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/vaex-graphql/setup.py b/packages/vaex-graphql/setup.py index 51e4d66339..1be0a1053b 100644 --- a/packages/vaex-graphql/setup.py +++ b/packages/vaex-graphql/setup.py @@ -12,9 +12,11 @@ license = 'MIT' version = version.__version__ url = 'https://www.github.com/vaexio/vaex' -# graphene-tornado<3 pins werkzeug 0.12, which creates a conflict with vaex-ml (tensorflow 2.16+ required on python 3.12) -# upgrading to graphene-tornado==3.0.0b2 caused CI to fail, so instead we pin to graphene-tornado==2.6.1 with unpinned werkzeug -install_requires_graphql = ['vaex-core~=4.0', 'graphene-tornado @ https://github.com/ddelange/graphene-tornado/archive/refs/heads/2.6.1.unpin-werkzeug.zip'] +# for now we leave graphene-tornado / graphene on v2 +# ref https://github.com/vaexio/vaex/pull/2356#issuecomment-2320707228 +# in top level vaex[ci] we added the following (additional) direct reference requirement which adds one commit (https://github.com/ddelange/graphene-tornado/commit/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", +install_requires_graphql = ['vaex-core~=4.0', 'graphene-tornado~=2.5'] setup( name=name + '-graphql', diff --git a/setup.py b/setup.py index 4dbfba4ab0..9288f3ac58 100644 --- a/setup.py +++ b/setup.py @@ -51,6 +51,8 @@ "nbconvert", "jupyterlab", "plotly", + # https://github.com/vaexio/vaex/pull/2356#issuecomment-2320707228 + "graphene-tornado @ https://github.com/ddelange/graphene-tornado/archive/refs/heads/2.6.1.unpin-werkzeug.zip", ] }, ) From bac3efb74aa5be6b01853b349b6c13532ad98279 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 20:33:48 +0200 Subject: [PATCH 85/91] Add back tags event trigger for core wheel upload --- .github/workflows/wheel.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 192794bdb3..2bfbf7bbec 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -4,6 +4,8 @@ on: push: branches: - master + tags: + - core-* pull_request: branches: - master From 93ce2c0f02732cc56088c94bba89036708748e31 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:05:58 +0200 Subject: [PATCH 86/91] Switch to trusted publishing --- .github/workflows/wheel-universal.yml | 111 +++++--------------------- 1 file changed, 19 insertions(+), 92 deletions(-) diff --git a/.github/workflows/wheel-universal.yml b/.github/workflows/wheel-universal.yml index 48fb563c30..aaa9cd297c 100644 --- a/.github/workflows/wheel-universal.yml +++ b/.github/workflows/wheel-universal.yml @@ -4,6 +4,8 @@ on: push: branches: - master + tags: + - "*" pull_request: branches: - master @@ -16,144 +18,69 @@ concurrency: jobs: build_wheels: - name: Build wheel on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04] - python-version: [36] + name: Build universal wheels and source distributions + runs-on: ubuntu-latest + permissions: + id-token: write # pypa/gh-action-pypi-publish steps: - uses: actions/checkout@v1 with: submodules: true - - uses: actions/setup-python@v2 - name: Install Python + - uses: actions/setup-python@v5 with: - python-version: '3.7' - - - name: Install twine/wheel - run: | - python -m pip install twine wheel + python-version: '3.12' - name: chores run: | mkdir dist + pip install -U pip setuptools wheel - - name: Build vaex (meta) + - name: Build vaex run: | (cp README.md packages/vaex/ && cd packages/vaex && python setup.py sdist bdist_wheel); cp packages/vaex/dist/* dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/meta') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex }} - run: | - twine upload dist/vaex* dist/vaex* - - name: Build vaex-graphql run: | (cd packages/vaex-graphql && python setup.py sdist bdist_wheel); cp packages/vaex-graphql/dist/* dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/graphql') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_graphql }} - run: | - twine upload dist/vaex-graphql* dist/vaex_graphql* - - - name: Build vaex-jupyter run: | (cd packages/vaex-jupyter && python setup.py sdist bdist_wheel); cp packages/vaex-jupyter/dist/* dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/jupyter') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_jupyter }} - run: | - twine upload dist/vaex-jupyter* dist/vaex_jupyter* - - name: Build vaex-ml run: | (cd packages/vaex-ml && python setup.py sdist bdist_wheel); cp packages/vaex-ml/dist/* dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/ml') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_ml }} - run: | - twine upload dist/vaex-ml* dist/vaex_ml* - - name: Build vaex-contrib run: | (cd packages/vaex-contrib && python setup.py sdist bdist_wheel); cp packages/vaex-contrib/dist/* dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/contrib') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_contrib }} - run: | - twine upload dist/vaex-contrib* dist/vaex_contrib* - - - - name: Build vaex-viz run: | (cd packages/vaex-viz && python setup.py sdist bdist_wheel); cp packages/vaex-viz/dist/* dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/viz') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_viz }} - run: | - twine upload dist/vaex-viz* dist/vaex_viz* - - name: Build vaex-astro run: | (cd packages/vaex-astro && python setup.py sdist bdist_wheel); cp packages/vaex-astro/dist/* dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/astro') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_astro }} - run: | - twine upload dist/vaex-astro* dist/vaex_astro* - - name: Build vaex-hdf5 run: | (cd packages/vaex-hdf5 && python setup.py sdist bdist_wheel); cp packages/vaex-hdf5/dist/* dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/hdf5') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_hdf5 }} - run: | - twine upload dist/vaex-hdf5* dist/vaex_hdf5* - - name: Build vaex-server run: | (cd packages/vaex-server && python setup.py sdist bdist_wheel); cp packages/vaex-server/dist/* dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/server') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_server }} - run: | - openssl sha256 dist/* - twine upload dist/vaex-server* dist/vaex_server* - - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v4 with: - name: distributions + name: distributions-universal path: ./dist + + # https://github.com/pypa/gh-action-pypi-publish#trusted-publishing + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@v1.9.0 + if: startsWith(github.ref, 'refs/tags') + with: + skip-existing: true From f6c8b7916319306c57b4c3c5491c4f8e2aabe063 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:10:03 +0200 Subject: [PATCH 87/91] Add trusted publishing for vaex-core --- .github/workflows/wheel.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 2bfbf7bbec..6ac39efb3e 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -128,13 +128,10 @@ jobs: name: distribution-${{ matrix.only }} path: packages/vaex-core/dist - - name: Publish a Python distribution to PyPI - if: startsWith(github.ref, 'refs/tags/core') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_password_vaex_core }} - run: | - pip install twine wheel - openssl sha256 dist/* - twine upload --skip-existing - working-directory: packages/vaex-core/ + # https://github.com/pypa/gh-action-pypi-publish#trusted-publishing + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@v1.9.0 + if: startsWith(github.ref, 'refs/tags') + with: + skip-existing: true + packages-dir: packages/vaex-core/dist From 7988bb4d02d9cd544e3fc77ad5f19f2a392ee203 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:15:24 +0200 Subject: [PATCH 88/91] Exclude windows 3.8 from pythonpackage.yml --- .github/workflows/pythonpackage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index c1e6627e0b..3ebee992b3 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -24,6 +24,8 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-13] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + exclude: + - {os: windows-latest, python-version: "3.8"} steps: - uses: actions/checkout@v2 From b23f5a7b13c07a1cdfb47f33b93432dc28907b92 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:18:12 +0200 Subject: [PATCH 89/91] Don't upload vaex-core source distribution --- .github/workflows/wheel.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 6ac39efb3e..850c77f2b7 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -113,16 +113,6 @@ jobs: with: files: packages/vaex-core/dist/* - - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Make source distribution - run: | - pip install setuptools - python setup.py sdist - working-directory: packages/vaex-core/ - - uses: actions/upload-artifact@v4 with: name: distribution-${{ matrix.only }} From b594d77469b258285615090b01201d89ed980200 Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 22:41:39 +0300 Subject: [PATCH 90/91] Disable cp38-win vaex-core wheel build --- .github/workflows/wheel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 850c77f2b7..7198456790 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -38,7 +38,7 @@ jobs: - id: set-matrix env: - CIBW_SKIP: pp* + CIBW_SKIP: pp* cp38-win* run: | MATRIX_INCLUDE=$( { From faaf23ef26f1b9fceb645699c9e1ea9324a08cec Mon Sep 17 00:00:00 2001 From: ddelange <14880945+ddelange@users.noreply.github.com> Date: Fri, 30 Aug 2024 23:32:45 +0300 Subject: [PATCH 91/91] Add permission --- .github/workflows/wheel.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 7198456790..7941e01227 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -63,7 +63,8 @@ jobs: include: ${{ fromJson(needs.build_wheels_matrix.outputs.include) }} permissions: - contents: write # for uploading release assets + contents: write # softprops/action-gh-release + id-token: write # pypa/gh-action-pypi-publish steps: - uses: actions/checkout@v4