Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
cff2e913fc | |||
75d70a9521 | |||
![]() |
36cf0c9c18 | ||
![]() |
2326725756 | ||
![]() |
59de48424e | ||
![]() |
a44461cba6 | ||
cee146593b | |||
223f25b6e0 | |||
8ec02d21c5 | |||
df445bfd7f | |||
af6622492a |
29
.github/workflows/pypi-deploy.yml
vendored
29
.github/workflows/pypi-deploy.yml
vendored
@@ -10,16 +10,18 @@ jobs:
|
||||
|
||||
build_setup:
|
||||
name: Prepare environment for wheel builds
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Prepare wheel build
|
||||
run: make -C python/ setup
|
||||
- name: Store wheel configuration files
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4.6.0
|
||||
with:
|
||||
name: wheel-config
|
||||
path: python/
|
||||
- name: Display files
|
||||
run: ls -lR
|
||||
|
||||
build_wheels:
|
||||
name: Build binary wheels on ${{ matrix.os }}
|
||||
@@ -27,7 +29,7 @@ jobs:
|
||||
needs: [build_setup]
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-20.04, windows-2019]
|
||||
os: [ubuntu-24.04, windows-2022]
|
||||
arch: [auto32, auto64, aarch64]
|
||||
|
||||
steps:
|
||||
@@ -41,19 +43,19 @@ jobs:
|
||||
name: wheel-config
|
||||
path: python/
|
||||
- name: Build wheels
|
||||
run: python -m cibuildwheel --output-dir wheelhouse
|
||||
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@v2
|
||||
uses: actions/upload-artifact@v4.6.0
|
||||
with:
|
||||
name: binary-wheels
|
||||
name: binary-wheels-${{matrix.os}}-${{matrix.arch}}
|
||||
path: python/wheelhouse/*.whl
|
||||
|
||||
build_sdist:
|
||||
name: Build source distribution
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [build_setup]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -68,15 +70,17 @@ jobs:
|
||||
run: python setup.py sdist
|
||||
working-directory: python/
|
||||
- name: Store source wheels
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4.6.0
|
||||
with:
|
||||
name: source-wheels
|
||||
path: python/dist/*.tar.gz
|
||||
- name: Display files
|
||||
run: ls -lR
|
||||
|
||||
|
||||
upload_pypi:
|
||||
name: Upload binary wheels to PyPI
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [build_wheels, build_sdist]
|
||||
|
||||
steps:
|
||||
@@ -88,8 +92,11 @@ jobs:
|
||||
- name: Get binary wheels
|
||||
uses: actions/download-artifact@v4.1.7
|
||||
with:
|
||||
name: binary-wheels
|
||||
path: dist/
|
||||
path: dist/binary-wheels
|
||||
pattern: dist/binary-wheels-*
|
||||
merge-multiple: true
|
||||
- name: Display files
|
||||
run: ls -lR
|
||||
|
||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
|
15
README.md
15
README.md
@@ -222,18 +222,31 @@ can be found in the `python/examples` folder.
|
||||
|
||||
## References
|
||||
|
||||
### IMC
|
||||
|
||||
- https://www.imc-tm.de/produkte/messtechnik-software/imc-famos/funktionen/im-und-export/
|
||||
- https://www.imc-tm.de/produkte/messtechnik-hardware/imc-cronosflex/ueberblick/
|
||||
- https://www.imc-tm.de/download-center/produkt-downloads/imc-famos/handbuecher
|
||||
- https://www.imc-tm.de/fileadmin/Public/Downloads/Manuals/imc_FAMOS/imcGemeinsameKomponenten.pdf
|
||||
- https://cython.readthedocs.io/en/latest/src/userguide/wrapping_CPlusPlus.html
|
||||
- https://github.com/Apollo3zehn/ImcFamosFile
|
||||
- https://apollo3zehn.github.io/ImcFamosFile/api/ImcFamosFile.FamosFileKeyType.html
|
||||
|
||||
### Cython
|
||||
|
||||
- https://cython.readthedocs.io/en/latest/src/userguide/wrapping_CPlusPlus.html
|
||||
|
||||
### PyPI
|
||||
|
||||
- https://pypi.org/help/#apitoken
|
||||
- https://sgoel.dev/posts/uploading-binary-wheels-to-pypi-from-github-actions/
|
||||
- https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
|
||||
- https://cibuildwheel.readthedocs.io/en/stable/deliver-to-pypi/
|
||||
- https://github.com/actions/download-artifact#download-all-artifacts
|
||||
- https://github.com/actions/download-artifact?tab=readme-ov-file#download-multiple-filtered-artifacts-to-the-same-directory
|
||||
|
||||
### iconv
|
||||
|
||||
- https://www.gnu.org/software/libiconv/
|
||||
- https://vcpkg.io/en/packages.html
|
||||
- https://vcpkg.io/en/getting-started
|
||||
|
@@ -393,7 +393,6 @@ namespace imc
|
||||
ybuffer_offset_ = comp_group1.Cb_.offset_buffer_;
|
||||
ybuffer_size_ = comp_group1.Cb_.number_bytes_;
|
||||
xstart_ = comp_group1.Cb_.x0_;
|
||||
addtime_ = static_cast<long int>(comp_group1.Cb_.add_time_);
|
||||
yfactor_ = comp_group1.CR_.factor_;
|
||||
yoffset_ = comp_group1.CR_.offset_;
|
||||
yunit_ = comp_group1.CR_.unit_;
|
||||
@@ -407,6 +406,10 @@ namespace imc
|
||||
std::time_t ts = timegm(&comp_group1.NT_.tms_); // std::mktime(&tms);
|
||||
trigger_time_ = std::chrono::system_clock::from_time_t(ts);
|
||||
trigger_time_frac_secs_ = comp_group1.NT_.trigger_time_frac_secs_;
|
||||
// calculate absolute trigger-time
|
||||
addtime_ = static_cast<long int>(comp_group1.Cb_.add_time_);
|
||||
absolute_trigger_time_ = trigger_time_ + std::chrono::seconds(addtime_);
|
||||
// + std::chrono::nanoseconds((long int)(trigger_time_frac_secs_*1.e9));
|
||||
}
|
||||
else if ( !chnenv_.compenv1_.uuid_.empty() && !chnenv_.compenv2_.uuid_.empty() )
|
||||
{
|
||||
@@ -438,6 +441,7 @@ namespace imc
|
||||
std::time_t ts = timegm(&comp_group2.NT_.tms_); // std::mktime(&tms);
|
||||
trigger_time_ = std::chrono::system_clock::from_time_t(ts);
|
||||
trigger_time_frac_secs_ = comp_group2.NT_.trigger_time_frac_secs_;
|
||||
absolute_trigger_time_ = trigger_time_;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -447,10 +451,6 @@ namespace imc
|
||||
// start converting binary buffer to imc::datatype
|
||||
if ( !chnenv_.CSuuid_.empty() ) convert_buffer();
|
||||
|
||||
// calculate absolute trigger-time
|
||||
absolute_trigger_time_ = trigger_time_ + std::chrono::seconds(addtime_);
|
||||
// + std::chrono::nanoseconds((long int)(trigger_time_frac_secs_*1.e9));
|
||||
|
||||
// convert any non-UTF-8 codepage to UTF-8
|
||||
convert_encoding();
|
||||
}
|
||||
@@ -508,6 +508,8 @@ namespace imc
|
||||
throw std::runtime_error("x and y data have different number of values");
|
||||
}
|
||||
|
||||
xprec_ = 9;
|
||||
|
||||
process_data(xdata_, xnum_values, xdatatp_, xCSbuffer);
|
||||
process_data(ydata_, ynum_values, ydatatp_, yCSbuffer);
|
||||
}
|
||||
@@ -624,7 +626,6 @@ namespace imc
|
||||
<<std::setw(width)<<std::left<<"significant bits:"<<ysignbits_<<"\n"
|
||||
<<std::setw(width)<<std::left<<"buffer-offset:"<<ybuffer_offset_<<"\n"
|
||||
<<std::setw(width)<<std::left<<"buffer-size:"<<ybuffer_size_<<"\n"
|
||||
<<std::setw(width)<<std::left<<"add-time:"<<addtime_<<"\n"
|
||||
<<std::setw(width)<<std::left<<"xname:"<<xname_<<"\n"
|
||||
<<std::setw(width)<<std::left<<"xunit:"<<xunit_<<"\n"
|
||||
<<std::setw(width)<<std::left<<"xstepwidth:"<<xstepwidth_<<"\n"
|
||||
@@ -660,7 +661,6 @@ namespace imc
|
||||
<<"\",\"yname\":\""<<prepjsonstr(yname_)
|
||||
<<"\",\"yunit\":\""<<prepjsonstr(yunit_)
|
||||
<<"\",\"significantbits\":\""<<ysignbits_
|
||||
<<"\",\"addtime\":\""<<addtime_
|
||||
<<"\",\"buffer-size\":\""<<ybuffer_size_
|
||||
<<"\",\"xname\":\""<<prepjsonstr(xname_)
|
||||
<<"\",\"xunit\":\""<<prepjsonstr(xunit_)
|
||||
|
@@ -482,7 +482,7 @@ namespace imc
|
||||
// construct members by parsing particular parameters from buffer
|
||||
void parse(const std::vector<unsigned char>* buffer, const std::vector<parameter>& parameters)
|
||||
{
|
||||
if ( parameters.size() < 7 ) throw std::runtime_error("invalid number of parameters in CD2");
|
||||
if ( parameters.size() < 7 ) throw std::runtime_error("invalid number of parameters in NO");
|
||||
origin_ = ( get_parameter(buffer,¶meters[2]) == std::string("1") );
|
||||
generator_ = get_parameter(buffer,¶meters[4]);
|
||||
comment_ = get_parameter(buffer,¶meters[6]);
|
||||
@@ -508,7 +508,7 @@ namespace imc
|
||||
// construct members by parsing particular parameters from buffer
|
||||
void parse(const std::vector<unsigned char>* buffer, const std::vector<parameter>& parameters)
|
||||
{
|
||||
if ( parameters.size() < 8 ) throw std::runtime_error("invalid number of parameters in CD2");
|
||||
if ( parameters.size() < 8 ) throw std::runtime_error("invalid number of parameters in NT1");
|
||||
tms_ = std::tm();
|
||||
tms_.tm_mday = std::stoi( get_parameter(buffer,¶meters[2]) );
|
||||
tms_.tm_mon = std::stoi( get_parameter(buffer,¶meters[3]) ) - 1;
|
||||
|
@@ -1 +1 @@
|
||||
2.1.0
|
||||
2.1.9
|
||||
|
Reference in New Issue
Block a user