Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
04d523d9be | |||
48580caab0 | |||
32e36aae00 | |||
f531b0fe90 | |||
511b665643 | |||
5b6ca45f18 | |||
3dd3cf1446 | |||
b91f273cb8 | |||
fe741b698c | |||
d53e057dca | |||
6c1fd021c2 | |||
![]() |
177f368fdf | ||
![]() |
73ff748ff4 | ||
193d9ac010 | |||
b4136c0b03 | |||
![]() |
759c88dfb4 | ||
![]() |
dec58d4668 |
41
.github/workflows/pypi-deploy.yml
vendored
41
.github/workflows/pypi-deploy.yml
vendored
@ -1,25 +1,26 @@
|
|||||||
|
|
||||||
name: Build Python Wheels
|
name: CI Build Wheel
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
#branches: [master]
|
|
||||||
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build_setup:
|
build_setup:
|
||||||
name: Prepare environment for wheel builds
|
name: Prepare environment for wheel builds
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Prepare wheel build
|
- name: Prepare wheel build
|
||||||
run: make -C python/ setup
|
run: make -C python/ setup
|
||||||
- name: Store wheel configuration files
|
- name: Store wheel configuration files
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4.6.0
|
||||||
with:
|
with:
|
||||||
name: wheel-config
|
name: wheel-config
|
||||||
path: python/
|
path: python/
|
||||||
|
- name: Display files
|
||||||
|
run: ls -lR
|
||||||
|
|
||||||
build_wheels:
|
build_wheels:
|
||||||
name: Build binary wheels on ${{ matrix.os }}
|
name: Build binary wheels on ${{ matrix.os }}
|
||||||
@ -27,8 +28,7 @@ jobs:
|
|||||||
needs: [build_setup]
|
needs: [build_setup]
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, windows-2019]
|
os: [ubuntu-latest, windows-latest]
|
||||||
arch: [auto32, auto64, aarch64]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -36,31 +36,29 @@ jobs:
|
|||||||
- name: Install cibuildwheel
|
- name: Install cibuildwheel
|
||||||
run: python -m pip install cibuildwheel==2.1.2
|
run: python -m pip install cibuildwheel==2.1.2
|
||||||
- name: Get wheel configuration files
|
- name: Get wheel configuration files
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v4.1.7
|
||||||
with:
|
with:
|
||||||
name: wheel-config
|
name: wheel-config
|
||||||
path: python/
|
path: python/
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
run: python -m cibuildwheel --output-dir wheelhouse
|
run: python -m cibuildwheel --output-dir wheelhouse
|
||||||
working-directory: python/
|
working-directory: python/
|
||||||
# env:
|
|
||||||
# CIBW_BUILD: cp36-* cp37-* cp38-* cp39-* cp310-*
|
|
||||||
- name: Store binary wheels
|
- name: Store binary wheels
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4.6.0
|
||||||
with:
|
with:
|
||||||
name: binary-wheels
|
name: binary-wheels-${{matrix.os}}-${{ strategy.job-index }}
|
||||||
path: python/wheelhouse/*.whl
|
path: python/wheelhouse/*.whl
|
||||||
|
|
||||||
build_sdist:
|
build_sdist:
|
||||||
name: Build source distribution
|
name: Build source distribution
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
needs: [build_setup]
|
needs: [build_setup]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install cython
|
- name: Install cython
|
||||||
run: python -m pip install cython==0.29.24
|
run: python -m pip install cython==0.29.24
|
||||||
- name: Get wheel configuration files
|
- name: Get wheel configuration files
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v4.1.7
|
||||||
with:
|
with:
|
||||||
name: wheel-config
|
name: wheel-config
|
||||||
path: python/
|
path: python/
|
||||||
@ -68,28 +66,33 @@ jobs:
|
|||||||
run: python setup.py sdist
|
run: python setup.py sdist
|
||||||
working-directory: python/
|
working-directory: python/
|
||||||
- name: Store source wheels
|
- name: Store source wheels
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4.6.0
|
||||||
with:
|
with:
|
||||||
name: source-wheels
|
name: source-wheels
|
||||||
path: python/dist/*.tar.gz
|
path: python/dist/*.tar.gz
|
||||||
|
- name: Display files
|
||||||
|
run: ls -lR
|
||||||
|
|
||||||
|
|
||||||
upload_pypi:
|
upload_pypi:
|
||||||
name: Upload binary wheels to PyPI
|
name: Upload wheels to PyPI
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-24.04
|
||||||
needs: [build_wheels, build_sdist]
|
needs: [build_wheels, build_sdist]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get source wheels
|
- name: Get source wheels
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v4.1.7
|
||||||
with:
|
with:
|
||||||
name: source-wheels
|
name: source-wheels
|
||||||
path: dist/
|
path: dist/
|
||||||
- name: Get binary wheels
|
- name: Get binary wheels
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v4.1.7
|
||||||
with:
|
with:
|
||||||
name: binary-wheels
|
|
||||||
path: dist/
|
path: dist/
|
||||||
|
pattern: binary-wheels-*
|
||||||
|
merge-multiple: true
|
||||||
|
- name: Display files
|
||||||
|
run: ls -lR
|
||||||
|
|
||||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -23,3 +23,10 @@ pip/*.cpp
|
|||||||
pip/*.pyx
|
pip/*.pyx
|
||||||
pip/*.pxd
|
pip/*.pxd
|
||||||
pip/LICENSE
|
pip/LICENSE
|
||||||
|
|
||||||
|
python/3rdparty/
|
||||||
|
python/LICENSE
|
||||||
|
python/README.md
|
||||||
|
python/TDMtermite.cpp
|
||||||
|
python/lib/
|
||||||
|
|
||||||
|
22
README.md
22
README.md
@ -1,10 +1,8 @@
|
|||||||
|
|
||||||
[](https://lgtm.com/projects/g/RecordEvolution/TDMtermite/alerts/)
|
|
||||||
[](https://lgtm.com/projects/g/RecordEvolution/TDMtermite/context:cpp)
|
|
||||||
[](https://lgtm.com/projects/g/RecordEvolution/TDMtermite/context:python)
|
|
||||||
[](https://img.shields.io/github/license/RecordEvolution/TDMtermite)
|
[](https://img.shields.io/github/license/RecordEvolution/TDMtermite)
|
||||||
[](https://img.shields.io/github/stars/RecordEvolution/TDMtermite)
|
[](https://img.shields.io/github/stars/RecordEvolution/TDMtermite)
|
||||||

|

|
||||||
|
[](https://pypi.org/project/tdmtermite/)
|
||||||
|
|
||||||
# TDMtermite
|
# TDMtermite
|
||||||
|
|
||||||
@ -166,10 +164,10 @@ which makes the module available for import by `import tdm_termite` .
|
|||||||
#### Installation with pip
|
#### Installation with pip
|
||||||
|
|
||||||
The package is also available via the [Python Package Index](https://pypi.org) at
|
The package is also available via the [Python Package Index](https://pypi.org) at
|
||||||
[TDMtermite](https://pypi.org/project/TDMtermite/). To install the latest version simply do
|
[TDMtermite](https://pypi.org/project/tdmtermite/). To install the latest version simply do
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
python3 -m pip install TDMtermite
|
python3 -m pip install tdmtermite
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Unix
|
##### Unix
|
||||||
@ -226,7 +224,7 @@ To be able to use the Python module _tdm_termite_, it first has to be built loca
|
|||||||
or installed on the system. In the Python interpreter, simply do:
|
or installed on the system. In the Python interpreter, simply do:
|
||||||
|
|
||||||
```Python
|
```Python
|
||||||
import TDMtermite
|
import tdmtermite
|
||||||
```
|
```
|
||||||
|
|
||||||
This will import the module. The TDM files are provided by creating an instance of
|
This will import the module. The TDM files are provided by creating an instance of
|
||||||
@ -235,7 +233,7 @@ the _tdmtermite_ class:
|
|||||||
```Python
|
```Python
|
||||||
# create 'tdmtermite' instance object
|
# create 'tdmtermite' instance object
|
||||||
try :
|
try :
|
||||||
jack = TDMtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
jack = tdmtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
print("failed to load/decode TDM files: " + str(e))
|
print("failed to load/decode TDM files: " + str(e))
|
||||||
```
|
```
|
||||||
@ -256,12 +254,12 @@ As a use case, we have a look at listing the ids of all channelgroups and printi
|
|||||||
their data to separate files:
|
their data to separate files:
|
||||||
|
|
||||||
```Python
|
```Python
|
||||||
import TDMtermite
|
import tdmtermite
|
||||||
import re
|
import re
|
||||||
|
|
||||||
# create 'tdmtermite' instance object
|
# create 'tdmtermite' instance object
|
||||||
try :
|
try :
|
||||||
jack = TDMtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
jack = tdmtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
||||||
except RuntimeError as e :
|
except RuntimeError as e :
|
||||||
print("failed to load/decode TDM files: " + str(e))
|
print("failed to load/decode TDM files: " + str(e))
|
||||||
|
|
||||||
@ -295,8 +293,8 @@ to simply extract all data of the TDM datatset and dump it to files in a given
|
|||||||
(existing!) directory, do
|
(existing!) directory, do
|
||||||
|
|
||||||
```Python
|
```Python
|
||||||
import TDMtermite
|
import tdmtermite
|
||||||
jack = TDMtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
jack = tdmtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
||||||
jack.write_all(b"./my_tdm_data_directory/")
|
jack.write_all(b"./my_tdm_data_directory/")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <bit>
|
|
||||||
|
|
||||||
#include "pugixml.hpp"
|
#include "pugixml.hpp"
|
||||||
#include "tdm_datamodel.hpp"
|
#include "tdm_datamodel.hpp"
|
||||||
|
@ -1 +1 @@
|
|||||||
2.0.1
|
2.1.3
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
import TDMtermite
|
import tdmtermite
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
|
||||||
# create 'tdm_termite' instance object
|
# create 'tdm_termite' instance object
|
||||||
try :
|
try :
|
||||||
jack = TDMtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
jack = tdmtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
||||||
except RuntimeError as e :
|
except RuntimeError as e :
|
||||||
print("failed to load/decode TDM files: " + str(e))
|
print("failed to load/decode TDM files: " + str(e))
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
import TDMtermite
|
import tdmtermite
|
||||||
|
|
||||||
# create 'tdm_termite' instance object
|
# create 'tdm_termite' instance object
|
||||||
try :
|
try :
|
||||||
jack = TDMtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
jack = tdmtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
||||||
# list ids of channelgroups
|
# list ids of channelgroups
|
||||||
grpids = jack.get_channelgroup_ids()
|
grpids = jack.get_channelgroup_ids()
|
||||||
# iterate through groups
|
# iterate through groups
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
import TDMtermite
|
import tdmtermite
|
||||||
# import numpy as np
|
# import numpy as np
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
|
||||||
# create 'tdm_termite' instance object
|
# create 'tdm_termite' instance object
|
||||||
try :
|
try :
|
||||||
jack = TDMtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
jack = tdmtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
||||||
except RuntimeError as e :
|
except RuntimeError as e :
|
||||||
print("failed to load/decode TDM files: " + str(e))
|
print("failed to load/decode TDM files: " + str(e))
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ build-bdist: setup
|
|||||||
|
|
||||||
build-clean:
|
build-clean:
|
||||||
python setup.py clean --all
|
python setup.py clean --all
|
||||||
rm -vf TDMtermite*.so TDMtermite*.cpp
|
rm -vf tdmtermite*.so tdmtermite*.cpp
|
||||||
rm -rvf dist/ IMCtermite.egg-info/
|
rm -rvf dist/ tdmtermite.egg-info/
|
||||||
|
|
||||||
cibuildwheel-build: setup
|
cibuildwheel-build: setup
|
||||||
cibuildwheel --platform linux
|
cibuildwheel --platform linux
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
name = TDMtermite
|
name = tdmtermite
|
||||||
description = Extract and read data from National Instruments LabVIEW tdx/tdm files and export them as csv files
|
description = Extract and read data from National Instruments LabVIEW tdx/tdm files and export them as csv files
|
||||||
long_description = file: README.md
|
long_description = file: README.md
|
||||||
# long_description_content_type = text/x-rst
|
# long_description_content_type = text/x-rst
|
||||||
|
@ -11,9 +11,9 @@ cmpArgs = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension = Extension(
|
extension = Extension(
|
||||||
"TDMtermite",
|
"tdmtermite",
|
||||||
language='c++',
|
language='c++',
|
||||||
sources=["TDMtermite.pyx"],
|
sources=["tdmtermite.pyx"],
|
||||||
include_dirs=["lib","3rdparty/pugixml"],
|
include_dirs=["lib","3rdparty/pugixml"],
|
||||||
extra_compile_args=cmpArgs[sys.platform]
|
extra_compile_args=cmpArgs[sys.platform]
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# distutils: language = c++
|
# distutils: language = c++
|
||||||
# cython: language_level = 3
|
# cython: language_level = 3
|
||||||
|
|
||||||
from TDMtermite cimport cpptdmtermite
|
from tdmtermite cimport cpptdmtermite
|
||||||
|
|
||||||
import json as jn
|
import json as jn
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user