-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from vroncevic/dev
[gen_coap_service] Updated ATS CLI mechanism, docs
- Loading branch information
Showing
30 changed files
with
349 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
global-exclude *.py[cod] | ||
global-exclude *.editorconfig | ||
global-exclude *.editorconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ <h1>Source code for gen_coap_service.pro</h1><div class="highlight"><pre> | |
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s1">'(C) 2024, https://vroncevic.github.io/gen_coap_service'</span> | ||
<span class="n">__credits__</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'Vladimir Roncevic'</span><span class="p">,</span> <span class="s1">'Python Software Foundation'</span><span class="p">]</span> | ||
<span class="n">__license__</span> <span class="o">=</span> <span class="s1">'https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE'</span> | ||
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">'1.1.4'</span> | ||
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">'1.1.5'</span> | ||
<span class="n">__maintainer__</span> <span class="o">=</span> <span class="s1">'Vladimir Roncevic'</span> | ||
<span class="n">__email__</span> <span class="o">=</span> <span class="s1">'[email protected]'</span> | ||
<span class="n">__status__</span> <span class="o">=</span> <span class="s1">'Updated'</span> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ <h1>Source code for gen_coap_service.pro.read_template</h1><div class="highlight | |
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s1">'(C) 2024, https://vroncevic.github.io/gen_coap_service'</span> | ||
<span class="n">__credits__</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'Vladimir Roncevic'</span><span class="p">,</span> <span class="s1">'Python Software Foundation'</span><span class="p">]</span> | ||
<span class="n">__license__</span> <span class="o">=</span> <span class="s1">'https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE'</span> | ||
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">'1.1.4'</span> | ||
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">'1.1.5'</span> | ||
<span class="n">__maintainer__</span> <span class="o">=</span> <span class="s1">'Vladimir Roncevic'</span> | ||
<span class="n">__email__</span> <span class="o">=</span> <span class="s1">'[email protected]'</span> | ||
<span class="n">__status__</span> <span class="o">=</span> <span class="s1">'Updated'</span> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ <h1>Source code for gen_coap_service.pro.write_template</h1><div class="highligh | |
<span class="n">__copyright__</span> <span class="o">=</span> <span class="s1">'(C) 2024, https://vroncevic.github.io/gen_coap_service'</span> | ||
<span class="n">__credits__</span><span class="p">:</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'Vladimir Roncevic'</span><span class="p">,</span> <span class="s1">'Python Software Foundation'</span><span class="p">]</span> | ||
<span class="n">__license__</span> <span class="o">=</span> <span class="s1">'https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE'</span> | ||
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">'1.1.4'</span> | ||
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">'1.1.5'</span> | ||
<span class="n">__maintainer__</span> <span class="o">=</span> <span class="s1">'Vladimir Roncevic'</span> | ||
<span class="n">__email__</span> <span class="o">=</span> <span class="s1">'[email protected]'</span> | ||
<span class="n">__status__</span> <span class="o">=</span> <span class="s1">'Updated'</span> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
project: str = 'gen_coap_service' | ||
project_copyright: str = '2024, Vladimir Roncevic <[email protected]>' | ||
author: str = 'Vladimir Roncevic <[email protected]>' | ||
version: str = '1.1.4' | ||
version: str = '1.1.5' | ||
release: str = 'https://github.com/vroncevic/gen_coap_service/releases' | ||
extensions: List[str] = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] | ||
templates_path: List[str] = ['_templates'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,15 +21,15 @@ | |
''' | ||
|
||
import sys | ||
from typing import List | ||
from typing import List, Optional | ||
from os.path import exists, dirname, realpath | ||
from os import getcwd | ||
from argparse import Namespace | ||
|
||
try: | ||
from ats_utilities.splash import Splash | ||
from ats_utilities.logging import ATSLogger | ||
from ats_utilities.cli.cfg_cli import CfgCLI | ||
from ats_utilities.cli import ATSCli | ||
from ats_utilities.console_io.error import error_message | ||
from ats_utilities.console_io.verbose import verbose_message | ||
from ats_utilities.console_io.success import success_message | ||
|
@@ -44,13 +44,13 @@ | |
__copyright__ = '(C) 2024, https://vroncevic.github.io/gen_coap_service' | ||
__credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] | ||
__license__ = 'https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE' | ||
__version__ = '1.1.4' | ||
__version__ = '1.1.5' | ||
__maintainer__ = 'Vladimir Roncevic' | ||
__email__ = '[email protected]' | ||
__status__ = 'Updated' | ||
|
||
|
||
class GenCoAPService(CfgCLI): | ||
class GenCoAPService(ATSCli): | ||
''' | ||
Defines class GenCoAPService with attribute(s) and method(s). | ||
Loads a base info, creates a CLI interface and runs operations. | ||
|
@@ -97,9 +97,9 @@ def __init__(self, verbose: bool = False) -> None: | |
verbose, [f'{self._GEN_VERBOSE.lower()} init tool info'] | ||
) | ||
self._logger: ATSLogger = ATSLogger( | ||
self._GEN_VERBOSE.lower(), f'{current_dir}{self._LOG}', verbose | ||
self._GEN_VERBOSE.lower(), True, None, True, verbose | ||
) | ||
if self.tool_operational: | ||
if self.is_operational(): | ||
self.add_new_option( | ||
self._OPS[0], self._OPS[1], dest='name', | ||
help='generate project (provide name)' | ||
|
@@ -125,15 +125,15 @@ def process(self, verbose: bool = False) -> bool: | |
:exceptions: None | ||
''' | ||
status: bool = False | ||
if self.tool_operational: | ||
if self.is_operational(): | ||
try: | ||
args: Namespace = self.parse_args(sys.argv) | ||
if not bool(getattr(args, "name")): | ||
args: Optional[Namespace] = self.parse_args(sys.argv) | ||
if not bool(getattr(args, 'name')): | ||
error_message( | ||
[f'{self._GEN_VERBOSE.lower()} missing name argument'] | ||
) | ||
return status | ||
if not bool(getattr(args, "type")): | ||
if not bool(getattr(args, 'type')): | ||
error_message( | ||
[f'{self._GEN_VERBOSE.lower()} missing type argument'] | ||
) | ||
|
@@ -149,13 +149,13 @@ def process(self, verbose: bool = False) -> bool: | |
" ".join([ | ||
f'[{self._GEN_VERBOSE.lower()}]', | ||
'generate CoAP project skeleton', | ||
str(getattr(args, "type")), | ||
str(getattr(args, "name")) | ||
str(getattr(args, 'type')), | ||
str(getattr(args, 'name')) | ||
]) | ||
) | ||
try: | ||
status = gen.project_setup( | ||
getattr(args, "name"), getattr(args, "type"), | ||
getattr(args, 'name'), getattr(args, 'type'), | ||
getattr(args, "verbose") or verbose | ||
) | ||
except (ATSTypeError, ATSValueError) as e: | ||
|
@@ -174,7 +174,10 @@ def process(self, verbose: bool = False) -> bool: | |
) | ||
except SystemExit: | ||
error_message( | ||
[f'{self._GEN_VERBOSE.lower()} expected argument -n'] | ||
[ | ||
f'{self._GEN_VERBOSE.lower()}', | ||
'expected arguments name and type' | ||
] | ||
) | ||
return status | ||
else: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ats_name = gen_coap_service | ||
ats_version = 1.1.4 | ||
ats_version = 1.1.5 | ||
ats_build_date = 9 Jun 2020 | ||
ats_licence = https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[ **.log] | ||
[**.log] | ||
indent_style = tab | ||
tab_width = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +0,0 @@ | ||
07/03/2024 10:26:02 PM - INFO - generation simple_project done | ||
07/03/2024 10:26:03 PM - INFO - generation simple_project done | ||
07/03/2024 10:26:06 PM - INFO - generation simple_project done | ||
07/03/2024 10:26:08 PM - ERROR - tool is not operational | ||
07/03/2024 10:28:40 PM - INFO - generation simple_project done | ||
07/03/2024 10:28:41 PM - INFO - generation simple_project done | ||
07/03/2024 10:28:44 PM - INFO - generation simple_project done | ||
07/03/2024 10:28:46 PM - ERROR - tool is not operational | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ | |
__copyright__ = '(C) 2024, https://vroncevic.github.io/gen_coap_service' | ||
__credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] | ||
__license__ = 'https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE' | ||
__version__ = '1.1.4' | ||
__version__ = '1.1.5' | ||
__maintainer__ = 'Vladimir Roncevic' | ||
__email__ = '[email protected]' | ||
__status__ = 'Updated' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
__copyright__ = '(C) 2024, https://vroncevic.github.io/gen_coap_service' | ||
__credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] | ||
__license__ = 'https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE' | ||
__version__ = '1.1.4' | ||
__version__ = '1.1.5' | ||
__maintainer__ = 'Vladimir Roncevic' | ||
__email__ = '[email protected]' | ||
__status__ = 'Updated' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ | |
__copyright__ = '(C) 2024, https://vroncevic.github.io/gen_coap_service' | ||
__credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] | ||
__license__ = 'https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE' | ||
__version__ = '1.1.4' | ||
__version__ = '1.1.5' | ||
__maintainer__ = 'Vladimir Roncevic' | ||
__email__ = '[email protected]' | ||
__status__ = 'Updated' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
__copyright__ = '(C) 2024, https://vroncevic.github.io/gen_coap_service' | ||
__credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] | ||
__license__ = 'https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE' | ||
__version__ = '1.1.4' | ||
__version__ = '1.1.5' | ||
__maintainer__ = 'Vladimir Roncevic' | ||
__email__ = '[email protected]' | ||
__status__ = 'Updated' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
[metadata] | ||
name = gen_coap_service | ||
version = 1.1.4 | ||
version = 1.1.5 | ||
author = Vladimir Roncevic | ||
author_email = [email protected] | ||
description = Generating CoAP Modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
__copyright__ = '(C) 2024, https://vroncevic.github.io/gen_coap_service' | ||
__credits__: List[str] = ['Vladimir Roncevic', 'Python Software Foundation'] | ||
__license__ = 'https://github.com/vroncevic/gen_coap_service/blob/dev/LICENSE' | ||
__version__ = '1.1.4' | ||
__version__ = '1.1.5' | ||
__maintainer__ = 'Vladimir Roncevic' | ||
__email__ = '[email protected]' | ||
__status__ = 'Updated' | ||
|
@@ -61,7 +61,7 @@ | |
PYP_CLASSIFIERS: List[str] = SUPPORTED_PY_VERSIONS + APPROVED_LICENSES | ||
setup( | ||
name='gen_coap_service', | ||
version='1.1.4', | ||
version='1.1.5', | ||
description='Generating CoAP Modules', | ||
author='Vladimir Roncevic', | ||
author_email='[email protected]', | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"meta": {"format": 2, "version": "7.5.3", "timestamp": "2024-07-08T18:09:50.934573", "branch_coverage": false, "show_contexts": false}, "files": {"/data/dev/python/3_tools/gen_coap_service/github/gen_coap_service/gen_coap_service/__init__.py": {"executed_lines": [3, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 43, 44, 45, 46, 47, 48, 49, 50, 53, 54, 71, 72, 73, 74, 75, 77, 85, 86, 93, 94, 95, 96, 99, 102, 103, 107, 111, 117, 127, 128, 129, 130, 131, 132, 135, 136, 137, 140, 141, 147, 148, 156, 157, 164, 165, 166, 190], "summary": {"covered_lines": 61, "num_statements": 75, "percent_covered": 81.33333333333333, "percent_covered_display": "81", "missing_lines": 14, "excluded_lines": 0}, "missing_lines": [39, 41, 142, 146, 161, 162, 163, 171, 172, 175, 176, 182, 184, 187], "excluded_lines": []}, "/data/dev/python/3_tools/gen_coap_service/github/gen_coap_service/gen_coap_service/pro/__init__.py": {"executed_lines": [3, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 71, 72, 74, 82, 83, 84, 85, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 99, 107, 109, 117, 119, 138, 139, 140, 143, 144, 145, 146, 147, 148, 149, 152, 153, 154, 160, 161, 162, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 185, 186, 187, 188, 189, 192, 193, 194], "summary": {"covered_lines": 82, "num_statements": 85, "percent_covered": 96.47058823529412, "percent_covered_display": "96", "missing_lines": 3, "excluded_lines": 0}, "missing_lines": [38, 40, 150], "excluded_lines": []}, "/data/dev/python/3_tools/gen_coap_service/github/gen_coap_service/gen_coap_service/pro/read_template.py": {"executed_lines": [3, 23, 24, 26, 27, 28, 29, 30, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 59, 61, 69, 70, 72, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], "summary": {"covered_lines": 36, "num_statements": 38, "percent_covered": 94.73684210526316, "percent_covered_display": "95", "missing_lines": 2, "excluded_lines": 0}, "missing_lines": [31, 33], "excluded_lines": []}, "/data/dev/python/3_tools/gen_coap_service/github/gen_coap_service/gen_coap_service/pro/write_template.py": {"executed_lines": [3, 23, 24, 25, 26, 28, 29, 30, 31, 32, 37, 38, 39, 40, 41, 42, 43, 44, 47, 48, 61, 63, 71, 72, 76, 88, 89, 90, 91, 92, 93, 94, 95, 98, 99, 100, 101, 104, 105, 106], "summary": {"covered_lines": 38, "num_statements": 40, "percent_covered": 95.0, "percent_covered_display": "95", "missing_lines": 2, "excluded_lines": 0}, "missing_lines": [33, 35], "excluded_lines": []}}, "totals": {"covered_lines": 217, "num_statements": 238, "percent_covered": 91.17647058823529, "percent_covered_display": "91", "missing_lines": 21, "excluded_lines": 0}} |
Oops, something went wrong.