Compare commits
8 Commits
71cbe31915
...
v2.0.3
Author | SHA1 | Date | |
---|---|---|---|
8f1046632c | |||
37ee82037e | |||
028deaa2ce | |||
ce4a106921 | |||
ef5aaac254 | |||
86eb20a33b | |||
ba275dd62a | |||
c2a28fc333 |
25
.github/workflows/pypi-deploy.yml
vendored
25
.github/workflows/pypi-deploy.yml
vendored
@@ -3,7 +3,8 @@ name: Build Python Wheels
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
#branches: [master]
|
||||||
|
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
@@ -44,6 +45,11 @@ jobs:
|
|||||||
working-directory: python/
|
working-directory: python/
|
||||||
# env:
|
# env:
|
||||||
# CIBW_BUILD: cp36-* cp37-* cp38-* cp39-* cp310-*
|
# CIBW_BUILD: cp36-* cp37-* cp38-* cp39-* cp310-*
|
||||||
|
- name: Store binary wheels
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: binary-wheels
|
||||||
|
path: python/wheelhouse/*.whl
|
||||||
|
|
||||||
build_sdist:
|
build_sdist:
|
||||||
name: Build source distribution
|
name: Build source distribution
|
||||||
@@ -61,6 +67,12 @@ jobs:
|
|||||||
- name: Build sdist
|
- name: Build sdist
|
||||||
run: python setup.py sdist
|
run: python setup.py sdist
|
||||||
working-directory: python/
|
working-directory: python/
|
||||||
|
- name: Store source wheels
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: source-wheels
|
||||||
|
path: python/dist/*.tar.gz
|
||||||
|
|
||||||
|
|
||||||
upload_pypi:
|
upload_pypi:
|
||||||
name: Upload binary wheels to PyPI
|
name: Upload binary wheels to PyPI
|
||||||
@@ -68,6 +80,17 @@ jobs:
|
|||||||
needs: [build_wheels, build_sdist]
|
needs: [build_wheels, build_sdist]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get source wheels
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: source-wheels
|
||||||
|
path: dist/
|
||||||
|
- name: Get binary wheels
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: binary-wheels
|
||||||
|
path: dist/
|
||||||
|
|
||||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
user: __token__
|
user: __token__
|
||||||
|
@@ -150,8 +150,10 @@ To install the latest version simply do
|
|||||||
python3 -m pip install IMCtermite
|
python3 -m pip install IMCtermite
|
||||||
```
|
```
|
||||||
|
|
||||||
Note, that _python3_setuptools_ and _gcc version >= 10.2.0_ are required to
|
which provides binary wheels for multiple architectures on _Windows_ and _Linux_
|
||||||
successfully install and use it.
|
and most _Python 3.x_ distributions. However, if your platform/architecture is
|
||||||
|
not supported you can still compile the source distribution yourself, which
|
||||||
|
requires _python3_setuptools_ and _gcc version >= 10.2.0_.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@@ -455,12 +455,12 @@ namespace imc
|
|||||||
<<"\",\"trigger-time\":\""<<std::put_time(std::localtime(&att),"%FT%T")
|
<<"\",\"trigger-time\":\""<<std::put_time(std::localtime(&att),"%FT%T")
|
||||||
<<"\",\"language-code\":\""<<language_code_
|
<<"\",\"language-code\":\""<<language_code_
|
||||||
<<"\",\"codepage\":\""<<codepage_
|
<<"\",\"codepage\":\""<<codepage_
|
||||||
<<"\",\"yname\":\""<<yname_
|
<<"\",\"yname\":\""<<prepjsonstr(yname_)
|
||||||
<<"\",\"yunit\":\""<<yunit_
|
<<"\",\"yunit\":\""<<prepjsonstr(yunit_)
|
||||||
<<"\",\"significantbits\":\""<<signbits_
|
<<"\",\"significantbits\":\""<<signbits_
|
||||||
<<"\",\"addtime\":\""<<addtime_
|
<<"\",\"addtime\":\""<<addtime_
|
||||||
<<"\",\"xname\":\""<<xname_
|
<<"\",\"xname\":\""<<prepjsonstr(xname_)
|
||||||
<<"\",\"xunit\":\""<<xunit_
|
<<"\",\"xunit\":\""<<prepjsonstr(xunit_)
|
||||||
<<"\",\"xstepwidth\":\""<<xstepwidth_
|
<<"\",\"xstepwidth\":\""<<xstepwidth_
|
||||||
<<"\",\"xoffset\":\""<<xoffset_
|
<<"\",\"xoffset\":\""<<xoffset_
|
||||||
<<"\",\"group\":{"<<"\"index\":\""<<group_index_
|
<<"\",\"group\":{"<<"\"index\":\""<<group_index_
|
||||||
@@ -477,6 +477,25 @@ namespace imc
|
|||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prepare string value for usage in JSON dump
|
||||||
|
std::string prepjsonstr(std::string value)
|
||||||
|
{
|
||||||
|
std::stringstream ss;
|
||||||
|
ss<<quoted(value);
|
||||||
|
return strip_quotes(ss.str());
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove any leading or trailing double quotes
|
||||||
|
std::string strip_quotes(std::string astring)
|
||||||
|
{
|
||||||
|
// head
|
||||||
|
if ( astring.front() == '"' ) astring.erase(astring.begin()+0);
|
||||||
|
// tail
|
||||||
|
if ( astring.back() == '"' ) astring.erase(astring.end()-1);
|
||||||
|
|
||||||
|
return astring;
|
||||||
|
}
|
||||||
|
|
||||||
// print channel
|
// print channel
|
||||||
void print(std::string filename, const char sep = ',', int width = 25, int yprec = 9)
|
void print(std::string filename, const char sep = ',', int width = 25, int yprec = 9)
|
||||||
{
|
{
|
||||||
|
2
makefile
2
makefile
@@ -3,7 +3,7 @@
|
|||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
|
||||||
# name of executable and CLI tool
|
# name of executable and CLI tool
|
||||||
EXE = IMCtermite
|
EXE = imctermite
|
||||||
|
|
||||||
# directory names
|
# directory names
|
||||||
SRC = src/
|
SRC = src/
|
||||||
|
@@ -20,8 +20,8 @@ cdef class imctermite:
|
|||||||
self.cppimc.set_file(rawfile)
|
self.cppimc.set_file(rawfile)
|
||||||
|
|
||||||
# get JSON list of channels
|
# get JSON list of channels
|
||||||
def get_channels(self, bool data):
|
def get_channels(self, bool include_data):
|
||||||
chnlst = self.cppimc.get_channels(True,data)
|
chnlst = self.cppimc.get_channels(True,include_data)
|
||||||
chnlstjn = [jn.loads(chn.decode(errors="ignore")) for chn in chnlst]
|
chnlstjn = [jn.loads(chn.decode(errors="ignore")) for chn in chnlst]
|
||||||
return chnlstjn
|
return chnlstjn
|
||||||
|
|
||||||
|
@@ -1 +1 @@
|
|||||||
2.0.0
|
2.0.3
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user