* fix issue of 'inconsistent subsequent blocks' when using set_file() by clearing all buffers

* remove schedule from workflows/wheels.yml
This commit is contained in:
Mario Fink 2021-09-21 13:22:23 +02:00
parent 2d654d2d2a
commit b71d86f735
2 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,6 @@
name: Build Python Wheels name: Build Python Wheels
on: on:
schedule:
push: push:
branches: branches:
- master - master
@ -31,4 +30,3 @@ jobs:
with: with:
user: __token__ user: __token__
password: ${{ secrets.IMCTERMITE_GITHUB_WORKFLOW_PYPI_API_TOKEN }} password: ${{ secrets.IMCTERMITE_GITHUB_WORKFLOW_PYPI_API_TOKEN }}

View File

@ -58,6 +58,8 @@ namespace imc
// open file and stream data into buffer // open file and stream data into buffer
void fill_buffer() void fill_buffer()
{ {
buffer_.clear();
// open file and put data in buffer // open file and put data in buffer
try { try {
std::ifstream fin(raw_file_.c_str(),std::ifstream::binary); std::ifstream fin(raw_file_.c_str(),std::ifstream::binary);
@ -76,6 +78,8 @@ namespace imc
// parse all raw blocks in buffer // parse all raw blocks in buffer
void parse_blocks() void parse_blocks()
{ {
rawblocks_.clear();
// reset counter to identify computational complexity // reset counter to identify computational complexity
cplxcnt_ = 0; cplxcnt_ = 0;
@ -190,6 +194,8 @@ namespace imc
// generate map of blocks using their uuid // generate map of blocks using their uuid
void generate_block_map() void generate_block_map()
{ {
mapblocks_.clear();
for ( imc::block blk: rawblocks_ ) for ( imc::block blk: rawblocks_ )
{ {
mapblocks_.insert( std::pair<std::string,imc::block>(blk.get_uuid(),blk) ); mapblocks_.insert( std::pair<std::string,imc::block>(blk.get_uuid(),blk) );
@ -199,6 +205,8 @@ namespace imc
// generate channel "environments" // generate channel "environments"
void generate_channel_env() void generate_channel_env()
{ {
channels_.clear();
// declare single channel environment // declare single channel environment
imc::channel_env chnenv; imc::channel_env chnenv;
chnenv.reset(); chnenv.reset();
@ -207,7 +215,6 @@ namespace imc
// BLOCK CORRESPONDENCE GOVERNED BY BLOCK ORDER IN BUFFER!! // BLOCK CORRESPONDENCE GOVERNED BY BLOCK ORDER IN BUFFER!!
for ( imc::block blk: rawblocks_ ) for ( imc::block blk: rawblocks_ )
{ {
if ( blk.get_key().name_ == "CN" ) chnenv.CNuuid_ = blk.get_uuid(); 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_ == "CD" ) chnenv.CDuuid_ = blk.get_uuid();
else if ( blk.get_key().name_ == "CT" ) chnenv.CTuuid_ = blk.get_uuid(); else if ( blk.get_key().name_ == "CT" ) chnenv.CTuuid_ = blk.get_uuid();