:py:mod:`json2graph.modules.arguments` ====================================== .. py:module:: json2graph.modules.arguments .. autoapi-nested-parse:: Argument Treatments Module. This module provides functions for parsing and validating user-provided arguments when starting the software execution as a script. It also makes the ARGUMENTS variable globally accessible with the user's arguments (when executed as a script) or with default values (when executed as test or as a library). Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: json2graph.modules.arguments.initialize_args_script json2graph.modules.arguments.initialize_args_import json2graph.modules.arguments.initialize_args_test Attributes ~~~~~~~~~~ .. autoapisummary:: json2graph.modules.arguments.ARGUMENTS json2graph.modules.arguments.LOGGER .. py:data:: ARGUMENTS .. py:data:: LOGGER .. py:function:: initialize_args_script() Parse the command-line arguments provided by the user and performs necessary validations. The ARGUMENTS variable must be initialized in every possible execution mode. .. py:function:: initialize_args_import(input_path = 'not_initialized', output_path = os.getcwd(), base_uri = 'https://example.org#', graph_format = 'ttl', language = '', model_only = False, silent = True, correct = False) Initialize the global variable ARGUMENTS of type dictionary, which contains user-provided (when executed in script mode) or default arguments (when executed as a library or for testing). The ARGUMENTS variable must be initialized in every possible execution mode. :param input_path: Path to the directory or JSON file to be decoded. (Optional) :type input_path: str :param output_path: Path to the directory in which the result file(s) will be saved. (Optional) :type output_path: str :param base_uri: Base URI to be used for generating URIs for ontology concepts. (Optional) Default is "https://example.org#". :type base_uri: str :param graph_format: Format for saving the resulting knowledge graph. (Optional) Default value is 'ttl' (Turtle syntax). :type graph_format: str :param language: Language tag to be added to the ontology's concepts. (Optional) :type language: str :param model_only: If True, only the OntoUML model will be extracted without diagrammatic information. (Optional) :type model_only: bool :param silent: If True, suppresses intermediate communications and log messages during execution. (Optional) :type silent: bool :param correct: If True, attempts to correct potential errors during the conversion process. (Optional) :type correct: bool .. py:function:: initialize_args_test(input_path = 'not_initialized', language = '') Initialize the global variable ARGUMENTS of type dictionary, which contains user-provided (when executed in script mode) or default arguments (when executed as a library or for testing). The ARGUMENTS variable must be initialized in every possible execution mode. :param input_path: Path to the directory or JSON file to be decoded. (Optional) :type input_path: str :param language: Language tag to be added to the ontology's concepts. (Optional) :type language: str