sbdl 1.18.10__tar.gz → 1.18.12__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.10
3
+ Version: 1.18.12
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.10
3
+ Version: 1.18.12
4
4
  Summary: System Behaviour Description Language (Compiler)
5
5
  Home-page: https://sbdl.dev
6
6
  Author: Michael A. Hicks
@@ -217,8 +217,8 @@ _B=None
217
217
  _A=True
218
218
  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
219
219
  __NAME=_i
220
- __VERSION='1.18.10'
221
- __VERSION_DEV='95432d1'
220
+ __VERSION='1.18.12'
221
+ __VERSION_DEV='e1dbb6a'
222
222
  __VERSION_DSL='25.6'
223
223
  __VERSION_REST_API='1.1.0'
224
224
  __AUTHOR='contact@sbdl.dev'
@@ -2959,9 +2959,8 @@ def main(arguments):
2959
2959
  else:check_step('Validation (skipped)',0)
2960
2960
  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)
2961
2961
  for post_hook in get_config_value(_j):check_step('Post Hook: {}'.format(post_hook.__name__),post_hook(sbdl_ast,print_l))
2962
- 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)
2963
- if get_config_value(_AK,number=_A)and operations[arguments.mode]is write_aggregated_output:store_ast_cache(sbdl_ast.ast(),get_cache_file_path(arguments.output),print_l)
2964
- print_l(f"All operations complete [{time.time()-start_time_point:.3f}s]");return total_errors if not arguments.skip_errors else 0
2962
+ if total_errors==0 and get_config_value(_AK,number=_A)and operations[arguments.mode]is write_aggregated_output:store_ast_cache(sbdl_ast.ast(),get_cache_file_path(arguments.output),print_l)
2963
+ 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
2965
2964
  def handle_arguments(args_l):F='append';E='config_file';D='normal';C='output_file';B='element_identifier';A='store_true';operating_modes={_Al:'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)',_AD:'Compile inputs, then write a CSV-formatted representation of the SBDL elements to the output',_AE:'Compile inputs, then write a JSON-formatted representation of the SBDL elements to the output',_Am:'Compile inputs, then write a YAML-formatted representation of the SBDL elements to the output',_AG:'Read SBDL-schema CSV-matrix inputs and write SBDL-formatted output',_AF:'Read SBDL-schema JSON-tree inputs and write SBDL-formatted output',_Ax:'Read SBDL-schema YAML-tree inputs and write SBDL-formatted output',_AC:'Compile inputs, then write the FMEA-related content to an OpenFMEA-formatted ouput',_An:'Compile inputs, then write the FMEA-related content to an OpenFMEA Portfolio-formatted ouput, organised by aspect hierarchy',_Ao:'Read OpenFMEA-formatted input and write SBDL-formatted output',_CP:'Compile inputs, then write the FMEA-related content to a CSV-formatted ouput',_As:'Compile inputs, then write a PNG-formatted output, visually representing the network of SBDL elements',_Ar:'Compile inputs, then write a SysML-style requirements diagram to rendering-backend-formatted output',_Ap:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (simplified, aspects only)',_Aq:'Compile inputs, then write a SysML-style block diagram to rendering-backend-formatted output (detailed, with properties and relations)',_At:'Compile inputs, then write a SysML-style sequence diagram to rendering-backend-formatted output',_Au:'Compile inputs, then write a SysML-style activity diagram to rendering-backend-formatted output',_Av:'Compile inputs, then write a SysML-style state diagram to rendering-backend-formatted output',_Aw:'Compile inputs, then write a SysML-style use-case diagram to rendering-backend-formatted output',_CQ:"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=_Al);parser.add_argument(_E,'--output',metavar=C,help='Specify the name of the output file',default=SBDL_Parser.Tokens.stdio_name);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(_CR,metavar='compiler_definitions',help='Specify a file path defining custom compiler directives',default=[],nargs=_O);parser.add_argument(_CS,'--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)
2966
2965
  def show_manual(_):
2967
2966
  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
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='sbdl',
5
- version='1.18.10',
5
+ version='1.18.12',
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