From b71d86f7354bbabe5614ad09cb18e2311b250443 Mon Sep 17 00:00:00 2001 From: Mario Fink Date: Tue, 21 Sep 2021 13:22:23 +0200 Subject: [PATCH] * fix issue of 'inconsistent subsequent blocks' when using set_file() by clearing all buffers * remove schedule from workflows/wheels.yml --- .github/workflows/wheels.yml | 4 +--- lib/imc_raw.hpp | 9 ++++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2bee389..061dd1e 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -1,7 +1,6 @@ name: Build Python Wheels on: - schedule: push: branches: - master @@ -25,10 +24,9 @@ jobs: upload_wheels: name: Upload binary wheels to PyPI needs: [build_wheels] - + steps: uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.IMCTERMITE_GITHUB_WORKFLOW_PYPI_API_TOKEN }} - diff --git a/lib/imc_raw.hpp b/lib/imc_raw.hpp index 6632fe0..83f524c 100644 --- a/lib/imc_raw.hpp +++ b/lib/imc_raw.hpp @@ -58,6 +58,8 @@ namespace imc // open file and stream data into buffer void fill_buffer() { + buffer_.clear(); + // open file and put data in buffer try { std::ifstream fin(raw_file_.c_str(),std::ifstream::binary); @@ -76,6 +78,8 @@ namespace imc // parse all raw blocks in buffer void parse_blocks() { + rawblocks_.clear(); + // reset counter to identify computational complexity cplxcnt_ = 0; @@ -190,6 +194,8 @@ namespace imc // generate map of blocks using their uuid void generate_block_map() { + mapblocks_.clear(); + for ( imc::block blk: rawblocks_ ) { mapblocks_.insert( std::pair(blk.get_uuid(),blk) ); @@ -199,6 +205,8 @@ namespace imc // generate channel "environments" void generate_channel_env() { + channels_.clear(); + // declare single channel environment imc::channel_env chnenv; chnenv.reset(); @@ -207,7 +215,6 @@ namespace imc // BLOCK CORRESPONDENCE GOVERNED BY BLOCK ORDER IN BUFFER!! for ( imc::block blk: rawblocks_ ) { - if ( blk.get_key().name_ == "CN" ) chnenv.CNuuid_ = blk.get_uuid(); else if ( blk.get_key().name_ == "CD" ) chnenv.CDuuid_ = blk.get_uuid(); else if ( blk.get_key().name_ == "CT" ) chnenv.CTuuid_ = blk.get_uuid();