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: jobs:
build: build:
runs-on: ubuntu-latest runs-on: docker
container:
image: node:22-bookworm
steps: steps:
- name: Update package list - name: Update package list
run: | run: |
sudo apt-get update apt-get update
- name: Install git - name: Install git
run: | run: |
sudo apt-get install -y git apt-get install -y git
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -31,7 +33,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | 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 - name: Install the package
run: | run: |

View file

@ -4,11 +4,10 @@ on: [push, pull_request]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: docker
container: container:
image: archlinux:latest image: archlinux:latest
options: --privileged options: '--privileged'
steps: steps:
- name: Install git - name: Install git
@ -22,7 +21,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | 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 - name: Install the package
run: | run: |

View file

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

View file

@ -1,6 +1,6 @@
# Python Bindings for LimeDriver # 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 ## Dependencies
@ -27,6 +27,21 @@ python3 -m venv venv
source venv/bin/activate 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: Ensure that the LimeDriver submodule is initialized:
```bash ```bash
@ -51,7 +66,7 @@ import limedriver
Npulses = 1000 Npulses = 1000
# Create a new PyLimeConfig object # Create a new PyLimeConfig object
config = limedriver.PyLimeConfig(Npulses) config = limedriver.binding.PyLimeConfig(Npulses)
# Modify the config as needed # Modify the config as needed
config.srate = 1e6 config.srate = 1e6

View file

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

View file

@ -40,7 +40,7 @@ class HDF():
# initialize data array # initialize data array
dsize = f[HDFkey].shape dsize = f[HDFkey].shape
inddim = dsize[0] 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 # initialize the output objects
self.attrs = [dynclass() for jj in range(len(HDFkeys))] self.attrs = [dynclass() for jj in range(len(HDFkeys))]
@ -66,9 +66,15 @@ class HDF():
# Get the data # Get the data
data_raw = np.array(f[HDFkey]) data_raw = np.array(f[HDFkey])
try: try:
self.tdy[:,ii*inddim:(ii+1)*inddim] = np.transpose(np.float_(data_raw[:,::2])) + 1j*np.transpose(np.float_(data_raw[:,1::2])) self.tdy[:,ii*inddim:(ii+1)*inddim] = np.transpose(np.float64(data_raw[:,::2])) + 1j*np.transpose(np.float64(data_raw[:,1::2]))
except: except Exception as e:
pass 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 # Get the arguments