Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 0 additions & 132 deletions .github/workflows/deploy.yml

This file was deleted.

25 changes: 22 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

name: Test Binary Wheels
name: Binary Wheels

on: workflow_dispatch
on:
workflow_dispatch:
release:
types: [ published ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -109,5 +112,21 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: wheels_cp${{ matrix.python }}-${{ matrix.builder }}_${{ matrix.arch }}
name: flacarray-cp${{ matrix.python }}-${{ matrix.builder }}_${{ matrix.arch }}
path: ./wheelhouse/flacarray*cp${{ matrix.python }}-${{ matrix.builder }}*${{ matrix.arch }}*.whl

upload_pypi:
needs: build_wheels
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
# Unpacks all artifacts into dist/
pattern: flacarray-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ libflac = dependency('flac', version: '>= 1.4.0', static: false)

py = import('python').find_installation(pure: false)

subdir('flacarray')
subdir('src')
1 change: 1 addition & 0 deletions packaging/pip_build_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ cmake
cython
meson
meson-python
numpy
h5py
zarr
22 changes: 3 additions & 19 deletions packaging/wheels/install_deps_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,11 @@ pip install --upgrade pip
# Install a couple of base packages that are always required
pip install -v cmake wheel

# In order to maximize ABI compatibility with numpy, build with the newest numpy
# version containing the oldest ABI version compatible with the python we are using.
# NOTE: for now, we build with numpy 2.0.x, which is backwards compatible with
# numpy-1.x and forward compatible with numpy-2.x.
# Python major/minor version
pyver=$(python3 --version 2>&1 | awk '{print $2}' | sed -e "s#\(.*\)\.\(.*\)\..*#\1.\2#")
# if [ ${pyver} == "3.8" ]; then
# numpy_ver="1.20"
# fi
# if [ ${pyver} == "3.9" ]; then
# numpy_ver="1.20"
# fi
# if [ ${pyver} == "3.10" ]; then
# numpy_ver="1.22"
# fi
# if [ ${pyver} == "3.11" ]; then
# numpy_ver="1.24"
# fi
numpy_ver="2.0.1"

# Install build requirements.
CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/../pip_build_requirements.txt" "numpy==${numpy_ver}"
CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/../pip_build_requirements.txt"

# Build compiled dependencies

Expand All @@ -66,7 +50,7 @@ export STATIC="${static}"
export SHLIBEXT="so"
export CLEANUP=yes

flac_version=1.4.3
flac_version=1.5.0
flac_dir=flac-${flac_version}
flac_pkg=${flac_dir}.tar.gz

Expand Down
22 changes: 3 additions & 19 deletions packaging/wheels/install_deps_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,11 @@ pip install --upgrade pip
# Install a couple of base packages that are always required
pip install -v wheel

# In order to maximize ABI compatibility with numpy, build with the newest numpy
# version containing the oldest ABI version compatible with the python we are using.
# NOTE: for now, we build with numpy 2.0.x, which is backwards compatible with
# numpy-1.x and forward compatible with numpy-2.x.
# Python major / minor version
pyver=$(python3 --version 2>&1 | awk '{print $2}' | sed -e "s#\(.*\)\.\(.*\)\..*#\1.\2#")
# if [ ${pyver} == "3.8" ]; then
# numpy_ver="1.20"
# fi
# if [ ${pyver} == "3.9" ]; then
# numpy_ver="1.24"
# fi
# if [ ${pyver} == "3.10" ]; then
# numpy_ver="1.24"
# fi
# if [ ${pyver} == "3.11" ]; then
# numpy_ver="1.24"
# fi
numpy_ver="2.0.1"

# Install build requirements.
CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/../pip_build_requirements.txt" "numpy==${numpy_ver}"
CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/../pip_build_requirements.txt"

# Build compiled dependencies

Expand All @@ -91,7 +75,7 @@ export STATIC=no
export SHLIBEXT="dylib"
export CLEANUP=yes

flac_version=1.4.3
flac_version=1.5.0
flac_dir=flac-${flac_version}
flac_pkg=${flac_dir}.tar.gz

Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions flacarray/array.py → src/flacarray/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# a BSD-style license that can be found in the LICENSE file.

import copy
import logging

import numpy as np

Expand All @@ -12,11 +11,10 @@
from .hdf5 import write_compressed as hdf5_write_compressed
from .hdf5 import read_compressed as hdf5_read_compressed
from .mpi import global_bytes, global_array_properties
from .utils import log
from .zarr import write_compressed as zarr_write_compressed
from .zarr import read_compressed as zarr_read_compressed

log = logging.getLogger("flacarray")


class FlacArray:
"""FLAC compressed array representation.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion flacarray/hdf5.py → src/flacarray/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
versions.

"""

import importlib

import numpy as np
Expand Down
7 changes: 1 addition & 6 deletions flacarray/hdf5_load_v0.py → src/flacarray/hdf5_load_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
functions.

"""

import logging

import numpy as np

from .decompress import array_decompress
Expand All @@ -20,10 +17,8 @@
select_keep_indices,
read_compressed_dataset_slice,
)
from .utils import function_timer

from .utils import function_timer, log

log = logging.getLogger("flacarray")

"""The dataset and attribute names."""
hdf5_names = {
Expand Down
4 changes: 1 addition & 3 deletions flacarray/hdf5_utils.py → src/flacarray/hdf5_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# All rights reserved. Use of this source code is governed by
# a BSD-style license that can be found in the LICENSE file.

import logging
import os
import tempfile

Expand All @@ -15,8 +14,7 @@
have_hdf5 = False

from .mpi import MPI, use_mpi

log = logging.getLogger("flacarray")
from .utils import log


# Test whether h5py supports parallel I/O
Expand Down
8 changes: 1 addition & 7 deletions flacarray/io_common.py → src/flacarray/io_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@
This module contains helper tools used by multiple I/O formats.

"""

import logging

import numpy as np

from .utils import keep_select, function_timer, select_keep_indices


log = logging.getLogger("flacarray")
from .utils import keep_select, function_timer, select_keep_indices, log


@function_timer
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions flacarray/mpi.py → src/flacarray/mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
# a BSD-style license that can be found in the LICENSE file.

import os
import logging

import numpy as np

log = logging.getLogger("flacarray")
from .utils import log


if "MPI_DISABLE" in os.environ:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions flacarray/tests/hdf5.py → src/flacarray/tests/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ def test_direct_write_read(self):
use_threads=True,
)

if self.comm is not None:
self.comm.barrier()
del tmppath
del tmpdir

Expand Down Expand Up @@ -267,6 +269,8 @@ def test_array_write_read(self):
with H5File(f64_file, "r", comm=self.comm) as hf:
check_f64 = FlacArray.read_hdf5(hf.handle, mpi_comm=self.comm)

if self.comm is not None:
self.comm.barrier()
del tmppath
del tmpdir

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading