Compare commits

..

No commits in common. "449c56c85e8faad51533e1a160b8f74029bcc9b8" and "620b5809ee917e149ef0f3ba2c3687004ad44356" have entirely different histories.

4 changed files with 15 additions and 36 deletions

View file

@ -39,25 +39,20 @@ jobs:
with: with:
python-version: "3.10" python-version: "3.10"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Prepare Python environment - name: Prepare Python environment
run: | run: |
python -m venv venv python -m venv venv
. ./venv/bin/activate . ./venv/bin/activate
pip install -U twine cibuildwheel pip install --upgrade pip h5py setuptools wheel build
- name: Build wheels - name: Install dependencies
run: | run: |
. ./venv/bin/activate sudo apt-get install -y libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3
python -m cibuildwheel --output-dir dist
env:
CIBW_BEFORE_BUILD: ./build_wheel.sh
- name: Publish to PyPI - name: Publish to PyPI
run: | run: |
. ./venv/bin/activate pip install -U twine cibuildwheel
python -m cibuildwheel .
python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/* python -m twine upload --repository pypi --username __token__ --password ${{ secrets.PYPI }} dist/*
env: env:
PYPI: ${{ secrets.PYPI }} PYPI: ${{ secrets.PYPI }}

View file

@ -1,16 +0,0 @@
#!/bin/bash
set -ex # will exit on any error and print all commands
yum install -y epel-release
yum update -y # Update the system
yum groupinstall -y "Development Tools"
yum install -y cmake3 git libusb-devel hdf5-devel
# Clone and build LimeSuite
rm -rf LimeSuite
git clone https://github.com/myriadrf/LimeSuite.git
cd LimeSuite/build || exit
cmake3 ../ -DENABLE_GUI=OFF
make -j$(nproc)
make install
ldconfig

View file

@ -14,6 +14,7 @@ classifiers = [
] ]
dependencies = [ dependencies = [
"h5py", "h5py",
"matplotlib",
] ]
[build-system] [build-system]
@ -23,6 +24,7 @@ requires = [
"Cython", "Cython",
"h5py", "h5py",
"numpy", "numpy",
'matplotlib',
] ]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
@ -50,13 +52,4 @@ convention = "google"
"Source Code" = "https://github.com/nqrduck/limedriverbindings" "Source Code" = "https://github.com/nqrduck/limedriverbindings"
[tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel]
packages = ["src/limedriver"] packages = ["src/limedriver"]
[tool.cibuildwheel]
manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64"
manylinux-ppc64le-image = "quay.io/pypa/manylinux_2_28_ppc64le"
manylinux-s390x-image = "quay.io/pypa/manylinux_2_28_s390x"
[tool.cibuildwheel.linux]
archs = ["aarch64", "x86_64", "ppc64le", "s390x"]

View file

@ -1,5 +1,6 @@
import h5py import h5py
import numpy as np import numpy as np
import matplotlib.pyplot as plt
# class for accessing data of stored HDF5 file this is from the limr program by andrin doll # class for accessing data of stored HDF5 file this is from the limr program by andrin doll
class HDF(): class HDF():
@ -130,6 +131,12 @@ class HDF():
print('{:<5}: {:>50} {:<25}'.format(key, val, self.parsoutp[key][1])) print('{:<5}: {:>50} {:<25}'.format(key, val, self.parsoutp[key][1]))
def plot_dta(self):
plt.plot(self.tdx, self.tdy.real)
plt.xlabel('$t$ [$\mu$s]')
plt.ylabel('$y$ [Counts]')
plt.show()
# empty class to store dynamic attributes, basically for the attributes in HDF keys # empty class to store dynamic attributes, basically for the attributes in HDF keys
class dynclass: class dynclass:
pass pass