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.
Files changed (28) hide show
  1. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/PKG-INFO +1 -1
  2. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/src/reqstool_python_decorators/processors/decorator_processor.py +5 -2
  3. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/tests/resources/test_decorators/requirements_decorators.py +7 -1
  4. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/tests/unit/reqstool_decorators/processors/test_processors.py +4 -2
  5. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/dependabot.yml +0 -0
  6. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/build.yml +0 -0
  7. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/check_release.yml +0 -0
  8. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/lint.yml +0 -0
  9. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/publish_gh_pages.yml +0 -0
  10. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/publish_pypi_prod.yml +0 -0
  11. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.github/workflows/publish_pypi_test.yml +0 -0
  12. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/.gitignore +0 -0
  13. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/LICENSE +0 -0
  14. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/README.md +0 -0
  15. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/antora-playbook.yml +0 -0
  16. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/antora.yml +0 -0
  17. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/nav.adoc +0 -0
  18. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/description.adoc +0 -0
  19. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/index.adoc +0 -0
  20. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/installation.adoc +0 -0
  21. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/licence.adoc +0 -0
  22. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/docs/modules/ROOT/pages/usage.adoc +0 -0
  23. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/pyproject.toml +0 -0
  24. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/src/reqstool_python_decorators/__init__.py +0 -0
  25. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/src/reqstool_python_decorators/decorators/decorators.py +0 -0
  26. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/src/reqstool_python_decorators/processors/__init__.py +0 -0
  27. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/tests/resources/test_decorators/svc_decorators.py +0 -0
  28. {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.5}/tests/unit/conftest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: reqstool-python-decorators
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Reqstool Python Decorators
5
5
  Project-URL: Source, https://github.com/Luftfartsverket/reqstool-python-decorators.git
6
6
  Author-email: LFV SYSDEV <sysdev@lfv.com>
@@ -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(self, path_to_python_files, output_file="build/reqstool/annotations.yml"):
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
- result = process_decorator_instance.map_type("FUNCTION")
29
- assert result == "METHOD"
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):