Skip to content

implement same_value casting for numpy <-> quadtype #555

implement same_value casting for numpy <-> quadtype

implement same_value casting for numpy <-> quadtype #555

Workflow file for this run

name: Numpy User DTypes CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
numpy-version: ['2.3.2', 'nightly']
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install build and test dependencies
run: |
python -m pip install -U pip build pytest unyt wheel meson ninja meson-python patchelf pandas
- name: Install numpy nightly
if: matrix.numpy-version == 'nightly'
run: |
pip install --pre --upgrade --timeout=60 -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
- name: Install numpy from PyPI
if: matrix.numpy-version != 'nightly'
run: |
pip install "numpy==${{ matrix.numpy-version }}"
- name: Install asciidtype
working-directory: asciidtype
run: |
CFLAGS="-Werror" python -m pip install . --no-build-isolation
- name: Run asciidtype tests
working-directory: asciidtype
run: |
pytest -vvv --color=yes
- name: Install metadatadtype
working-directory: metadatadtype
run: |
python -m build --no-isolation --wheel -Cbuilddir=build
find ./dist/*.whl | xargs python -m pip install
- name: Run metadatadtype tests
working-directory: metadatadtype
run: |
pytest -vvv --color=yes
- name: install mpfdtype
working-directory: mpfdtype
run: |
sudo apt install libmpfr-dev -y
CFLAGS="-Werror" python -m pip install . --no-build-isolation
- name: Run mpfdtype tests
working-directory: mpfdtype
run: |
pytest -vvv --color=yes
- name: Install unytdtype
working-directory: unytdtype
run: |
python -m build --no-isolation --wheel -Cbuilddir=build
find ./dist/*.whl | xargs python -m pip install
- name: Run unytdtype tests
working-directory: unytdtype
run: |
pytest -vvv --color=yes
- name: Install quaddtype dependencies
run: |
sudo apt-get update
sudo apt-get install -y libmpfr-dev libssl-dev libfftw3-dev
- name: Install quaddtype
working-directory: quaddtype
run: |
if [ "${{ matrix.numpy-version }}" == "nightly" ]; then
# obscure errors when using command line 2_4 if numpy does not define it
python -c "import numpy as np; assert np.__version__ >= '2.4'"
extra_args="-Csetup-args=-Dcpp_args=-DNPY_TARGET_VERSION=NPY_2_4_API_VERSION --no-build-isolation"
fi
export LDFLAGS="-fopenmp"
python -m pip install $extra_args . -v
- name: Run quaddtype tests
working-directory: quaddtype
run: |
pytest -vvv --color=yes
- name: Install stringdtype
working-directory: stringdtype
run: |
if [ -d "build/" ]
then
rm -r build
fi
meson setup build
python -m build --no-isolation --wheel -Cbuilddir=build --config-setting='compile-args=-v' -Csetup-args="-Dbuildtype=debug"
find ./dist/*.whl | xargs python -m pip install
- name: Run stringdtype tests
working-directory: stringdtype
run: |
pytest -s -vvv --color=yes
pip uninstall -y pandas
pytest -s -vvv --color=yes