Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .coverage
Binary file not shown.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ Generator structure
│   ├── template_provider.py
│   └── templates/
│   └── setup.template
└── __init__.py
├── __init__.py
└── py.typed

7 directories, 23 files
7 directories, 24 files
```
</details>

Expand All @@ -157,16 +158,16 @@ Generator structure
|------|-------|------|-------|
| `dist_py_module/__init__.py` | 8 | 0 | 100%|
| `dist_py_module/application/__init__.py` | 8 | 0 | 100%|
| `dist_py_module/application/service.py` | 35 | 0 | 100%|
| `dist_py_module/application/service_bundle.py` | 29 | 0 | 100%|
| `dist_py_module/application/service.py` | 30 | 0 | 100%|
| `dist_py_module/application/service_bundle.py` | 28 | 0 | 100%|
| `dist_py_module/dist_py_module_bundle.py` | 41 | 0 | 100%|
| `dist_py_module/domain/__init__.py` | 8 | 0 | 100%|
| `dist_py_module/domain/models.py` | 18 | 0 | 100%|
| `dist_py_module/domain/ports/__init__.py` | 8 | 0 | 100%|
| `dist_py_module/domain/ports/ifile_gen.py` | 11 | 0 | 100%|
| `dist_py_module/domain/ports/ifile_writer.py` | 10 | 0 | 100%|
| `dist_py_module/domain/ports/itemplate_provider.py` | 10 | 0 | 100%|
| `dist_py_module/engine.py` | 64 | 0 | 100%|
| `dist_py_module/engine.py` | 69 | 0 | 100%|
| `dist_py_module/infrastructure/__init__.py` | 8 | 0 | 100%|
| `dist_py_module/infrastructure/cli.py` | 36 | 0 | 100%|
| `dist_py_module/infrastructure/cli_bundle.py` | 33 | 0 | 100%|
Expand All @@ -175,7 +176,7 @@ Generator structure
| `dist_py_module/infrastructure/icli.py` | 11 | 0 | 100%|
| `dist_py_module/infrastructure/icli_command.py` | 14 | 0 | 100%|
| `dist_py_module/infrastructure/template_provider.py` | 29 | 0 | 100%|
| **Total** | 446 | 0 | 100% |
| **Total** | 445 | 0 | 100% |

</details>

Expand All @@ -199,7 +200,7 @@ Running tool for creating new distributing py module
```bash
mkdir -p demo/mytool/

python3 main.py setup --package-name "dist_py_module" --version "3.1.0" --description "Package for distributing Python packages." --author "Vladimir Roncevic" --email "elektron.ronca@gmail.com" --github "vroncevic" --license "GNU General Public License (GPL)" --with-readme "True"
python3 main.py setup --package-name "dist_py_module" --version "3.1.1" --description "Package for distributing Python packages." --author "Vladimir Roncevic" --email "elektron.ronca@gmail.com" --github "vroncevic" --license "GNU General Public License (GPL)" --with-readme "True"
```

### Docs
Expand Down
4 changes: 2 additions & 2 deletions ats_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/ats_coverage'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/ats_coverage/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Updated'
Expand Down Expand Up @@ -345,7 +345,7 @@ def update_structure(pro_name: str) -> None:
if __name__ == "__main__":
cli: OptionManager = OptionManager(OptionComponentBundle(parameters={
'description': 'ats_coverage 2025',
'version': '3.1.0',
'version': '3.1.1',
'licence': 'GPLv3'
}))
cli.add_operation(
Expand Down
2 changes: 1 addition & 1 deletion dist_py_module.json

Large diffs are not rendered by default.

67 changes: 33 additions & 34 deletions dist_py_module.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<coverage version="7.6.10" timestamp="1782800521096" lines-valid="446" lines-covered="446" line-rate="1" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
<coverage version="7.6.10" timestamp="1782902003257" lines-valid="445" lines-covered="445" line-rate="1" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
<!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.6.10 -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
Expand Down Expand Up @@ -128,12 +128,17 @@
<line number="130" hits="1"/>
<line number="131" hits="1"/>
<line number="132" hits="1"/>
<line number="134" hits="1"/>
<line number="133" hits="1"/>
<line number="135" hits="1"/>
<line number="136" hits="1"/>
<line number="138" hits="1"/>
<line number="137" hits="1"/>
<line number="139" hits="1"/>
<line number="141" hits="1"/>
<line number="140" hits="1"/>
<line number="142" hits="1"/>
<line number="144" hits="1"/>
<line number="145" hits="1"/>
<line number="146" hits="1"/>
<line number="147" hits="1"/>
</lines>
</class>
</classes>
Expand Down Expand Up @@ -162,35 +167,30 @@
<line number="25" hits="1"/>
<line number="26" hits="1"/>
<line number="27" hits="1"/>
<line number="28" hits="1"/>
<line number="29" hits="1"/>
<line number="30" hits="1"/>
<line number="31" hits="1"/>
<line number="32" hits="1"/>
<line number="33" hits="1"/>
<line number="34" hits="1"/>
<line number="35" hits="1"/>
<line number="36" hits="1"/>
<line number="37" hits="1"/>
<line number="38" hits="1"/>
<line number="41" hits="1"/>
<line number="56" hits="1"/>
<line number="65" hits="1"/>
<line number="39" hits="1"/>
<line number="54" hits="1"/>
<line number="63" hits="1"/>
<line number="64" hits="1"/>
<line number="66" hits="1"/>
<line number="67" hits="1"/>
<line number="68" hits="1"/>
<line number="69" hits="1"/>
<line number="70" hits="1"/>
<line number="72" hits="1"/>
<line number="73" hits="1"/>
<line number="90" hits="1"/>
<line number="93" hits="1"/>
<line number="71" hits="1"/>
<line number="88" hits="1"/>
<line number="91" hits="1"/>
<line number="94" hits="1"/>
<line number="96" hits="1"/>
<line number="98" hits="1"/>
<line number="104" hits="1"/>
<line number="105" hits="1"/>
<line number="113" hits="1"/>
<line number="115" hits="1"/>
<line number="116" hits="1"/>
<line number="124" hits="1"/>
<line number="102" hits="1"/>
<line number="103" hits="1"/>
<line number="111" hits="1"/>
</lines>
</class>
<class name="service_bundle.py" filename="application/service_bundle.py" complexity="0" line-rate="1" branch-rate="0">
Expand All @@ -200,31 +200,30 @@
<line number="23" hits="1"/>
<line number="24" hits="1"/>
<line number="25" hits="1"/>
<line number="26" hits="1"/>
<line number="27" hits="1"/>
<line number="28" hits="1"/>
<line number="29" hits="1"/>
<line number="30" hits="1"/>
<line number="31" hits="1"/>
<line number="32" hits="1"/>
<line number="33" hits="1"/>
<line number="34" hits="1"/>
<line number="35" hits="1"/>
<line number="37" hits="1"/>
<line number="38" hits="1"/>
<line number="39" hits="1"/>
<line number="53" hits="1"/>
<line number="54" hits="1"/>
<line number="55" hits="1"/>
<line number="57" hits="1"/>
<line number="56" hits="1"/>
<line number="64" hits="1"/>
<line number="65" hits="1"/>
<line number="66" hits="1"/>
<line number="67" hits="1"/>
<line number="68" hits="1"/>
<line number="69" hits="1"/>
<line number="71" hits="1"/>
<line number="70" hits="1"/>
<line number="78" hits="1"/>
<line number="79" hits="1"/>
<line number="80" hits="1"/>
<line number="81" hits="1"/>
<line number="82" hits="1"/>
<line number="83" hits="1"/>
<line number="85" hits="1"/>
<line number="93" hits="1"/>
<line number="84" hits="1"/>
<line number="92" hits="1"/>
</lines>
</class>
</classes>
Expand Down
2 changes: 1 addition & 1 deletion dist_py_module/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
2 changes: 1 addition & 1 deletion dist_py_module/application/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
19 changes: 3 additions & 16 deletions dist_py_module/application/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
'''

from typing import Any, override
from ats_utilities.factory_class import format_instance_to_string
from ats_utilities.exceptions.ats_value_error import ATSValueError
from dist_py_module.domain.ports.ifile_gen import IFileGen
from dist_py_module.application.service_bundle import ServiceBundle
from dist_py_module.domain.ports.itemplate_provider import ITemplateProvider
Expand All @@ -32,7 +30,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
Expand Down Expand Up @@ -60,10 +58,10 @@ def __init__(self, component_bundle: ServiceBundle) -> None:
:param component_bundle: Bundle containing template provider and file writer.
:type component_bundle: <ServiceBundle>
:exceptions:
| ATSValueError: Component bundle (ServiceBundle) cannot be None or invalid.
| ValueError: Component bundle (ServiceBundle) cannot be None or invalid.
'''
if component_bundle is None:
raise ATSValueError('component bundle (ServiceBundle) cannot be None.')
raise ValueError('component bundle (ServiceBundle) cannot be None.')

component_bundle.validate()
self._template_provider: ITemplateProvider = component_bundle.template_provider
Expand Down Expand Up @@ -111,14 +109,3 @@ def is_initialized(self) -> bool:
:exceptions: None.
'''
return True

@override
def __str__(self) -> str:
'''
Returns the file generator as string representation.

:return: The file generator as string representation.
:rtype: <str>
:exceptions: None.
'''
return format_instance_to_string(self)
11 changes: 5 additions & 6 deletions dist_py_module/application/service_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@

from dataclasses import dataclass
from typing import Any
from ats_utilities.exceptions.ats_value_error import ATSValueError
from dist_py_module.domain.ports.itemplate_provider import ITemplateProvider
from dist_py_module.domain.ports.ifile_writer import IFileWriter

__author__: str = 'Vladimir Roncevic'
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
Expand Down Expand Up @@ -59,14 +58,14 @@ def validate(self) -> None:
Validates that essential components are set.

:exceptions:
| ATSValueError: Template provider must be provided.
| ATSValueError: File writer must be provided.
| ValueError: Template provider must be provided.
| ValueError: File writer must be provided.
'''
if self.template_provider is None:
raise ATSValueError('template provider must be provided.')
raise ValueError('template provider must be provided.')

if self.file_writer is None:
raise ATSValueError("file writer must be provided.")
raise ValueError("file writer must be provided.")

def merge(self, other: 'ServiceBundle') -> None:
'''
Expand Down
2 changes: 1 addition & 1 deletion dist_py_module/dist_py_module_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
Expand Down
2 changes: 1 addition & 1 deletion dist_py_module/domain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
2 changes: 1 addition & 1 deletion dist_py_module/domain/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
Expand Down
2 changes: 1 addition & 1 deletion dist_py_module/domain/ports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
14 changes: 1 addition & 13 deletions dist_py_module/domain/ports/ifile_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
Expand All @@ -42,7 +42,6 @@ class IFileGen(ABC):
:methods:
| execute - Executes the file generation.
| is_initialized - Checks if the file generator component is initialized.
| __str__ - Returns the file generator as string representation.
'''

@abstractmethod
Expand Down Expand Up @@ -72,14 +71,3 @@ def is_initialized(self) -> bool:
:exceptions: None.
'''
pass

@abstractmethod
def __str__(self) -> str:
'''
Returns the file generator as string representation.

:return: The file generator as string representation.
:rtype: <str>
:exceptions: None.
'''
pass
2 changes: 1 addition & 1 deletion dist_py_module/domain/ports/ifile_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
Expand Down
2 changes: 1 addition & 1 deletion dist_py_module/domain/ports/itemplate_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
__copyright__: str = '(C) 2026, https://vroncevic.github.io/dist_py_module'
__credits__: list[str] = ['Vladimir Roncevic', 'Python Software Foundation']
__license__: str = 'https://github.com/vroncevic/dist_py_module/blob/dev/LICENSE'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__maintainer__: str = 'Vladimir Roncevic'
__email__: str = 'elektron.ronca@gmail.com'
__status__: str = 'Development'
Expand Down
Loading
Loading