reqstool-python-decorators 0.0.4__tar.gz → 0.0.6__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.6}/.github/workflows/build.yml +2 -2
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/.github/workflows/lint.yml +2 -2
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/.github/workflows/publish_pypi_test.yml +3 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/PKG-INFO +2 -2
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/pyproject.toml +10 -7
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/src/reqstool_python_decorators/processors/decorator_processor.py +5 -2
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/tests/resources/test_decorators/requirements_decorators.py +7 -1
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/tests/unit/reqstool_decorators/processors/test_processors.py +4 -2
- reqstool_python_decorators-0.0.4/.github/dependabot.yml +0 -15
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/.github/workflows/check_release.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/.github/workflows/publish_gh_pages.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/.github/workflows/publish_pypi_prod.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/.gitignore +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/LICENSE +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/README.md +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/docs/antora-playbook.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/docs/antora.yml +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/docs/modules/ROOT/nav.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/docs/modules/ROOT/pages/description.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/docs/modules/ROOT/pages/index.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/docs/modules/ROOT/pages/installation.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/docs/modules/ROOT/pages/licence.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/docs/modules/ROOT/pages/usage.adoc +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/src/reqstool_python_decorators/__init__.py +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/src/reqstool_python_decorators/decorators/decorators.py +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/src/reqstool_python_decorators/processors/__init__.py +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/tests/resources/test_decorators/svc_decorators.py +0 -0
- {reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/tests/unit/conftest.py +0 -0
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/.github/workflows/build.yml
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: Build PyPI
|
|
2
2
|
on:
|
|
3
|
-
workflow_call:
|
|
3
|
+
workflow_call:
|
|
4
4
|
workflow_dispatch:
|
|
5
5
|
push:
|
|
6
6
|
pull_request:
|
|
@@ -29,7 +29,7 @@ jobs:
|
|
|
29
29
|
- name: Install dependencies
|
|
30
30
|
run: pip install hatch
|
|
31
31
|
- name: Run unit and integrations tests
|
|
32
|
-
run: hatch run
|
|
32
|
+
run: hatch run dev:pytest --cov=reqstool-python-decorators --cov-report=xml --cov-report=html
|
|
33
33
|
- name: Build project
|
|
34
34
|
run: hatch build
|
|
35
35
|
# Upload artifacts for later use
|
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/.github/workflows/lint.yml
RENAMED
|
@@ -16,6 +16,6 @@ jobs:
|
|
|
16
16
|
- name: Install pip package(s)
|
|
17
17
|
run: pip install hatch
|
|
18
18
|
- name: Run black formatter check
|
|
19
|
-
run: hatch run
|
|
19
|
+
run: hatch run dev:black --check --verbose src tests
|
|
20
20
|
- name: Run flake8 linter
|
|
21
|
-
run: hatch run
|
|
21
|
+
run: hatch run dev:flake8
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: reqstool-python-decorators
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
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>
|
|
@@ -24,7 +24,7 @@ classifiers = [
|
|
|
24
24
|
"License :: OSI Approved :: MIT License",
|
|
25
25
|
"Programming Language :: Python :: 3",
|
|
26
26
|
"Operating System :: OS Independent",
|
|
27
|
-
"Development Status :: 4 - Beta"
|
|
27
|
+
"Development Status :: 4 - Beta",
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
requires-python = ">=3.10"
|
|
@@ -42,12 +42,15 @@ source = "vcs"
|
|
|
42
42
|
[tool.hatch.version.raw-options]
|
|
43
43
|
local_scheme = "no-local-version"
|
|
44
44
|
|
|
45
|
-
[tool.hatch.envs.
|
|
46
|
-
dependencies = [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
[tool.hatch.envs.dev]
|
|
46
|
+
dependencies = [
|
|
47
|
+
"pytest==8.3.5",
|
|
48
|
+
"pytest-sugar==1.0.0",
|
|
49
|
+
"pytest-cov==6.0.0",
|
|
50
|
+
"black==25.1.0",
|
|
51
|
+
"flake8==7.1.2",
|
|
52
|
+
"flake8-pyproject==1.2.3",
|
|
53
|
+
]
|
|
51
54
|
|
|
52
55
|
[tool.black]
|
|
53
56
|
line-length = 120
|
|
@@ -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):
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
updates:
|
|
8
|
-
- package-ecosystem: "pip" # See documentation for possible values
|
|
9
|
-
directory: "/" # Location of package manifests
|
|
10
|
-
schedule:
|
|
11
|
-
interval: "daily"
|
|
12
|
-
- package-ecosystem: "github-actions"
|
|
13
|
-
directory: "/"
|
|
14
|
-
schedule:
|
|
15
|
-
interval: "daily"
|
|
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.6}/docs/antora-playbook.yml
RENAMED
|
File without changes
|
|
File without changes
|
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/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
|
{reqstool_python_decorators-0.0.4 → reqstool_python_decorators-0.0.6}/tests/unit/conftest.py
RENAMED
|
File without changes
|