* 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
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 }}

View File

@ -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<std::string,imc::block>(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();