Compare commits

...

9 commits
v0.4.0 ... main

Author SHA1 Message Date
jupfi
e9610e9261 fix: Numpy types were deprecated leading to erros.
Some checks failed
Python package build on Arch Linux / build (push) Failing after 53s
Python package build on Ubuntu / build (push) Failing after 3m35s
2025-05-03 13:18:15 +02:00
jupfi
f86b162889 Change to forgejo. 2025-05-01 16:49:41 +02:00
Julia P
4d9a980471
Merge pull request #6 from kumitterer/main
Fix Arch CI build error by installing system expat
2024-06-02 19:16:41 +02:00
4a7cdd16b2
2024-06-02 07:25:06 +02:00
Kumi
51fc0a393d
Update python-package.yml 2024-06-02 07:22:28 +02:00
jupfi
64cda090f0 Removed unnecessary linting ignore setting. 2024-06-01 21:02:52 +02:00
jupfi
c0299e9232 Added OS restriction (linux). 2024-04-23 17:55:00 +02:00
Julia P
2af14f0272
Update README.md
Fixed typo.
2024-04-23 11:57:15 +02:00
Pfitzer, Julia
294a95f121 Fixed filenames, updated README. 2024-04-23 11:23:57 +02:00
8 changed files with 53 additions and 29 deletions

View file

@ -4,16 +4,18 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
runs-on: docker
container:
image: node:22-bookworm
steps:
- name: Update package list
run: |
sudo apt-get update
apt-get update
- name: Install git
run: |
sudo apt-get install -y git
apt-get install -y git
- name: Checkout repository
uses: actions/checkout@v2
@ -31,7 +33,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get install -y libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3
apt-get install -y libhdf5-dev limesuite liblimesuite-dev automake gcc pkg-config build-essential python-is-python3
- name: Install the package
run: |

View file

@ -4,11 +4,10 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
runs-on: docker
container:
image: archlinux:latest
options: --privileged
options: '--privileged'
steps:
- name: Install git
@ -22,7 +21,7 @@ jobs:
- name: Install dependencies
run: |
yes | pacman -S python python-pip hdf5 limesuite python-build automake gcc pkgconf base-devel
yes | pacman -S python python-pip hdf5 limesuite python-build automake gcc pkgconf base-devel expat
- name: Install the package
run: |
@ -40,4 +39,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: built-package
path: dist/
path: dist/

View file

@ -1,4 +1,4 @@
name: Build, Test, and Upload Python Package
name: Build, Test, and Upload Python Package (musllinux)
on:
push:
@ -16,18 +16,20 @@ jobs:
deploy:
runs-on: ubuntu-latest
runs-on: docker
container:
image: node:22-bookworm
# needs: [test]
steps:
- name: Update package list
run: |
sudo apt-get update
apt-get update
- name: Install git
run: |
sudo apt-get install -y git
apt-get install -y git
- name: Checkout repository
uses: actions/checkout@v2

View file

@ -1,4 +1,4 @@
name: Build, Test, and Upload Python Package
name: Build, Test, and Upload Python Package (sdist and manylinux)
on:
push:
@ -16,18 +16,20 @@ jobs:
deploy:
runs-on: ubuntu-latest
runs-on: docker
container:
image: node:22-bookworm
# needs: [test]
steps:
- name: Update package list
run: |
sudo apt-get update
apt-get update
- name: Install git
run: |
sudo apt-get install -y git
apt-get install -y git
- name: Checkout repository
uses: actions/checkout@v2

View file

@ -1,6 +1,6 @@
# Python Bindings for LimeDriver
This is a Python package for the [LimeDriver](https://github.com/nqrduck/LimeDriver/) library.
This is a Python package for the [LimeDriver](https://git.private.coffee/nqrduck/LimeDriver/) library.
## Dependencies
@ -27,6 +27,21 @@ python3 -m venv venv
source venv/bin/activate
```
You can install the Python bindings using pip:
```bash
pip install limedriver
```
---
Alternatively you can clone the repository and install the Python bindings from source:
```bash
git clone <this-repo-url>
cd LimeDriverBindings
```
Ensure that the LimeDriver submodule is initialized:
```bash
@ -51,7 +66,7 @@ import limedriver
Npulses = 1000
# Create a new PyLimeConfig object
config = limedriver.PyLimeConfig(Npulses)
config = limedriver.binding.PyLimeConfig(Npulses)
# Modify the config as needed
config.srate = 1e6

View file

@ -11,6 +11,7 @@ classifiers = [
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: 3",
"Operating System :: POSIX :: Linux",
]
dependencies = [
"h5py",
@ -38,16 +39,13 @@ extend-select = [
"D", # pydocstyle
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[project.urls]
"Homepage" = "https://nqrduck.cool"
"Bug Tracker" = "https://github.com/nqrduck/limedriverbindings/issues"
"Source Code" = "https://github.com/nqrduck/limedriverbindings"
"Bug Tracker" = "https://git.private.coffee/nqrduck/limedriverbindings/issues"
"Source Code" = "https://git.private.coffee/nqrduck/limedriverbindings"
[tool.hatch.build.targets.wheel]
packages = ["src/limedriver"]

View file

@ -1,2 +1,2 @@
import limedriver.binding as binding
import limedriver.hdf_reader as hdf_reader
import limedriver.hdf_reader as hdf_reader

View file

@ -40,7 +40,7 @@ class HDF():
# initialize data array
dsize = f[HDFkey].shape
inddim = dsize[0]
self.tdy = np.zeros((int(dsize[1]/2), int(dsize[0] * len(HDFkeys))),dtype=np.complex_)
self.tdy = np.zeros((int(dsize[1]/2), int(dsize[0] * len(HDFkeys))),dtype=np.complex128)
# initialize the output objects
self.attrs = [dynclass() for jj in range(len(HDFkeys))]
@ -66,9 +66,15 @@ class HDF():
# Get the data
data_raw = np.array(f[HDFkey])
try:
self.tdy[:,ii*inddim:(ii+1)*inddim] = np.transpose(np.float_(data_raw[:,::2])) + 1j*np.transpose(np.float_(data_raw[:,1::2]))
except:
pass
self.tdy[:,ii*inddim:(ii+1)*inddim] = np.transpose(np.float64(data_raw[:,::2])) + 1j*np.transpose(np.float64(data_raw[:,1::2]))
except Exception as e:
print('Problem reading the data of the HDF file! Error: ' + str(e))
self.tdy = []
self.tdx = []
self.attrs = []
self.parsoutp = {}
self.parvar = {}
return
# Get the arguments