sbdl 1.18.19__tar.gz → 1.18.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sbdl
3
- Version: 1.18.19
3
+ Version: 1.18.20
4
4
  Summary: System Behaviour Description Language (Compiler)
5
5
  Home-page: https://sbdl.dev
6
6
  Author: Michael A. Hicks
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sbdl
3
- Version: 1.18.19
3
+ Version: 1.18.20
4
4
  Summary: System Behaviour Description Language (Compiler)
5
5
  Home-page: https://sbdl.dev
6
6
  Author: Michael A. Hicks
@@ -221,8 +221,8 @@ _A=True
221
221
  import argparse,base64,datetime,csv,functools,getpass,hashlib,importlib,io,json,os,pathlib,pickle,platform,re,shlex,string,subprocess,sys,tarfile,tempfile,textwrap,time,traceback,types,unittest,urllib.request,urllib.parse,warnings,zlib,zipfile
222
222
  warnings.filterwarnings(_A1,category=DeprecationWarning)
223
223
  __NAME=_j
224
- __VERSION='1.18.19'
225
- __VERSION_DEV='ab2813a'
224
+ __VERSION='1.18.20'
225
+ __VERSION_DEV='4102984'
226
226
  __VERSION_DSL='25.6'
227
227
  __VERSION_REST_API='1.1.0'
228
228
  __AUTHOR='contact@sbdl.dev'
@@ -585,7 +585,7 @@ class SBDL_Parser:
585
585
  def git_commit_hash(macros,*inp):
586
586
  param_path=''.join(inp);config_path=os.path.join(macros[SBDL_Parser.Macros.path].replace(macros[SBDL_Parser.Macros.file_name],''),param_path)
587
587
  try:repo_root=pathlib.Path(config_path).resolve();hash_value=subprocess.check_output(['git','-C',str(repo_root),'rev-parse','--short','HEAD'],text=_A).strip()
588
- except Exception as e:raise self.MacroReplaceException(f"ERROR retrieving Git commit hash: {e}",first_pass_can_ignore=_C)
588
+ except Exception as e:hash_value='GIT_HASH_UNAVAILABLE';f_print(f"{macros[SBDL_Parser.Macros.file_name]}:{macros[SBDL_Parser.Macros.line]}:: WARNING cannot retrieve Git commit hash: {e}",warning=_A)
589
589
  return hash_value
590
590
  def identifier_from_property(macros,*inp):
591
591
  A='SBDL_PROPERTY_VALUE_CACHE_MEMO'
@@ -2611,6 +2611,11 @@ class OpenFMEA:
2611
2611
  if not raw:content=result[1:-1];result=SBDL_Parser.Tokens.replacement_string_default.join(content.split());result=SBDL_Parser.sanitize_identifier(result)
2612
2612
  return result
2613
2613
  @classmethod
2614
+ def remove_id_from_description(self,description):
2615
+ result=description;id_string=self.get_id_from_string(description,_A)
2616
+ if id_string!=_B:result=result.replace(id_string,'')
2617
+ return result
2618
+ @classmethod
2614
2619
  def add_id_to_string(self,identifier,string_content):return'[{}] {}'.format(identifier,string_content)
2615
2620
  @classmethod
2616
2621
  def sbdl_elements_from_table(self,sbdl_table,_):return self.elements_from_table(sbdl_table,_)
@@ -2626,10 +2631,6 @@ class OpenFMEA:
2626
2631
  if not attr_type in id_lookup:id_lookup[attr_type]={};id_lookup[attr_type][A]=1
2627
2632
  result=id_lookup[attr_type][attr]=replace_str.join((elems_to_consider[attr_type]+replace_str+str(id_lookup[attr_type][A]).zfill(3)).split());id_lookup[attr_type][A]+=1
2628
2633
  return result
2629
- def remove_id_from_description(description):
2630
- result=description;id_string=self.get_id_from_string(description,_A)
2631
- if id_string!=_B:result=result.replace(id_string,'')
2632
- return result
2633
2634
  def split_multi_field(multi_data):return[x.strip()for x in str(multi_data).split(multi_field_separator)]
2634
2635
  def present_on_relevant_rows(source_content,source_column,target_content,target_column):
2635
2636
  result=_A
@@ -2656,7 +2657,7 @@ class OpenFMEA:
2656
2657
  def handle_elem(row_data,attr):
2657
2658
  attr_data_full=split_multi_field(row_data[attr])
2658
2659
  for attr_data in attr_data_full:
2659
- attr_data_no_id=remove_id_from_description(attr_data).strip()
2660
+ attr_data_no_id=self.remove_id_from_description(attr_data).strip()
2660
2661
  if len(attr_data)>0:
2661
2662
  if attr in elems_to_consider:
2662
2663
  id_ref=get_id_from_attr(attr,attr_data);elem=_B
@@ -2685,7 +2686,7 @@ class OpenFMEA:
2685
2686
  if'id'in gen_elem_obj and _P in gen_elem_obj and _K in gen_elem_obj:
2686
2687
  if gen_elem_obj[_K]in supported_general_types:
2687
2688
  if supported_general_types[gen_elem_obj[_K]][B]==0:supported_general_types[gen_elem_obj[_K]][B]+=1;new_customtype_statement=SBDL_Parser.parse_customtype(SBDL_Parser.Parser_Element(supported_general_types[gen_elem_obj[_K]][C],_AC,0));new_customtype_def=SBDL_CustomType(new_customtype_statement);general_elements.append(new_customtype_def)
2688
- new_gen_elem=SBDL_Element_Synthetic(entry_identifier(gen_elem_obj),gen_elem_obj[_P],supported_general_types[gen_elem_obj[_K]][A],_B)
2689
+ new_gen_elem=SBDL_Element_Synthetic(entry_identifier(gen_elem_obj),self.remove_id_from_description(gen_elem_obj[_P]),supported_general_types[gen_elem_obj[_K]][A],_B)
2689
2690
  if D in gen_elem_obj:
2690
2691
  for edge in gen_elem_obj[D]:
2691
2692
  explicit_identifier=self.get_id_from_string(edge);matching_identifier=_B;matching_type=_B
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='sbdl',
5
- version='1.18.19',
5
+ version='1.18.20',
6
6
  description = "System Behaviour Description Language (Compiler)",
7
7
  author = "Michael A. Hicks",
8
8
  author_email = "michael@mahicks.org",
File without changes
File without changes
File without changes
File without changes
File without changes