Compare commits

..

No commits in common. "master" and "v2.1.16" have entirely different histories.

14 changed files with 56 additions and 27 deletions

View File

@ -23,13 +23,40 @@ jobs:
- name: Display files - name: Display files
run: ls -lR run: ls -lR
build_wheels: build_wheels_ubuntu:
name: Build binary wheels on ${{ matrix.os }} name: Build binary wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
needs: [build_setup] needs: [build_setup]
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.1.2
- name: Get wheel configuration files
uses: actions/download-artifact@v4.1.7
with:
name: wheel-config
path: python/
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
working-directory: python/
- name: Store binary wheels
uses: actions/upload-artifact@v4.6.0
with:
name: binary-wheels-${{matrix.os}}-${{ strategy.job-index }}
path: python/wheelhouse/*.whl
build_wheels_windows:
name: Build binary wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: [build_setup]
strategy:
matrix:
os: [windows-latest]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -78,7 +105,7 @@ jobs:
upload_pypi: upload_pypi:
name: Upload wheels to PyPI name: Upload wheels to PyPI
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
needs: [build_wheels, build_sdist] needs: [build_wheels_ubuntu, build_wheels_windows, build_sdist]
steps: steps:
- name: Get source wheels - name: Get source wheels

View File

@ -2,7 +2,7 @@
[![LICENSE](https://img.shields.io/github/license/RecordEvolution/IMCtermite)](https://img.shields.io/github/license/RecordEvolution/IMCtermite) [![LICENSE](https://img.shields.io/github/license/RecordEvolution/IMCtermite)](https://img.shields.io/github/license/RecordEvolution/IMCtermite)
[![STARS](https://img.shields.io/github/stars/RecordEvolution/IMCtermite)](https://img.shields.io/github/stars/RecordEvolution/IMCtermite) [![STARS](https://img.shields.io/github/stars/RecordEvolution/IMCtermite)](https://img.shields.io/github/stars/RecordEvolution/IMCtermite)
![CI Build Wheel](https://github.com/RecordEvolution/IMCtermite/actions/workflows/pypi-deploy.yml/badge.svg?branch=&event=push) ![CI Build Wheel](https://github.com/RecordEvolution/IMCtermite/actions/workflows/pypi-deploy.yml/badge.svg?branch=&event=push)
[![PYPI](https://img.shields.io/pypi/v/IMCtermite.svg)](https://pypi.org/project/imctermite/) [![PYPI](https://img.shields.io/pypi/v/IMCtermite.svg)](https://pypi.org/project/IMCtermite/)
# IMCtermite # IMCtermite
@ -131,21 +131,24 @@ which may require root permissions.
### Python ### Python
To integrate the library into a customized ETL toolchain, several python targets To integrate the library into a customized ETL toolchain, several cython targets
are available. For a local build that enables you to run the examples, use: are available. For a local build that enables you to run the examples, use:
``` ```
make python-build make cython-build
``` ```
However, in a production environment, a proper installation of the module with
`make cython-install` is recommended for system-wide availability of the module.
#### Installation with pip #### Installation with pip
The package is also available in the [Python Package Index](https://pypi.org) The package is also available in the [Python Package Index](https://pypi.org)
at [imctermite](https://pypi.org/project/imctermite/). at [IMCtermite](https://pypi.org/project/IMCtermite/).
To install the latest version simply do To install the latest version simply do
```Shell ```Shell
python3 -m pip install imctermite python3 -m pip install IMCtermite
``` ```
which provides binary wheels for multiple architectures on _Windows_ and _Linux_ which provides binary wheels for multiple architectures on _Windows_ and _Linux_
@ -192,9 +195,9 @@ Given the `IMCtermite` module is available, we can import it and declare an inst
of it by passing a _raw_ file to the constructor: of it by passing a _raw_ file to the constructor:
```Python ```Python
import imctermite import IMCtermite
imcraw = imctermite.imctermite(b"sample/sampleA.raw") imcraw = IMCtermite.imctermite(b"sample/sampleA.raw")
``` ```
An example of how to create an instance and obtain the list of channels is: An example of how to create an instance and obtain the list of channels is:

View File

@ -88,11 +88,11 @@ docker-run:
python-build: check-tags $(GVSN) python-build: check-tags $(GVSN)
make -C python/ build-inplace make -C python/ build-inplace
cp python/imctermite*.so ./ -v cp python/IMCtermite*.so ./ -v
python-clean: python-clean:
make -C python/ clean make -C python/ clean
rm -vf imctermite*.so rm -vf IMCtermite*.so
python-test: python-test:
PYTHONPATH=./ python python/examples/usage.py PYTHONPATH=./ python python/examples/usage.py

View File

@ -1,7 +1,7 @@
# distutils: language = c++ # distutils: language = c++
# cython: language_level = 3 # cython: language_level = 3
from imctermite cimport cppimctermite from IMCtermite cimport cppimctermite
import json as jn import json as jn
import decimal import decimal

View File

@ -1 +1 @@
2.1.18 2.1.16

View File

@ -1,5 +1,5 @@
import imctermite import IMCtermite
import pandas import pandas
import datetime import datetime
@ -11,7 +11,7 @@ def add_trigger_time(trigger_time, add_time) :
if __name__ == "__main__" : if __name__ == "__main__" :
# read file and extract data # read file and extract data
imctm = imctermite.imctermite(b"Measurement.raw") imctm = IMCtermite.imctermite(b"Measurement.raw")
chns = imctm.get_channels(True) chns = imctm.get_channels(True)
# prepare abscissa # prepare abscissa

View File

@ -1,11 +1,11 @@
import imctermite import IMCtermite
import json import json
import os import os
# declare and initialize instance of "imctermite" by passing a raw-file # declare and initialize instance of "imctermite" by passing a raw-file
try : try :
imcraw = imctermite.imctermite(b"samples/exampleB.raw") imcraw = IMCtermite.imctermite(b"samples/exampleB.raw")
except RuntimeError as e : except RuntimeError as e :
raise Exception("failed to load/parse raw-file: " + str(e)) raise Exception("failed to load/parse raw-file: " + str(e))

View File

@ -1,5 +1,5 @@
import imctermite import IMCtermite
import json import json
import os import os
@ -15,7 +15,7 @@ for fl in rawlist1:
# declare and initialize instance of "imctermite" by passing a raw-file # declare and initialize instance of "imctermite" by passing a raw-file
try : try :
imcraw = imctermite.imctermite(fl.encode()) imcraw = IMCtermite.imctermite(fl.encode())
except RuntimeError as e : except RuntimeError as e :
raise Exception("failed to load/parse raw-file: " + str(e)) raise Exception("failed to load/parse raw-file: " + str(e))

View File

@ -1,12 +1,12 @@
import imctermite import IMCtermite
import json import json
import os import os
import datetime import datetime
# declare and initialize instance of "imctermite" by passing a raw-file # declare and initialize instance of "imctermite" by passing a raw-file
try : try :
imcraw = imctermite.imctermite(b"samples/sampleB.raw") imcraw = IMCtermite.imctermite(b"samples/sampleB.raw")
except RuntimeError as e : except RuntimeError as e :
raise Exception("failed to load/parse raw-file: " + str(e)) raise Exception("failed to load/parse raw-file: " + str(e))

View File

@ -1,5 +1,5 @@
import imctermite import imctermite from IMCtermite import imctermite
def show_results(imcraw) : def show_results(imcraw) :

View File

@ -29,7 +29,6 @@ build-clean:
rm -vf imctermite*.so imctermite*.cpp rm -vf imctermite*.so imctermite*.cpp
rm -vf IMCtermite*.so IMCtermite*.cpp rm -vf IMCtermite*.so IMCtermite*.cpp
rm -rvf dist/ IMCtermite.egg-info/ rm -rvf dist/ IMCtermite.egg-info/
rm -rvf dist/ imctermite.egg-info/
cibuildwheel-build: setup cibuildwheel-build: setup
cibuildwheel --platform linux cibuildwheel --platform linux

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = imctermite name = IMCtermite
description = Enables extraction of measurement data from binary files with extension 'raw' used by proprietary software imcFAMOS and imcSTUDIO and facilitates its storage in open source file formats description = Enables extraction of measurement data from binary files with extension 'raw' used by proprietary software imcFAMOS and imcSTUDIO and facilitates its storage in open source file formats
long_description = file: README.md long_description = file: README.md
# long_description_content_type = text/x-rst # long_description_content_type = text/x-rst

View File

@ -11,8 +11,8 @@ cmpArgs = {
} }
extension = Extension( extension = Extension(
"imctermite", "IMCtermite",
sources=["imctermite.pyx"], sources=["IMCtermite.pyx"],
extra_compile_args=cmpArgs[sys.platform] extra_compile_args=cmpArgs[sys.platform]
) )