Compare commits
No commits in common. "master" and "v2.0.1" have entirely different histories.
41
.github/workflows/pypi-deploy.yml
vendored
41
.github/workflows/pypi-deploy.yml
vendored
@ -1,26 +1,25 @@
|
||||
|
||||
name: CI Build Wheel
|
||||
name: Build Python Wheels
|
||||
|
||||
on:
|
||||
push:
|
||||
#branches: [master]
|
||||
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
||||
|
||||
jobs:
|
||||
|
||||
build_setup:
|
||||
name: Prepare environment for wheel builds
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Prepare wheel build
|
||||
run: make -C python/ setup
|
||||
- name: Store wheel configuration files
|
||||
uses: actions/upload-artifact@v4.6.0
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheel-config
|
||||
path: python/
|
||||
- name: Display files
|
||||
run: ls -lR
|
||||
|
||||
build_wheels:
|
||||
name: Build binary wheels on ${{ matrix.os }}
|
||||
@ -28,7 +27,8 @@ jobs:
|
||||
needs: [build_setup]
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
os: [ubuntu-20.04, windows-2019]
|
||||
arch: [auto32, auto64, aarch64]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -36,29 +36,31 @@ jobs:
|
||||
- name: Install cibuildwheel
|
||||
run: python -m pip install cibuildwheel==2.1.2
|
||||
- name: Get wheel configuration files
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: wheel-config
|
||||
path: python/
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
working-directory: python/
|
||||
# env:
|
||||
# CIBW_BUILD: cp36-* cp37-* cp38-* cp39-* cp310-*
|
||||
- name: Store binary wheels
|
||||
uses: actions/upload-artifact@v4.6.0
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: binary-wheels-${{matrix.os}}-${{ strategy.job-index }}
|
||||
name: binary-wheels
|
||||
path: python/wheelhouse/*.whl
|
||||
|
||||
build_sdist:
|
||||
name: Build source distribution
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build_setup]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install cython
|
||||
run: python -m pip install cython==0.29.24
|
||||
- name: Get wheel configuration files
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: wheel-config
|
||||
path: python/
|
||||
@ -66,33 +68,28 @@ jobs:
|
||||
run: python setup.py sdist
|
||||
working-directory: python/
|
||||
- name: Store source wheels
|
||||
uses: actions/upload-artifact@v4.6.0
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: source-wheels
|
||||
path: python/dist/*.tar.gz
|
||||
- name: Display files
|
||||
run: ls -lR
|
||||
|
||||
|
||||
upload_pypi:
|
||||
name: Upload wheels to PyPI
|
||||
runs-on: ubuntu-24.04
|
||||
name: Upload binary wheels to PyPI
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [build_wheels, build_sdist]
|
||||
|
||||
steps:
|
||||
- name: Get source wheels
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: source-wheels
|
||||
path: dist/
|
||||
- name: Get binary wheels
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: binary-wheels
|
||||
path: dist/
|
||||
pattern: binary-wheels-*
|
||||
merge-multiple: true
|
||||
- name: Display files
|
||||
run: ls -lR
|
||||
|
||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -23,10 +23,3 @@ pip/*.cpp
|
||||
pip/*.pyx
|
||||
pip/*.pxd
|
||||
pip/LICENSE
|
||||
|
||||
python/3rdparty/
|
||||
python/LICENSE
|
||||
python/README.md
|
||||
python/TDMtermite.cpp
|
||||
python/lib/
|
||||
|
||||
|
22
README.md
22
README.md
@ -1,8 +1,10 @@
|
||||
|
||||
[](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/stars/RecordEvolution/TDMtermite)
|
||||

|
||||
[](https://pypi.org/project/tdmtermite/)
|
||||

|
||||
|
||||
# TDMtermite
|
||||
|
||||
@ -164,10 +166,10 @@ which makes the module available for import by `import tdm_termite` .
|
||||
#### Installation with pip
|
||||
|
||||
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
|
||||
python3 -m pip install tdmtermite
|
||||
python3 -m pip install TDMtermite
|
||||
```
|
||||
|
||||
##### Unix
|
||||
@ -224,7 +226,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:
|
||||
|
||||
```Python
|
||||
import tdmtermite
|
||||
import TDMtermite
|
||||
```
|
||||
|
||||
This will import the module. The TDM files are provided by creating an instance of
|
||||
@ -233,7 +235,7 @@ the _tdmtermite_ class:
|
||||
```Python
|
||||
# create 'tdmtermite' instance object
|
||||
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:
|
||||
print("failed to load/decode TDM files: " + str(e))
|
||||
```
|
||||
@ -254,12 +256,12 @@ As a use case, we have a look at listing the ids of all channelgroups and printi
|
||||
their data to separate files:
|
||||
|
||||
```Python
|
||||
import tdmtermite
|
||||
import TDMtermite
|
||||
import re
|
||||
|
||||
# create 'tdmtermite' instance object
|
||||
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 :
|
||||
print("failed to load/decode TDM files: " + str(e))
|
||||
|
||||
@ -293,8 +295,8 @@ to simply extract all data of the TDM datatset and dump it to files in a given
|
||||
(existing!) directory, do
|
||||
|
||||
```Python
|
||||
import tdmtermite
|
||||
jack = tdmtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
||||
import TDMtermite
|
||||
jack = TDMtermite.tdmtermite(b'samples/SineData.tdm',b'samples/SineData.tdx')
|
||||
jack.write_all(b"./my_tdm_data_directory/")
|
||||
```
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <sstream>
|
||||
#include <filesystem>
|
||||
#include <regex>
|
||||
#include <bit>
|
||||
|
||||
#include "pugixml.hpp"
|
||||
#include "tdm_datamodel.hpp"
|
||||
|
@ -1,7 +1,7 @@
|
||||
# distutils: language = c++
|
||||
# cython: language_level = 3
|
||||
|
||||
from tdmtermite cimport cpptdmtermite
|
||||
from TDMtermite cimport cpptdmtermite
|
||||
|
||||
import json as jn
|
||||
|
@ -1 +1 @@
|
||||
2.1.3
|
||||
2.0.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
import tdmtermite
|
||||
import TDMtermite
|
||||
import json
|
||||
import re
|
||||
|
||||
# create 'tdm_termite' instance object
|
||||
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 :
|
||||
print("failed to load/decode TDM files: " + str(e))
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
import tdmtermite
|
||||
import TDMtermite
|
||||
|
||||
# create 'tdm_termite' instance object
|
||||
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
|
||||
grpids = jack.get_channelgroup_ids()
|
||||
# iterate through groups
|
||||
|
@ -1,12 +1,12 @@
|
||||
|
||||
import tdmtermite
|
||||
import TDMtermite
|
||||
# import numpy as np
|
||||
import json
|
||||
import re
|
||||
|
||||
# create 'tdm_termite' instance object
|
||||
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 :
|
||||
print("failed to load/decode TDM files: " + str(e))
|
||||
|
||||
|
@ -30,8 +30,8 @@ build-bdist: setup
|
||||
|
||||
build-clean:
|
||||
python setup.py clean --all
|
||||
rm -vf tdmtermite*.so tdmtermite*.cpp
|
||||
rm -rvf dist/ tdmtermite.egg-info/
|
||||
rm -vf TDMtermite*.so TDMtermite*.cpp
|
||||
rm -rvf dist/ IMCtermite.egg-info/
|
||||
|
||||
cibuildwheel-build: setup
|
||||
cibuildwheel --platform linux
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
[metadata]
|
||||
name = tdmtermite
|
||||
name = TDMtermite
|
||||
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_content_type = text/x-rst
|
||||
|
@ -11,9 +11,9 @@ cmpArgs = {
|
||||
}
|
||||
|
||||
extension = Extension(
|
||||
"tdmtermite",
|
||||
"TDMtermite",
|
||||
language='c++',
|
||||
sources=["tdmtermite.pyx"],
|
||||
sources=["TDMtermite.pyx"],
|
||||
include_dirs=["lib","3rdparty/pugixml"],
|
||||
extra_compile_args=cmpArgs[sys.platform]
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user