sbdl 1.18.4__tar.gz → 1.18.5__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.
sbdl-1.18.5/PKG-INFO ADDED
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.1
2
+ Name: sbdl
3
+ Version: 1.18.5
4
+ Summary: System Behaviour Description Language (Compiler)
5
+ Home-page: https://sbdl.dev
6
+ Author: Michael A. Hicks
7
+ Author-email: michael@mahicks.org
8
+ License: Proprietary
9
+ Requires-Python: >=3.6
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.1
2
+ Name: sbdl
3
+ Version: 1.18.5
4
+ Summary: System Behaviour Description Language (Compiler)
5
+ Home-page: https://sbdl.dev
6
+ Author: Michael A. Hicks
7
+ Author-email: michael@mahicks.org
8
+ License: Proprietary
9
+ Requires-Python: >=3.6
@@ -215,8 +215,8 @@ _B=None
215
215
  _A=True
216
216
  import argparse,base64,datetime,csv,functools,getpass,hashlib,importlib,io,json,os,pathlib,platform,re,shlex,string,subprocess,sys,tarfile,tempfile,textwrap,time,traceback,types,unittest,urllib.request,urllib.parse,warnings,zlib,zipfile
217
217
  __NAME=_j
218
- __VERSION='1.18.4'
219
- __VERSION_DEV='3a43cfd'
218
+ __VERSION='1.18.5'
219
+ __VERSION_DEV='f930310'
220
220
  __VERSION_DSL='25.6'
221
221
  __VERSION_REST_API='1.1.0'
222
222
  __AUTHOR='contact@sbdl.dev'
@@ -2889,8 +2889,8 @@ def main(arguments):
2889
2889
  aggregate_methods={_An:OpenFMEA.aggregate_all_parser_elements_from_files,A:OpenFMEA.aggregate_all_parser_elements_from_quickshare,C:OpenFMEA.aggregate_all_parser_elements_from_files,B:OpenFMEA.aggregate_all_parser_elements_from_quickshare,_AG:aggregate_all_parser_elements_from_json,_Aw:aggregate_all_parser_elements_from_yaml,_AH:aggregate_all_parser_elements_from_csv};aggregation_method=aggregate_all_parser_elements_from_files if not arguments.mode in aggregate_methods else aggregate_methods[arguments.mode];parser_elements,read_errors=aggregation_method([fix_wsl_path(x)for x in arguments.source_files],arguments.recurse,arguments.hidden,print_l);check_step('File reading',read_errors);sbdl_ast=SBDL_AST(parser_elements);check_step('Parsing',sbdl_ast.check_parsing(print_l))
2890
2890
  for pre_hook in get_config_value(_BE):check_step('Pre Hook: {}'.format(pre_hook.__name__),pre_hook(sbdl_ast,print_l))
2891
2891
  sbdl_elements,statement_errors=sbdl_ast.elements(print_l);check_step('Element instantiation',statement_errors)
2892
- if arguments.filter_connected!=_B:sbdl_ast.add_filter_element_set_connected(arguments.filter_connected,arguments.filter_depth)
2893
- if arguments.filter_linked!=_B:sbdl_ast.add_filter_element_set_linked(arguments.filter_linked,arguments.filter_depth)
2892
+ if arguments.filter_related!=_B:sbdl_ast.add_filter_element_set_connected(arguments.filter_related,arguments.filter_depth)
2893
+ if arguments.filter_related_x!=_B:sbdl_ast.add_filter_element_set_linked(arguments.filter_related_x,arguments.filter_depth)
2894
2894
  if arguments.filter_parents!=_B:sbdl_ast.add_filter_element_set_parents(arguments.filter_parents,arguments.filter_depth)
2895
2895
  if arguments.filter_children!=_B:sbdl_ast.add_filter_element_set_children(arguments.filter_children,arguments.filter_depth)
2896
2896
  if arguments.filter_group!=_B:sbdl_ast.add_filter_element_set_children(arguments.filter_group,arguments.filter_depth);sbdl_ast.add_filter_element_set_id('(?!{})'.format(arguments.filter_group))
@@ -2902,7 +2902,7 @@ def main(arguments):
2902
2902
  if arguments.trace:trace_elements,trace_errors=aggregate_all_parser_elements_from_files(arguments.trace,arguments.recurse,arguments.hidden,print_l);_,trace_process_errors=sbdl_ast.process_trace_elements(trace_elements,print_l);trace_errors+=trace_process_errors;check_step('Tracing',trace_errors)
2903
2903
  for post_hook in get_config_value(_k):check_step('Post Hook: {}'.format(post_hook.__name__),post_hook(sbdl_ast,print_l))
2904
2904
  print_l('Mode: {}'.format(arguments.mode));print_l('Writing: {}'.format(arguments.output));check_step('Output writing',operations[arguments.mode](sbdl_ast,arguments.output,open_output_file,arguments,print_l));print_l('C_DEF GLOBALS: {}'.format(get_config_value(_T)),debug=_A);print_l(f"All operations complete [{time.time()-start_time_point:.3f}s]");return total_errors if not arguments.skip_errors else 0
2905
- def handle_arguments(args_l):F='append';E='config_file';D='normal';C='output_file';B='element_identifier';A='store_true';operating_modes={_Ak:'Parse all specified input files, gather SBDL elements, validate model, apply filters, write SBDL-formatted output','query':'Compile inputs, then pretty print the results (after filtering)',_AE:'Compile inputs, then write a CSV-formatted representation of the SBDL elements to the output',_AF:'Compile inputs, then write a JSON-formatted representation of the SBDL elements to the output',_Al:'Compile inputs, then write a YAML-formatted representation of the SBDL elements to the output',_AH:'Read SBDL-schema CSV-matrix inputs and write SBDL-formatted output',_AG:'Read SBDL-schema JSON-tree inputs and write SBDL-formatted output',_Aw:'Read SBDL-schema YAML-tree inputs and write SBDL-formatted output',_AD:'Compile inputs, then write the FMEA-related content to an OpenFMEA-formatted ouput',_Am:'Compile inputs, then write the FMEA-related content to an OpenFMEA Portfolio-formatted ouput, organised by aspect hierarchy',_An:'Read OpenFMEA-formatted input and write SBDL-formatted output',_CN:'Compile inputs, then write the FMEA-related content to a CSV-formatted ouput',_Ar:'Compile inputs, then write a PNG-formatted output, visually representing the network of SBDL elements',_Aq:'Compile inputs, then write a SysML-style requirements diagram to rendering-backend-formatted output',_Ao:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (simplified, aspects only)',_Ap:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (detailed, with properties and relations)',_As:'Compile inputs, then write a SysML-style sequence diagram to rendering-backend-formatted output',_At:'Compile inputs, then write a SysML-style activity diagram to rendering-backend-formatted output',_Au:'Compile inputs, then write a SysML-style state diagram to rendering-backend-formatted output',_Av:'Compile inputs, then write a SysML-style use-case diagram to rendering-backend-formatted output',_CO:"Compile inputs, then provide an object, 'sbdl', in a Jinja parsing environment and apply it to the specified template file",'rpc':'Compile inputs, then transmit to the RPC server for processing by the specified RPC (see --rpc)'};parser=argparse.ArgumentParser(description='{}\n\n{} Version {} (DSL Version {}). System Behaviour Description Language (SBDL) compiler.\nWWW: {}. Author: {}.'.format(logo(),name().upper(),version(),version_dsl(),url(),author()),epilog='e.g. "'+os.path.basename(sys.argv[0])+' <file 1> <file 2> <file n>"\n\n---------------\nOperating Modes\n---------------\n{}'.format(_D.join(['{}: {}'.format(x.rjust(25),operating_modes[x])for x in operating_modes])),formatter_class=argparse.RawDescriptionHelpFormatter);parser._positionals.title='Base Arguments';parser._optionals.title='Optional Arguments';parser.add_argument('source_files',help='List of files to compile ["-" implies stdin]',nargs=_O);parser.add_argument(_F,'--mode',metavar='operating_mode',help='Specify the mode of operation',default=_Ak);parser.add_argument(_E,'--output',metavar=C,help='Specify the name of the output file',default=_V);parser.add_argument('--version',help='Print the current version',action=A,default=_C);parser.add_argument('--debug',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('-W','-w','--warning',help='Set warning level',choices=[D,'all'],default=D);parser.add_argument('--hidden',help='Include hidden files when recursing',action=A,default=_C);parser.add_argument('-i','--identifier',help='Include element identifiers in applicable output formats',action=A,default=_C);parser.add_argument('-s','--source',help='Include source reference in applicable output formats',action=A,default=_C);parser.add_argument('-r','--recurse',help='Recurse on directories specified in the input list',action=A,default=_C);parser.add_argument('--skip-errors',help='Do not stop for errors (emit warning instead)',action=A,default=_C);parser.add_argument('--skip-validation',help='Do not validate model elements and relations',action=A,default=_C);parser.add_argument('--already-processed',help='Disables certain processing actions (implies --skip-validation). Useful when input has already been processed',action=A,default=_C);parser.add_argument('--title',help='Provide a default title for certain output formats',default='');parser.add_argument('-v','--verbose',help='Enable verbose output during execution',action=A,default=_C);parser.add_argument('--dumpaffinitygraph',metavar=C,help=argparse.SUPPRESS,action=_B);parser.add_argument('--dumplanginfo',metavar=C,help=argparse.SUPPRESS,action=_B);parser.add_argument('--run_tests','--run-tests',action=A,help=argparse.SUPPRESS);parser.add_argument('--rest-api-ping',action=A,help=argparse.SUPPRESS);parser.add_argument('--manual',help='Show extensive {} manual page'.format(name().upper()),action=A);parser.add_argument('--dump-config','--dumpconfig',metavar=E,help='Dump the internal configuration to a named JSON file',action=_B);parser.add_argument('--load-config','--loadconfig',metavar=E,help='Load the internal configuration from a named JSON file',default=_B);parser.add_argument('--list-config','--listconfig',help='List internal configuration options',action=A,default=_C);parser.add_argument('--set-config','--setconfig',metavar=('config_option','config_value'),help='Set a named configuration option',action=F,nargs=2);parser.add_argument('-D','--define',metavar=('name','value'),help='Specify a named global definition',action=F,nargs=2);parser.add_argument('--trace',metavar='trace_files',help='Provide a trace file to be processed',default=_B,nargs=_O);parser.add_argument('--template',metavar='template_file',help="Specify a template file for the 'template-fill' mode",default=_B);parser.add_argument('-fc','--filter-connected',metavar=B,help='Filter everything but those elements with a direct or indirect connection to the specified element identifier (regex) [INCLUDES: parents/children]',default=_B);parser.add_argument('-fl','--filter-linked',metavar=B,help='Filter everything but those elements with a direct or indirect connection to the specified element identifier (regex) [EXCLUDES: parents/children]',default=_B);parser.add_argument('-fch','--filter-children',metavar=B,help='Filter everything but those elements which are children of the specified element identifier (regex)',default=_B);parser.add_argument('-fpa','--filter-parents',metavar=B,help='Filter everything but those elements which are parental ancestors of the specified element identifier (regex)',default=_B);parser.add_argument('-fd','--filter-depth',metavar='filter_depth',help='Maximum depth for filters which pursue links (natural number)',type=int,default=_B);parser.add_argument('-ft','--filter-type',metavar='element_type',help='Filter everything but those elements which are of the specified element type (regex)',default=_B);parser.add_argument('-fi','--filter-identifier',metavar=B,help='Filter everything but those elements whose identifiers match the specified string (regex)',default=_B);parser.add_argument('-fpr','--filter-property',metavar=('property_name','property_value'),help='Filter everything but those elements possessing a named property matching the specified string (regex)',default=_B,nargs=2);parser.add_argument('-fg','--filter-group',metavar='group_identifier',help='Shortcut filter for everything but those elements which are children of the specified group identifier (regex) -- excludes the group element itself',default=_B);parser.add_argument(_CP,metavar='compiler_definitions',help='Specify a file path defining custom compiler directives',default=[],nargs=_O);parser.add_argument(_CQ,'--custom_mode',metavar='mode_definitions',help='Specify a file path containing custom compiler modes',default=[],nargs=_O);parser.add_argument('--rpc',help='Remote Procedure Call to be used by RPC-based modes',default=_B);parser.add_argument('--update',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('--update-force',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('--install-deps',help=argparse.SUPPRESS,action=A,default=_C);help_tmp=io.StringIO();parser.print_help(file=help_tmp);help_tmp.seek(0);global __HELP_TEXT;__HELP_TEXT=help_tmp.read();return parser.parse_args(args_l)
2905
+ def handle_arguments(args_l):F='append';E='config_file';D='normal';C='output_file';B='element_identifier';A='store_true';operating_modes={_Ak:'Parse all specified input files, gather SBDL elements, validate model, apply filters, write SBDL-formatted output','query':'Compile inputs, then pretty print the results (after filtering)',_AE:'Compile inputs, then write a CSV-formatted representation of the SBDL elements to the output',_AF:'Compile inputs, then write a JSON-formatted representation of the SBDL elements to the output',_Al:'Compile inputs, then write a YAML-formatted representation of the SBDL elements to the output',_AH:'Read SBDL-schema CSV-matrix inputs and write SBDL-formatted output',_AG:'Read SBDL-schema JSON-tree inputs and write SBDL-formatted output',_Aw:'Read SBDL-schema YAML-tree inputs and write SBDL-formatted output',_AD:'Compile inputs, then write the FMEA-related content to an OpenFMEA-formatted ouput',_Am:'Compile inputs, then write the FMEA-related content to an OpenFMEA Portfolio-formatted ouput, organised by aspect hierarchy',_An:'Read OpenFMEA-formatted input and write SBDL-formatted output',_CN:'Compile inputs, then write the FMEA-related content to a CSV-formatted ouput',_Ar:'Compile inputs, then write a PNG-formatted output, visually representing the network of SBDL elements',_Aq:'Compile inputs, then write a SysML-style requirements diagram to rendering-backend-formatted output',_Ao:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (simplified, aspects only)',_Ap:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (detailed, with properties and relations)',_As:'Compile inputs, then write a SysML-style sequence diagram to rendering-backend-formatted output',_At:'Compile inputs, then write a SysML-style activity diagram to rendering-backend-formatted output',_Au:'Compile inputs, then write a SysML-style state diagram to rendering-backend-formatted output',_Av:'Compile inputs, then write a SysML-style use-case diagram to rendering-backend-formatted output',_CO:"Compile inputs, then provide an object, 'sbdl', in a Jinja parsing environment and apply it to the specified template file",'rpc':'Compile inputs, then transmit to the RPC server for processing by the specified RPC (see --rpc)'};parser=argparse.ArgumentParser(description='{}\n\n{} Version {} (DSL Version {}). System Behaviour Description Language (SBDL) compiler.\nWWW: {}. Author: {}.'.format(logo(),name().upper(),version(),version_dsl(),url(),author()),epilog='e.g. "'+os.path.basename(sys.argv[0])+' <file 1> <file 2> <file n>"\n\n---------------\nOperating Modes\n---------------\n{}'.format(_D.join(['{}: {}'.format(x.rjust(25),operating_modes[x])for x in operating_modes])),formatter_class=argparse.RawDescriptionHelpFormatter);parser._positionals.title='Base Arguments';parser._optionals.title='Optional Arguments';parser.add_argument('source_files',help='List of files to compile ["-" implies stdin]',nargs=_O);parser.add_argument(_F,'--mode',metavar='operating_mode',help='Specify the mode of operation',default=_Ak);parser.add_argument(_E,'--output',metavar=C,help='Specify the name of the output file',default=_V);parser.add_argument('--version',help='Print the current version',action=A,default=_C);parser.add_argument('--debug',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('-W','-w','--warning',help='Set warning level',choices=[D,'all'],default=D);parser.add_argument('--hidden',help='Include hidden files when recursing',action=A,default=_C);parser.add_argument('-i','--identifier',help='Include element identifiers in applicable output formats',action=A,default=_C);parser.add_argument('-s','--source',help='Include source reference in applicable output formats',action=A,default=_C);parser.add_argument('-r','--recurse',help='Recurse on directories specified in the input list',action=A,default=_C);parser.add_argument('--skip-errors',help='Do not stop for errors (emit warning instead)',action=A,default=_C);parser.add_argument('--skip-validation',help='Do not validate model elements and relations',action=A,default=_C);parser.add_argument('--already-processed',help='Disables certain processing actions (implies --skip-validation). Useful when input has already been processed',action=A,default=_C);parser.add_argument('--title',help='Provide a default title for certain output formats',default='');parser.add_argument('-v','--verbose',help='Enable verbose output during execution',action=A,default=_C);parser.add_argument('--dumpaffinitygraph',metavar=C,help=argparse.SUPPRESS,action=_B);parser.add_argument('--dumplanginfo',metavar=C,help=argparse.SUPPRESS,action=_B);parser.add_argument('--run_tests','--run-tests',action=A,help=argparse.SUPPRESS);parser.add_argument('--rest-api-ping',action=A,help=argparse.SUPPRESS);parser.add_argument('--manual',help='Show extensive {} manual page'.format(name().upper()),action=A);parser.add_argument('--dump-config','--dumpconfig',metavar=E,help='Dump the internal configuration to a named JSON file',action=_B);parser.add_argument('--load-config','--loadconfig',metavar=E,help='Load the internal configuration from a named JSON file',default=_B);parser.add_argument('--list-config','--listconfig',help='List internal configuration options',action=A,default=_C);parser.add_argument('--set-config','--setconfig',metavar=('config_option','config_value'),help='Set a named configuration option',action=F,nargs=2);parser.add_argument('-D','--define',metavar=('name','value'),help='Specify a named global definition',action=F,nargs=2);parser.add_argument('--trace',metavar='trace_files',help='Provide a trace file to be processed',default=_B,nargs=_O);parser.add_argument('--template',metavar='template_file',help="Specify a template file for the 'template-fill' mode",default=_B);parser.add_argument('-fr','--filter-related',metavar=B,help='Filter everything but those elements with a direct or indirect relation to the specified element identifier (regex) [INCLUDES: parents/children]',default=_B);parser.add_argument('-frx','--filter-related-x',metavar=B,help='Filter everything but those elements with a direct or indirect connection to the specified element identifier (regex) [EXCLUDES: parents/children]',default=_B);parser.add_argument('-fch','--filter-children',metavar=B,help='Filter everything but those elements which are children of the specified element identifier (regex)',default=_B);parser.add_argument('-fpa','--filter-parents',metavar=B,help='Filter everything but those elements which are parental ancestors of the specified element identifier (regex)',default=_B);parser.add_argument('-fd','--filter-depth',metavar='filter_depth',help='Maximum depth for filters which pursue links (natural number)',type=int,default=_B);parser.add_argument('-ft','--filter-type',metavar='element_type',help='Filter everything but those elements which are of the specified element type (regex)',default=_B);parser.add_argument('-fi','--filter-identifier',metavar=B,help='Filter everything but those elements whose identifiers match the specified string (regex)',default=_B);parser.add_argument('-fpr','--filter-property',metavar=('property_name','property_value'),help='Filter everything but those elements possessing a named property matching the specified string (regex)',default=_B,nargs=2);parser.add_argument('-fg','--filter-group',metavar='group_identifier',help='Shortcut filter for everything but those elements which are children of the specified group identifier (regex) -- excludes the group element itself',default=_B);parser.add_argument(_CP,metavar='compiler_definitions',help='Specify a file path defining custom compiler directives',default=[],nargs=_O);parser.add_argument(_CQ,'--custom_mode',metavar='mode_definitions',help='Specify a file path containing custom compiler modes',default=[],nargs=_O);parser.add_argument('--rpc',help='Remote Procedure Call to be used by RPC-based modes',default=_B);parser.add_argument('--update',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('--update-force',help=argparse.SUPPRESS,action=A,default=_C);parser.add_argument('--install-deps',help=argparse.SUPPRESS,action=A,default=_C);help_tmp=io.StringIO();parser.print_help(file=help_tmp);help_tmp.seek(0);global __HELP_TEXT;__HELP_TEXT=help_tmp.read();return parser.parse_args(args_l)
2906
2906
  def show_manual(_):
2907
2907
  B='----------------------\n';A='===========================================================\n';manual_text=A;manual_text+=' {} Manual\n'.format(name().upper());manual_text+=A;manual_text+=help_text()+_D;manual_text+=B;manual_text+='Model Type Information\n';manual_text+=B
2908
2908
  def add_manual(strcon=''):nonlocal manual_text;manual_text+=strcon+_D
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='sbdl',
5
- version='1.18.4',
5
+ version='1.18.5',
6
6
  description = "System Behaviour Description Language (Compiler)",
7
7
  author = "Michael A. Hicks",
8
8
  author_email = "michael@mahicks.org",
sbdl-1.18.4/PKG-INFO DELETED
@@ -1,23 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: sbdl
3
- Version: 1.18.4
4
- Summary: System Behaviour Description Language (Compiler)
5
- Home-page: https://sbdl.dev
6
- Author: Michael A. Hicks
7
- Author-email: michael@mahicks.org
8
- License: Proprietary
9
- Requires-Python: >=3.6
10
- Requires-Dist: networkx
11
- Requires-Dist: matplotlib
12
- Requires-Dist: docx2txt
13
- Requires-Dist: pandas
14
- Requires-Dist: openpyxl
15
- Requires-Dist: docxtpl
16
- Requires-Dist: jinja2
17
- Dynamic: author
18
- Dynamic: author-email
19
- Dynamic: home-page
20
- Dynamic: license
21
- Dynamic: requires-dist
22
- Dynamic: requires-python
23
- Dynamic: summary
@@ -1,23 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: sbdl
3
- Version: 1.18.4
4
- Summary: System Behaviour Description Language (Compiler)
5
- Home-page: https://sbdl.dev
6
- Author: Michael A. Hicks
7
- Author-email: michael@mahicks.org
8
- License: Proprietary
9
- Requires-Python: >=3.6
10
- Requires-Dist: networkx
11
- Requires-Dist: matplotlib
12
- Requires-Dist: docx2txt
13
- Requires-Dist: pandas
14
- Requires-Dist: openpyxl
15
- Requires-Dist: docxtpl
16
- Requires-Dist: jinja2
17
- Dynamic: author
18
- Dynamic: author-email
19
- Dynamic: home-page
20
- Dynamic: license
21
- Dynamic: requires-dist
22
- Dynamic: requires-python
23
- Dynamic: summary
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes