From 04d523d9beb887b343c09a39bb50356bf5a2194c Mon Sep 17 00:00:00 2001 From: Mario Fink Date: Thu, 13 Feb 2025 19:26:33 +0100 Subject: [PATCH] comply with PEP 625: lower case distribution filenames; bump version 2.1.3 --- README.md | 18 +++++++++--------- python/VERSION | 2 +- python/examples/custom.py | 4 ++-- python/examples/minimal.py | 4 ++-- python/examples/usage.py | 4 ++-- python/makefile | 4 ++-- python/setup.cfg | 2 +- python/setup.py | 4 ++-- python/{TDMtermite.pxd => tdmtermite.pxd} | 0 python/{TDMtermite.pyx => tdmtermite.pyx} | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) rename python/{TDMtermite.pxd => tdmtermite.pxd} (100%) rename python/{TDMtermite.pyx => tdmtermite.pyx} (97%) diff --git a/README.md b/README.md index 9263db2..7c2ead0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![LICENSE](https://img.shields.io/github/license/RecordEvolution/TDMtermite)](https://img.shields.io/github/license/RecordEvolution/TDMtermite) [![STARS](https://img.shields.io/github/stars/RecordEvolution/TDMtermite)](https://img.shields.io/github/stars/RecordEvolution/TDMtermite) ![CI Build Wheel](https://github.com/RecordEvolution/TDMtermite/actions/workflows/pypi-deploy.yml/badge.svg?branch=&event=push) -[![PYPI](https://img.shields.io/pypi/v/TDMtermite.svg)](https://pypi.org/project/TDMtermite/) +[![PYPI](https://img.shields.io/pypi/v/TDMtermite.svg)](https://pypi.org/project/tdmtermite/) # TDMtermite @@ -164,10 +164,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 +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: ```Python -import TDMtermite +import tdmtermite ``` This will import the module. The TDM files are provided by creating an instance of @@ -233,7 +233,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 +254,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 +293,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/") ``` diff --git a/python/VERSION b/python/VERSION index eca07e4..ac2cdeb 100644 --- a/python/VERSION +++ b/python/VERSION @@ -1 +1 @@ -2.1.2 +2.1.3 diff --git a/python/examples/custom.py b/python/examples/custom.py index 6ed02af..bd29329 100644 --- a/python/examples/custom.py +++ b/python/examples/custom.py @@ -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)) diff --git a/python/examples/minimal.py b/python/examples/minimal.py index ecabfd4..172eb3e 100644 --- a/python/examples/minimal.py +++ b/python/examples/minimal.py @@ -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 diff --git a/python/examples/usage.py b/python/examples/usage.py index f809c61..5d79a69 100644 --- a/python/examples/usage.py +++ b/python/examples/usage.py @@ -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)) diff --git a/python/makefile b/python/makefile index da30c9e..4c99f60 100644 --- a/python/makefile +++ b/python/makefile @@ -30,8 +30,8 @@ build-bdist: setup build-clean: python setup.py clean --all - rm -vf TDMtermite*.so TDMtermite*.cpp - rm -rvf dist/ IMCtermite.egg-info/ + rm -vf tdmtermite*.so tdmtermite*.cpp + rm -rvf dist/ tdmtermite.egg-info/ cibuildwheel-build: setup cibuildwheel --platform linux diff --git a/python/setup.cfg b/python/setup.cfg index f0bc5d9..48c8264 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -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 diff --git a/python/setup.py b/python/setup.py index 15bc72a..34641e5 100644 --- a/python/setup.py +++ b/python/setup.py @@ -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] ) diff --git a/python/TDMtermite.pxd b/python/tdmtermite.pxd similarity index 100% rename from python/TDMtermite.pxd rename to python/tdmtermite.pxd diff --git a/python/TDMtermite.pyx b/python/tdmtermite.pyx similarity index 97% rename from python/TDMtermite.pyx rename to python/tdmtermite.pyx index 450d560..76f81c2 100644 --- a/python/TDMtermite.pyx +++ b/python/tdmtermite.pyx @@ -1,7 +1,7 @@ # distutils: language = c++ # cython: language_level = 3 -from TDMtermite cimport cpptdmtermite +from tdmtermite cimport cpptdmtermite import json as jn