reqstool-python-decorators 0.0.4__tar.gz → 0.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/PKG-INFO +1 -1
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/src/reqstool_python_decorators/processors/decorator_processor.py +5 -2
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/tests/resources/test_decorators/requirements_decorators.py +7 -1
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/tests/unit/reqstool_decorators/processors/test_processors.py +4 -2
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/dependabot.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/build.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/check_release.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/lint.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/publish_gh_pages.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/publish_pypi_prod.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/publish_pypi_test.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.gitignore +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/LICENSE +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/README.md +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/antora-playbook.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/antora.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/nav.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/description.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/index.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/installation.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/licence.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/usage.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/pyproject.toml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/src/reqstool_python_decorators/__init__.py +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/src/reqstool_python_decorators/decorators/decorators.py +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/src/reqstool_python_decorators/processors/__init__.py +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/tests/resources/test_decorators/svc_decorators.py +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/tests/unit/conftest.py +0 -0
|
@@ -9,6 +9,7 @@ import ast
|
|
|
9
9
|
@unique
|
|
10
10
|
class DECORATOR_TYPES(Enum):
|
|
11
11
|
FUNCTION = ("FUNCTION", "METHOD")
|
|
12
|
+
ASYNCFUNCTION = ("ASYNCFUNCTION", "METHOD")
|
|
12
13
|
|
|
13
14
|
def __init__(self, from_value, to_value):
|
|
14
15
|
self.from_value = from_value
|
|
@@ -173,7 +174,7 @@ class DecoratorProcessor:
|
|
|
173
174
|
|
|
174
175
|
return formatted_data
|
|
175
176
|
|
|
176
|
-
def create_dir_from_path(self, filepath: str):
|
|
177
|
+
def create_dir_from_path(self, filepath: str) -> None:
|
|
177
178
|
"""
|
|
178
179
|
Creates directory of provided filepath if it does not exists
|
|
179
180
|
|
|
@@ -184,7 +185,9 @@ class DecoratorProcessor:
|
|
|
184
185
|
if not os.path.exists(directory):
|
|
185
186
|
os.makedirs(directory)
|
|
186
187
|
|
|
187
|
-
def process_decorated_data(
|
|
188
|
+
def process_decorated_data(
|
|
189
|
+
self, path_to_python_files: str, output_file: str = "build/reqstool/annotations.yml"
|
|
190
|
+
) -> None:
|
|
188
191
|
"""
|
|
189
192
|
"Main" function, runs all functions resulting in a yaml file containing decorated data.
|
|
190
193
|
|
|
@@ -7,6 +7,12 @@ class RequirementsClass:
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
@Requirements("REQ_333")
|
|
10
|
-
def requirements_function():
|
|
10
|
+
def requirements_function() -> None:
|
|
11
11
|
# Test function for Requirements decorator
|
|
12
12
|
pass
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@Requirements("REQ_444")
|
|
16
|
+
async def asyncrequirements_function() -> None:
|
|
17
|
+
# Test async function for Requirements decorator
|
|
18
|
+
pass
|
|
@@ -25,8 +25,10 @@ def test_get_functions_and_classes(process_decorator_instance: DecoratorProcesso
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def test_map_type_known_type(process_decorator_instance: DecoratorProcessor):
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
map_funcion = process_decorator_instance.map_type("FUNCTION")
|
|
29
|
+
map_asyncfunction = process_decorator_instance.map_type("ASYNCFUNCTION")
|
|
30
|
+
assert map_funcion == "METHOD"
|
|
31
|
+
assert map_asyncfunction == "METHOD"
|
|
30
32
|
|
|
31
33
|
|
|
32
34
|
def test_map_type_unknown_type(process_decorator_instance: DecoratorProcessor):
|
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/dependabot.yml
RENAMED
|
File without changes
|
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/build.yml
RENAMED
|
File without changes
|
|
File without changes
|
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/lint.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/antora-playbook.yml
RENAMED
|
File without changes
|
|
File without changes
|
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/nav.adoc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/tests/unit/conftest.py
RENAMED
|
File without changes
|