Generate Python Tool

gen_py_tool is package for generation of Python tool.

Developed in python code: 100%.

The README is used to introduce the modules and provide instructions on how to install the modules, any machine dependencies it may have and any other information that should be provided before the modules are installed.

Python package GitHub issues Documentation Status GitHub contributors

gen_py_tool

gen_py_tool package

Subpackages

gen_py_tool.pro package
Subpackages
gen_py_tool.pro.config package
Submodules
gen_py_tool.pro.config.pro_name module
Module
pro_name.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ProName with attribute(s) and method(s). Defined API for project name with preparations for generation.
class gen_py_tool.pro.config.pro_name.ProName(verbose=False)[source]

Defined class ProName with attribute(s) and method(s). Defined API for project name with preparations for generation. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
__verbose - enable/disable verbose option.
__pro_name - project name.
methods:
__init__ - initial constructor.
pro_name - property methods for set/get operations.
is_pro_name_ok - checking is project name ok.
__str__ - dunder method for ProName.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::CONFIG::PRO_NAME'
is_pro_name_ok()[source]

Checking is project name ok.

Returns:boolean status, True (not None) | False.
Return type:<bool>
Exceptions:None
pro_name

Property method for getting project name.

Returns:formatted project name | None.
Return type:<str> | <NoneType>
Exceptions:None
gen_py_tool.pro.config.pro_selector module
Module
pro_selector.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ProjectSelector with attribute(s) and method(s). Created API for project selector during generation process.
class gen_py_tool.pro.config.pro_selector.ProjectSelector[source]

Defined class ProjectSelector with attribute(s) and method(s). Created API for project selector during generation process. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
TYPE_KEY - project type key.
SCHEMA_KEY - project schema key.
ELEMENT_KEY - project element key.
TEMPLATE_KEY - project template key.
methods:
check_config_keys - checking configuration keys.
select_pro_type - select project type.
__str__ - dunder method for ProjectSelector.
ELEMENT_KEY = 'elements'
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::CONFIG::PROJECT_SELECTOR'
SCHEMA_KEY = 'schemas'
TEMPLATE_KEY = 'templates'
TYPE_KEY = 'types'
classmethod check_config_keys(config, verbose=False)[source]

Checking configuration keys.

Parameters:
  • config (<dict>) – dictionary with configuration.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

boolean status, True (all ok) | False.

Return type:

<bool>

Exceptions:

ATSTypeError | ATSBadCallError

classmethod select_pro_type(config, verbose=False)[source]

Select project type.

Parameters:
  • config (<dict>) – dictionary with configuration.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

project type and project ID | None and None.

Return type:

<str> <int> | <NoneType> <NoneType>

Exceptions:

ATSTypeError | ATSBadCallError

gen_py_tool.pro.config.pro_type module
Module
pro_type.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ProType with attribute(s) and method(s). Defined API for project type with preparations for generation.
class gen_py_tool.pro.config.pro_type.ProType(verbose=False)[source]

Defined class ProType with attribute(s) and method(s). Defined API for project type with preparations for generation. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
__verbose - enable/disable verbose option.
__pro_type - project type.
methods:
__init__ - initial constructor.
pro_type - property methods for set/get operations.
is_pro_type_ok - checking is project type ok.
__str__ - dunder method for ProType.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::CONFIG::PRO_TYPE'
is_pro_type_ok()[source]

Checking is project type ok.

Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None
pro_type

Property method for getting project type.

Returns:formatted project type | None.
Return type:<str> | <NoneType>
Exceptions:None
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ProConfig with attribute(s) and method(s). Defined project configuration container.
class gen_py_tool.pro.config.ProConfig(verbose=False)[source]

Defined class ProConfig with attribute(s) and method(s). Defined project configuration container. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
__verbose - enable/disable verbose option.
__config - configuration dictionary.
methods:
__init__ - initial constructor.
pro_name - property methods for set/get operations.
is_config_ok - checking is project configuration ok.
__str__ - dunder method for ProConfig.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::CONFIG::PRO_CONFIG'
config

Property method for getting project configuration.

Returns:formatted project configuration | None.
Return type:<dict> | <NoneType>
Exceptions:None
is_config_ok()[source]

Checking is project configuration ok.

Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None
gen_py_tool.pro.element package
Submodules
gen_py_tool.pro.element.element_container module
Module
element_container.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ElementContainer with attribute(s) and method(s). Created API for element container.
class gen_py_tool.pro.element.element_container.ElementContainer(verbose=False)[source]

Defined class ElementContainer with attribute(s) and method(s). Created API for element container. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
__verbose - enable/disable verbose option.
__element - element object.
methods:
__init__ - initial constructor.
element - get/set property element object.
is_element_ok - checking is project element ok.
__str__ - dunder method for ElementContainer.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::ELEMENT::ELEMENT_CONTAINER'
element

Get element object property.

Returns:element object | None.
Return type:<dict> | <NoneType>
Exceptions:None
is_element_ok()[source]

Checking is project element ok.

Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None
gen_py_tool.pro.element.element_keys module
Module
element_keys.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ElementKeys with attribute(s). Created attributes for processing tool/gen element.
class gen_py_tool.pro.element.element_keys.ElementKeys[source]

Defined class ElementKeys with attribute(s). Created attributes for processing tool/gen element. It defines:

attributes:
ROOT_KEY - element key for elements.
TOOL_NAME_KEY - element key for TOOL_NAME.
TOOL_UPPER_KEY - element key for TOOL_UPPER.
TOOL_CLASS_KEY - element key for TOOL_CLASS.
TOOL_YEAR_KEY - element key for YEAR.
methods:
None.
ROOT_KEY = 'elements'
TOOL_CLASS_KEY = 'TOOL_CLASS'
TOOL_NAME_KEY = 'TOOL_NAME'
TOOL_UPPER_KEY = 'TOOL_UPPER'
TOOL_YEAR_KEY = 'YEAR'
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ElementLoader with attribute(s) and method(s). Created API for element checking and loding.
class gen_py_tool.pro.element.ElementLoader(element_file, verbose=False)[source]

Bases: ats_utilities.config_io.base_check.FileChecking, gen_py_tool.pro.element.element_container.ElementContainer, gen_py_tool.pro.element.element_keys.ElementKeys

Defined class ElementLoader with attribute(s) and method(s). Created API for element checking and loding. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
CONF_DIR - configuration directory.
methods:
__init__ - initial constructor.
check_root_key - check root key for element.
process_element - process element object.
__str__ - dunder method for ElementLoader.
CONF_DIR = '/../../conf/element/'
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::ELEMENT::ELEMENT_LOADER'
VERBOSE = 'ATS_UTILITIES'
check_root_key(verbose=False)[source]

Check root key for element.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:boolean status, True (success) | False.
Return type:<bool>
Exceptions:None
process_element(pro_name, verbose=False)[source]

Process element object.

Parameters:
  • pro_name (<str>) – project name.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

boolean status, True (success) | False.

Return type:

<bool>

Exceptions:

ATSTypeError | ATSBadCallError

gen_py_tool.pro.factory package
Subpackages
gen_py_tool.pro.factory.collectiner package
Subpackages
gen_py_tool.pro.factory.collectiner.gen package
Submodules
gen_py_tool.pro.factory.collectiner.gen.base module
Module
base.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class BaseCollectiner with attribute(s) and method(s). Defined project container for pre-processing phase.
class gen_py_tool.pro.factory.collectiner.gen.base.BaseCollectiner(verbose=False)[source]

Bases: gen_py_tool.pro.config.pro_name.ProName, gen_py_tool.pro.config.pro_type.ProType, gen_py_tool.pro.schema.schema_container.SchemaContainer, gen_py_tool.pro.template.template_container.TemplateContainer

Defined class BaseCollectiner with attribute(s) and method(s). Defined project container for pre-processing phase. It defines:

attributes:
None.
methods:
__init__ - initial constructor.
is_container_ok - checking is container ok.
__str__ - dunder method for BaseCollectiner.
is_container_ok()[source]

Checking is container ok.

Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ProCollectiner with attribute(s) and method(s). Defined project container for pre-processing phase.
class gen_py_tool.pro.factory.collectiner.gen.ProCollectiner(verbose=False)[source]

Bases: gen_py_tool.pro.factory.collectiner.gen.base.BaseCollectiner

Defined class ProCollectiner with attribute(s) and method(s). Defined project container for pre-processing phase. It defines:

attributes:
None.
methods:
__init__ - initial constructor.
update_gen_name - peparing gen name for project.
update_gen_class - preparing gen class for project.
update_gen_run - preparing gen run for project.
update_gen_pro_class - preparing gen class for project.
update_gen_conf - preparing gen conf for project.
update_gen_log - preparing gen log for project.
__str__ - dunder method for ProCollectiner.
update_gen_class()[source]

Preparing generator project setup.

Exceptions:None
update_gen_conf()[source]

Preparing generator project setup.

Exceptions:None
update_gen_log()[source]

Preparing generator project setup.

Exceptions:None
update_gen_name()[source]

Preparing generator name for project schema.

Exceptions:None
update_gen_pro_class()[source]

Preparing generator project class setup.

Exceptions:None
update_gen_run()[source]

Preparing generator project setup.

Exceptions:None
gen_py_tool.pro.factory.collectiner.tool package
Submodules
gen_py_tool.pro.factory.collectiner.tool.base module
Module
base.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class BaseCollectiner with attribute(s) and method(s). Defined project container for pre-processing phase.
class gen_py_tool.pro.factory.collectiner.tool.base.BaseCollectiner(verbose=False)[source]

Bases: gen_py_tool.pro.config.pro_name.ProName, gen_py_tool.pro.config.pro_type.ProType, gen_py_tool.pro.schema.schema_container.SchemaContainer, gen_py_tool.pro.template.template_container.TemplateContainer

Defined class BaseCollectiner with attribute(s) and method(s). Defined project container for pre-processing phase. It defines:

attributes:
None.
methods:
__init__ - initial constructor.
is_container_ok - checking is container ok.
__str__ - dunder method for BaseCollectiner.
is_container_ok()[source]

Checking is container ok.

Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ProCollectiner with attribute(s) and method(s). Defined project container for pre-processing phase.
class gen_py_tool.pro.factory.collectiner.tool.ProCollectiner(verbose=False)[source]

Bases: gen_py_tool.pro.factory.collectiner.tool.base.BaseCollectiner

Defined class ProCollectiner with attribute(s) and method(s). Defined project container for pre-processing phase. It defines:

attributes:
None.
methods:
__init__ - initial constructor.
update_tool_name - peparing tool name for project.
update_tool_class - preparing tool class for project.
update_tool_run - preparing tool run for project.
update_tool_conf - preparing tool conf for project.
update_tool_log - preparing tool log for project.
__str__ - dunder method for ProCollectiner.
update_tool_class()[source]

Preparing tool class for project schema.

Exceptions:None
update_tool_conf()[source]

Preparing tool conf for project schema.

Exceptions:None
update_tool_log()[source]

Preparing tool log for project schema.

Exceptions:None
update_tool_name()[source]

Preparing tool name for project schema.

Exceptions:None
update_tool_run()[source]

Preparing tool run for project schema.

Exceptions:None
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined package gen_py_tool.pro.factory.collectiner.
gen_py_tool.pro.factory.extractiner package
Subpackages
gen_py_tool.pro.factory.extractiner.gen package
Submodules
gen_py_tool.pro.factory.extractiner.gen.base module
Module
base.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class BaseExtractor with attribute(s) and method(s). Defined project container for post-processing phase.
class gen_py_tool.pro.factory.extractiner.gen.base.BaseExtractor(verbose=False)[source]

Bases: gen_py_tool.pro.schema.schema_container.SchemaContainer, gen_py_tool.pro.element.element_container.ElementContainer

Defined class BaseExtractor with attribute(s) and method(s). Defined project container for post-processing phase. It defines:

attributes:
None.
methods:
__init__ - initial constructor.
is_container_ok - checking is container ok.
__str__ - dunder method for BaseExtractor.
is_container_ok()[source]

Checking is container ok.

Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ProExtractor with attribute(s) and method(s). Defined project container for post-processing phase.
class gen_py_tool.pro.factory.extractiner.gen.ProExtractor(verbose=False)[source]

Bases: gen_py_tool.pro.factory.extractiner.gen.base.BaseExtractor

Defined class ProExtractor with attribute(s) and method(s). Defined project container for post-processing phase. It defines:

attributes:
None.
methods:
__init__ - initial constructor.
extract_gen_name - extract gen name for project.
extract_gen_class - extract gen class for project.
extract_gen_run - extract gen run for project.
extract_gen_conf - extract gen conf for project.
extract_gen_conf_util - extract gen conf util for project.
extract_gen_conf_template - extract gen template for project.
extract_gen_log - extract gen log for project.
extract_edit_config - extract gen edit config for project.
create_package_structure - create package structure.
create_package_structure - create package structure.
__str__ - dunder method for ProExtractor.
create_package_structure()[source]

Creating generator package structure from project schema.

Exceptions:None
extract_edit_config()[source]

Extraction gen edit config from project schema.

Returns:github edit configuration | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_gen_class()[source]

Extraction gen class from project schema.

Returns:python code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_gen_conf()[source]

Extraction gen conf from project schema.

Returns:ini configuraiton code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_gen_conf_template()[source]

Extraction gen conf template from project schema.

Returns:ini configuraiton code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_gen_conf_util()[source]

Extraction gen conf util from project schema.

Returns:ini configuraiton code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_gen_log()[source]

Extraction gen log from project schema.

Returns:empty log content | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_gen_name()[source]

Extraction of gen name from project element.

Returns:gen name | None.
Return type:<str> | <NoneType>
Exceptions:None
extract_gen_pro()[source]

Extraction gen pro from project schema.

Returns:python code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_gen_run()[source]

Extraction gen run from project schema.

Returns:python code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_read_template()[source]

Extraction gen pro from project schema.

Returns:python code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_write_template()[source]

Extraction gen pro from project schema.

Returns:python code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
gen_py_tool.pro.factory.extractiner.tool package
Submodules
gen_py_tool.pro.factory.extractiner.tool.base module
Module
base.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class BaseExtractor with attribute(s) and method(s). Defined project container for post-processing phase.
class gen_py_tool.pro.factory.extractiner.tool.base.BaseExtractor(verbose=False)[source]

Bases: gen_py_tool.pro.schema.schema_container.SchemaContainer, gen_py_tool.pro.element.element_container.ElementContainer

Defined class BaseExtractor with attribute(s) and method(s). Defined project container for post-processing phase. It defines:

attributes:
None.
methods:
__init__ - initial constructor.
is_container_ok - checking is container ok.
__str__ - dunder method for BaseExtractor.
is_container_ok()[source]

Checking is container ok.

Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ProExtractor with attribute(s) and method(s). Defined project container for post-processing phase.
class gen_py_tool.pro.factory.extractiner.tool.ProExtractor(verbose=False)[source]

Bases: gen_py_tool.pro.factory.extractiner.tool.base.BaseExtractor

Defined class ProExtractor with attribute(s) and method(s). Defined project container for post-processing phase. It defines:

attributes:
None.
methods:
__init__ - initial constructor.
extract_tool_name - extract tool name for project.
extract_tool_class - extract tool class for project.
extract_tool_run - extract tool run for project.
extract_tool_conf - extract tool conf for project.
extract_tool_conf_util - extract tool conf util for project.
extract_tool_log - extract tool log for project.
extract_edit_config - extract tool edit config for project.
create_package_structure - create package structure.
__str__ - dunder method for ProExtractor.
create_package_structure()[source]

Creating tool package structure from project schema.

Exceptions:None
extract_edit_config()[source]

Extraction tool edit config from project schema.

Returns:github edit configuration | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_tool_class()[source]

Extraction tool class from project schema.

Returns:python code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_tool_conf()[source]

Extraction tool conf from project schema.

Returns:ini configuraiton code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_tool_conf_util()[source]

Extraction tool conf util from project schema.

Returns:ini configuraiton code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_tool_log()[source]

Extraction tool log from project schema.

Returns:empty log content | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
extract_tool_name()[source]

Extraction of tool name from project element.

Returns:tool name | None.
Return type:<str> | <NoneType>
Exceptions:None
extract_tool_run()[source]

Extraction tool run from project schema.

Returns:python code | None.
Return type:<str>, <str> | <NoneType>, <str>
Exceptions:None
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined package gen_py_tool.pro.factory.extractiner.
gen_py_tool.pro.factory.gen package
Submodules
gen_py_tool.pro.factory.gen.deploy_gen module
Module
gen_extractor.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class DeployGen with attribute(s) and method(s). Created API for extracting elements from schema for generator.
class gen_py_tool.pro.factory.gen.deploy_gen.DeployGen(element, schema, verbose=False)[source]

Bases: gen_py_tool.pro.factory.extractiner.gen.ProExtractor, gen_py_tool.pro.factory.gen.gen_elements.GenElements, gen_py_tool.pro.element.element_keys.ElementKeys

Defined class DeployGen with attribute(s) and method(s). Created API for extracting elements from schema for generator. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
methods:
__init__ - initial constructor.
deploy_gen - deployment of gen from project schema.
__str__ - dunder method for DeployGen.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::FACTORY::GEN::DEPLOY_GEN'
deploy_modules()[source]

Deployment of gen from project schema.

Returns:list with gen name and modules.
Return type:<list>
Exceptions:None
gen_py_tool.pro.factory.gen.gen_elements module
Module
gen_elements.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class GenElements with attribute(s). Created attributes for preparing project schema for generator.
class gen_py_tool.pro.factory.gen.gen_elements.GenElements[source]

Defined class GenElements with attribute(s). Created attributes for preparing project schema for generator. It defines:

attributes:
NAME - project type for generator.
MOD - project type for generator.
INIT - project type for generator.
RUN - project type for generator.
CLASS - project type for generator.
EDIT - project type for generator.
_EDIT - project type for generator.
CONF - project type for generator.
CFG - project type for generator.
CONFIG - project type for generator.
LOG - project type for generator.
UTIL - project type for generator.
methods:
None.
CFG = 'cfg'
CLASS = 'generator_process_class'
CONF = 'conf'
CONFIG = 'configuration'
EDIT = 'editorconfig'
INIT = '__init__.py'
IO_CLASS = 'io_class'
LOG = 'log'
MOD = 'modules'
NAME = 'generator_name'
PRO = 'pro'
READ = 'read_template'
RUN = 'run'
TEMPLATE = 'template'
TEST = 'generator_test'
UTIL = 'util'
WRITE = 'write_template'
gen_py_tool.pro.factory.gen.prepare_gen module
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class PrepareGen with attribute(s) and method(s). Created API for preparing project schema for generator.
class gen_py_tool.pro.factory.gen.prepare_gen.PrepareGen(pro_property, template, schema, verbose=False)[source]

Bases: gen_py_tool.pro.factory.collectiner.gen.ProCollectiner

Defined class PrepareGen with attribute(s) and method(s). Created API for preparing project schema for generator. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
methods:
__init__ - initial constructor.
export - export formatted project schema.
__str__ - dunder method for PrepareGen.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::FACTORY::GEN::PREPARE_GEN'
export(verbose=False)[source]

Export generator project setup.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:schema content, boolean status (True) | None, False.
Return type:<dict>, <bool> | <NoneType>, <bool>
Exceptions:None
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class GenFactory with attribute(s) and method(s). Created API for preparing project schema for gen.
class gen_py_tool.pro.factory.gen.GenFactory(pro_property, schema, template, element, verbose=False)[source]

Defined class GenFactory with attribute(s) and method(s). Created API for preparing project schema for tool. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
methods:
__init__ - initial constructor.
get_preparer - get preparer object for factory.
get_deployer - get deployer object for factory.
__str__ - dunder method for GenFactory.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::FACTORY::GEN::GEN_FACTORY'
get_deployer()[source]

Get deployer object from GenFactory for Factory.

Returns:object for deploying gen.
Return type:<DeployGen>
Exceptions:None
get_preparer()[source]

Get preparer object from GenFactory for Factory.

Returns:object for preparing gen.
Return type:<PrepareGen>
Exceptions:None
gen_py_tool.pro.factory.tool package
Submodules
gen_py_tool.pro.factory.tool.deploy_tool module
Module
deploy_tool.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class DeployTool with attribute(s) and method(s). Created API for extracting elements from schema for tool.
class gen_py_tool.pro.factory.tool.deploy_tool.DeployTool(element, schema, verbose=False)[source]

Bases: gen_py_tool.pro.factory.extractiner.tool.ProExtractor

Defined class DeployTool with attribute(s) and method(s). Created API for extracting elements from schema for tool. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
methods:
__init__ - initial constructor.
deploy_tool - deployment of tool from project schema.
__str__ - dunder method for DeployTool.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::FACTORY::TOOL::DEPLOY_TOOL'
deploy_modules()[source]

Deployment of tool from project schema.

Returns:list with tool name and modules.
Return type:<list>
Exceptions:None
gen_py_tool.pro.factory.tool.prepare_tool module
Module
prepare_tool.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class PrepareTool with attribute(s) and method(s). Created API for preparing project schema for tool.
class gen_py_tool.pro.factory.tool.prepare_tool.PrepareTool(pro_property, template, schema, verbose=False)[source]

Bases: gen_py_tool.pro.factory.collectiner.tool.ProCollectiner

Defined class PrepareTool with attribute(s) and method(s). Created API for preparing project schema for tool. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
methods:
__init__ - initial constructor.
export - export formatted project schema.
__str__ - dunder method for PrepareTool.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::FACTORY::TOOL::PREPARE_TOOL'
export(verbose=False)[source]

Export tool project setup.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:schema content, boolean status (True) | None, False.
Return type:<dict>, <bool> | <NoneType>, <bool>
Exceptions:None
gen_py_tool.pro.factory.tool.tool_elements module
Module
tool_elements.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ToolElements with attribute(s). Created attributes for preparing project schema for tool.
class gen_py_tool.pro.factory.tool.tool_elements.ToolElements[source]

Defined class ToolElements with attribute(s). Created attributes for preparing project schema for tool. It defines:

attributes:
NAME - project type for tool.
MOD - project type for generator.
INIT - project type for tool.
RUN - project type for generator.
CLASS - project type for tool.
EDIT - project type for generator.
_EDIT - project type for tool.
CONF - project type for generator.
CFG - project type for tool.
CONFIG - project type for generator.
LOG - project type for tool.
UTIL - project type for generator.
methods:
None.
CFG = 'cfg'
CLASS = 'tool_name_class'
CONF = 'conf'
CONFIG = 'configuration'
EDIT = 'editorconfig'
INIT = '__init__.py'
LOG = 'log'
MOD = 'modules'
NAME = 'tool_name'
RUN = 'run'
UTIL = 'util'
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ToolFactory with attribute(s) and method(s). Created API for preparing project schema for tool.
class gen_py_tool.pro.factory.tool.ToolFactory(pro_property, schema, template, element, verbose=False)[source]

Defined class ToolFactory with attribute(s) and method(s). Created API for preparing project schema for tool. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
methods:
__init__ - initial constructor.
get_preparer - get preparer object for factory.
get_deployer - get deployer object for factory.
__str__ - dunder method for ToolFactory.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::FACTORY::TOOL::TOOL_FACTORY'
get_deployer()[source]

Get deployer object from ToolFactory for Factory.

Returns:object for deploying tool.
Return type:<DeployTool>
Exceptions:None
get_preparer()[source]

Get preparer object from ToolFactory for Factory.

Returns:object for preparing tool.
Return type:<PrepareTool>
Exceptions:None
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class Factory with attribute(s) and method(s). Created API for project container factory.
class gen_py_tool.pro.factory.Factory(pro_types, verbose=False)[source]

Defined class Factory with attribute(s) and method(s). Created API for project container factory. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
__supported_pro_types - list with supported project types.
methods:
__init__ - initial constructor.
check_pro_type - checking project type is it supported.
produce - preparing project factory object.
__str__ - dunder method for Factory.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::FACTORY'
check_pro_type(pro_type, verbose=False)[source]

Checking project type is it supported.

Parameters:
  • pro_type (<str>) – project type.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

boolean status, True (supported) | False.

Return type:

<bool>

Exceptions:

ATSTypeError | ATSBadCallError

produce(pro_property, schema, template, element, verbose=False)[source]

Preparing project factory object.

Parameters:
  • pro_property (<dict>) – project property (name and type).
  • template (<dict>) – project tool/generator template.
  • schema (<dict>) – project tool/generator schema.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

factory product object | None.

Return type:

<Python Object> | <NoneType>

Exceptions:

ATSTypeError | ATSBadCallError

gen_py_tool.pro.schema package
Submodules
gen_py_tool.pro.schema.schema_container module
Module
schema_container.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class SchemaContainer with attribute(s) and method(s). Created API for schema container.
class gen_py_tool.pro.schema.schema_container.SchemaContainer(verbose=False)[source]

Defined class SchemaContainer with attribute(s) and method(s). Created API for schema container. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
__verbose - enable/disable verbose option.
__schema - schema object.
methods:
__init__ - initial constructor.
schema - get/set property schema object.
is_schema_ok - checking is project schema ok.
__str__ - dunder method for SchemaContainer.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::SCHEMA::SCHEMA_CONTAINER'
is_schema_ok()[source]

Checking is project schema ok.

Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None
schema

Get schema object property.

Returns:schema object | None.
Return type:<dict> | <NoneType>
Exceptions:None
gen_py_tool.pro.schema.schema_keys module
Module
schema_keys.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class SchemaKeys with attribute(s). Created attributes for processing tool/gen schema.
class gen_py_tool.pro.schema.schema_keys.SchemaKeys[source]

Defined class SchemaKeys with attribute(s). Created attributes for processing tool/gen schema. It defines:

attributes:
TOOL_SCHEMA - schema tool key.
GEN_SCHEMA - schema generator key.
SUPPORTED_SCHEMAS - supportd schemas (checks by key).
methods:
None.
GEN_SCHEMA = 'schema_generator'
SUPPORTED_SCHEMAS = ['schema_tool', 'schema_generator']
TOOL_SCHEMA = 'schema_tool'
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class SchemaLoader with attribute(s) and method(s). Created API for schema checking and loading.
class gen_py_tool.pro.schema.SchemaLoader(schema_file, verbose=False)[source]

Bases: ats_utilities.config_io.base_check.FileChecking, gen_py_tool.pro.schema.schema_container.SchemaContainer, gen_py_tool.pro.schema.schema_keys.SchemaKeys

Defined class SchemaLoader with attribute(s) and method(s). Created API for schema checking and loading. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
CONF_DIR - configuration directory.
methods:
__init__ - initial constructor.
check_root_key - check root key for schema.
__str__ - dunder method for SchemaLoader.
CONF_DIR = '/../../conf/schema/'
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::SCHEMA::SCHEMA_LOADER'
VERBOSE = 'ATS_UTILITIES'
check_root_key(verbose=False)[source]

Check root key for schema.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:boolean status, True (success) | False.
Return type:<bool>
Exceptions:None
gen_py_tool.pro.template package
Submodules
gen_py_tool.pro.template.template_container module
Module
template_container.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class TemplateContainer with attribute(s) and method(s). Created API for template container.
class gen_py_tool.pro.template.template_container.TemplateContainer(verbose=False)[source]

Defined class TemplateContainer with attribute(s) and method(s). Created API for template container. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
__verbose - enable/disable verbose option.
__template - template object.
methods:
__init__ - initial constructor.
template - get/set property template object.
is_template_ok - checking is project template ok.
__str__ - dunder method for TemplateContainer.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::TEMPLATE::TEMPLATE_CONTAINER'
is_template_ok()[source]

Checking is project template ok.

Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None
template

Get template object property.

Returns:template object | None.
Return type:<dict> | <NoneType>
Exceptions:None
gen_py_tool.pro.template.template_keys module
Module
template_keys.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class TemplateKeys with attribute(s). Created attributes for processing tool/gen template.
class gen_py_tool.pro.template.template_keys.TemplateKeys[source]

Defined class TemplateKeys with attribute(s). Created attributes for processing tool/gen template. It defines:

attributes:
TOOL_TEMPLATE - tool template key.
GEN_TEMPLATE - generator template key.
SUPPORTED_TEMPLATES - list of supported templates.
methods:
None.
GEN_TEMPLATE = 'generator'
SUPPORTED_TEMPLATES = ['tool', 'generator']
TOOL_TEMPLATE = 'tool'
Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class TemplateLoader with attribute(s) and method(s). Created API for template checking and loadig.
class gen_py_tool.pro.template.TemplateLoader(template_file, verbose=False)[source]

Bases: ats_utilities.config_io.base_check.FileChecking, gen_py_tool.pro.template.template_container.TemplateContainer, gen_py_tool.pro.template.template_keys.TemplateKeys

Defined class TemplateLoader with attribute(s) and method(s). Created API for template checking and loadig. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
CONF_DIR - configuration directory.
methods:
__init__ - initial constructor.
check_root_key - check root key for template.
__str__ - dunder method for TemplateLoader.
CONF_DIR = '/../../conf/template/'
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::TEMPLATE::TEMPLATE_LOADER'
VERBOSE = 'ATS_UTILITIES'
check_root_key(verbose=False)[source]

Check root key for template.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:boolean status, True (success) | False.
Return type:<bool>
Exceptions:None
Submodules
gen_py_tool.pro.read_template module
Module
read_template.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class ReadTemplate with attribute(s) and method(s). Created API for reading a project templates.
class gen_py_tool.pro.read_template.ReadTemplate(verbose=False)[source]

Bases: ats_utilities.config_io.base_check.FileChecking

Defined class ReadTemplate with attribute(s) and method(s). Created API for reading a project templates. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
TEMPLATE_DIR - prefix path to templates.
__template_dir - absolute template directory.
methods:
__init__ - initial constructor.
get_template_dir - get template dir path.
read - read a templates and return a content with status.
__str__ - dunder method for ReadTemplate.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::READ_TEMPLATE'
TEMPLATE_DIR = '/../conf/template/'
VERBOSE = 'ATS_UTILITIES'
get_template_dir()[source]

Getter for template dir path.

Returns:template dir path | None.
Return type:<str> | <NoneType>
Exceptions:None
read(template_loader, pro_type, verbose=False)[source]

Read a templates and return a content with status.

Parameters:
  • template_loader (<dict>) – dict with template modules.
  • pro_type (<str>) – project type (tool | generator).
  • verbose (<bool>) – enable/disable verbose option.
Returns:

dict with templates and True | empty dict and False.

Return type:

<dict> <bool>

Exceptions:

ATSTypeError | ATSBadCallError

gen_py_tool.pro.write_template module
Module
write_template.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class WriteTemplate with attribute(s) and method(s). Created API for writing a template content with parameters to a file.
class gen_py_tool.pro.write_template.WriteTemplate(verbose=False)[source]

Bases: ats_utilities.config_io.base_check.FileChecking

Defined class WriteTemplate with attribute(s) and method(s). Created API for writing a template content with parameters to a file. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
methods:
__init__ - initial constructor.
write - write templates content with parameters to modules.
__str__ - dunder method for WriteTemplate.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::WRITE_TEMPLATE'
VERBOSE = 'ATS_UTILITIES'
write(element, modules, verbose=False)[source]

Write templates content with parameters to modules.

Parameters:
  • element (<dict>) – processes element.
  • modules (<list>) – modules for tool/generator.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

boolean status, True (success) | False.

Return type:

<bool>

Exceptions:

ATSTypeError | ATSBadCallError

Module contents
Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class GenPro with attribute(s) and method(s). Generate project by setup of parameters, templates, schemas.
class gen_py_tool.pro.GenPro(project_name, verbose=False)[source]

Bases: ats_utilities.config_io.base_check.FileChecking, gen_py_tool.pro.config.ProConfig, gen_py_tool.pro.config.pro_name.ProName, gen_py_tool.pro.config.pro_type.ProType

Defined class GenPro with attribute(s) and method(s). Generate project by setup of parameters, templates, schemas. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
PRO_STRUCTURE - project structure.
methods:
__init__ - initial constructor.
is_pro_config_ok - checking is project configuration ok.
gen_pro - generate project structure.
__str__ - dunder method for GenPro.
GEN_VERBOSE = 'GEN_PY_TOOL::PRO::GEN_PRO'
PRO_STRUCTURE = '/../conf/project.yaml'
VERBOSE = 'ATS_UTILITIES'
gen_pro(verbose=False)[source]

Generate project structure.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:boolean status, True (success) | False.
Return type:<bool>
Exceptions:None
is_pro_config_ok(verbose=False)[source]

Checking is project configuration ok.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:boolean status, True (ok) | False.
Return type:<bool>
Exceptions:None

Module contents

Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_tool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class GenPyTool with attribute(s) and method(s). Load a base info, create an CLI interface and run operation(s).
class gen_py_tool.GenPyTool(verbose=False)[source]

Bases: ats_utilities.cli.cfg_cli.CfgCLI

Defined class GenPyTool with attribute(s) and method(s). Load a base info, create an CLI interface and run operation(s). It defines:

attributes:
__metaclass__ - setting cooperative metaclasses.
GEN_VERBOSE - console text indicator for process-phase.
CONFIG - tool info file path.
LOG - tool log file path.
OPS - list of tool options.
logger - logger object API.
methods:
__init__ - initial constructor.
process - process and generate module setup.py.
__str__ - dunder method for GenPyTool.
CONFIG = '/conf/gen_py_tool.cfg'
GEN_VERBOSE = 'GEN_PY_TOOL'
LOG = '/log/gen_py_tool.log'
OPS = ['-g', '--gen', '-v', '--verbose', '--version']
VERBOSE = 'ATS_UTILITIES'
process(verbose=False)[source]

Process and run operation.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:boolean status, True (success) | False.
Return type:<bool>
Exceptions:None

Installation

Install Python2 Package Install Python3 Package

Navigate to release page download and extract release archive.

To install gen_py_tool type the following:

tar xvzf gen_py_tool-x.y.z.tar.gz
cd gen_py_tool-x.y.z
# python2
pip install -r requirements.txt
python setup.py install_lib
python setup.py install_data
python setup.py install_egg_info
# python3
pip3 install -r requirements.txt
python3 setup.py install_lib
python3 setup.py install_data
python3 setup.py install_egg_info

You can use Docker to create image/container, or You can use pip to install:

# python2
pip install gen-py-tool
# python3
pip3 install gen-py-tool

GitHub docker checker

Dependencies

gen_py_tool requires next modules and libraries:

Generation flow of py tool

Base flow of generation process:

https://raw.githubusercontent.com/vroncevic/gen_py_tool/dev/docs/gen_py_tool_flow.png

Tool structure

gen_py_tool is based on OOP:

https://raw.githubusercontent.com/vroncevic/gen_py_tool/dev/docs/gen_py_tool.png

Code structure:

gen_py_tool/
├── conf/
│   ├── element/
│   │   ├── substitute_generator.yaml
│   │   └── substitute_tool.yaml
│   ├── gen_py_tool.cfg
│   ├── gen_py_tool_util.cfg
│   ├── project.yaml
│   ├── schema/
│   │   ├── schema_generator.yaml
│   │   └── schema_tool.yaml
│   └── template/
│       ├── generator/
│       │   ├── editorconfig.template
│       │   ├── generator_configuration.template
│       │   ├── generator_configuration_util.template
│       │   ├── generator_io_class.template
│       │   ├── generator_process_class.template
│       │   ├── generator_read_template.template
│       │   ├── generator_test.template
│       │   ├── generator_write_template.template
│       │   └── run_generator.template
│       ├── template_generator.yaml
│       ├── template_tool.yaml
│       └── tool/
│           ├── editorconfig.template
│           ├── run_tool.template
│           ├── tool_configuration.template
│           ├── tool_configuration_util.template
│           └── tool_name_class.template
├── __init__.py
├── log/
│   └── gen_py_tool.log
├── pro/
│   ├── config/
│   │   ├── __init__.py
│   │   ├── pro_name.py
│   │   ├── pro_selector.py
│   │   └── pro_type.py
│   ├── element/
│   │   ├── element_container.py
│   │   ├── element_keys.py
│   │   └── __init__.py
│   ├── factory/
│   │   ├── collectiner/
│   │   │   ├── gen/
│   │   │   │   ├── base.py
│   │   │   │   └── __init__.py
│   │   │   ├── __init__.py
│   │   │   └── tool/
│   │   │       ├── base.py
│   │   │       └── __init__.py
│   │   ├── extractiner/
│   │   │   ├── gen/
│   │   │   │   ├── base.py
│   │   │   │   └── __init__.py
│   │   │   ├── __init__.py
│   │   │   └── tool/
│   │   │       ├── base.py
│   │   │       └── __init__.py
│   │   ├── gen/
│   │   │   ├── deploy_gen.py
│   │   │   ├── gen_elements.py
│   │   │   ├── __init__.py
│   │   │   └── prepare_gen.py
│   │   ├── __init__.py
│   │   └── tool/
│   │       ├── deploy_tool.py
│   │       ├── __init__.py
│   │       ├── prepare_tool.py
│   │       └── tool_elements.py
│   ├── __init__.py
│   ├── read_template.py
│   ├── schema/
│   │   ├── __init__.py
│   │   ├── schema_container.py
│   │   └── schema_keys.py
│   ├── template/
│   │   ├── __init__.py
│   │   ├── template_container.py
│   │   └── template_keys.py
│   └── write_template.py
└── run/
    └── gen_py_tool_run.py

Indices and tables