reqstool-python-decorators 0.0.2__py3-none-any.whl → 0.0.4__py3-none-any.whl
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/processors/decorator_processor.py +2 -2
- {reqstool_python_decorators-0.0.2.dist-info → reqstool_python_decorators-0.0.4.dist-info}/METADATA +12 -13
- {reqstool_python_decorators-0.0.2.dist-info → reqstool_python_decorators-0.0.4.dist-info}/RECORD +5 -5
- {reqstool_python_decorators-0.0.2.dist-info → reqstool_python_decorators-0.0.4.dist-info}/WHEEL +0 -0
- {reqstool_python_decorators-0.0.2.dist-info → reqstool_python_decorators-0.0.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -98,7 +98,7 @@ class DecoratorProcessor:
|
|
|
98
98
|
if any(decorator_info["name"] in decorator_names for decorator_info in decorators_info):
|
|
99
99
|
self.req_svc_results.append(
|
|
100
100
|
{
|
|
101
|
-
"fullyQualifiedName": file_path,
|
|
101
|
+
"fullyQualifiedName": str(file_path).replace("/", "."),
|
|
102
102
|
"elementKind": str(type(node)).split(".")[-1][:-5].upper(),
|
|
103
103
|
"name": node.name,
|
|
104
104
|
"decorators": decorators_info,
|
|
@@ -184,7 +184,7 @@ class DecoratorProcessor:
|
|
|
184
184
|
if not os.path.exists(directory):
|
|
185
185
|
os.makedirs(directory)
|
|
186
186
|
|
|
187
|
-
def process_decorated_data(self, path_to_python_files, output_file="build/annotations.yml"):
|
|
187
|
+
def process_decorated_data(self, path_to_python_files, output_file="build/reqstool/annotations.yml"):
|
|
188
188
|
"""
|
|
189
189
|
"Main" function, runs all functions resulting in a yaml file containing decorated data.
|
|
190
190
|
|
{reqstool_python_decorators-0.0.2.dist-info → reqstool_python_decorators-0.0.4.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: reqstool-python-decorators
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
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>
|
|
@@ -28,15 +28,15 @@ This provides decorators and collecting of decorated code, formatting it and wri
|
|
|
28
28
|
|
|
29
29
|
## Installation
|
|
30
30
|
|
|
31
|
-
The package name is `reqstool-decorators`.
|
|
31
|
+
The package name is `reqstool-python-decorators`.
|
|
32
32
|
|
|
33
33
|
* Using pip install:
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
$pip install reqstool-decorators
|
|
36
|
+
$pip install reqstool-python-decorators
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Usage
|
|
40
40
|
|
|
41
41
|
### pyproject.toml
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ $pip install reqstool-decorators
|
|
|
44
44
|
|
|
45
45
|
```
|
|
46
46
|
dependencies = [
|
|
47
|
-
"reqstool-decorators == <version>"
|
|
47
|
+
"reqstool-python-decorators == <version>"
|
|
48
48
|
]
|
|
49
49
|
```
|
|
50
50
|
|
|
@@ -52,7 +52,7 @@ dependencies = [
|
|
|
52
52
|
|
|
53
53
|
```
|
|
54
54
|
[tool.poetry.dependencies]
|
|
55
|
-
reqstool-decorators = "<version>"
|
|
55
|
+
reqstool-python-decorators = "<version>"
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Decorators
|
|
@@ -66,12 +66,12 @@ from reqstool-decorators.decorators.decorators import Requirements, SVCs
|
|
|
66
66
|
Example usage of the decorators:
|
|
67
67
|
|
|
68
68
|
```
|
|
69
|
-
@Requirements(REQ_111, REQ_222)
|
|
69
|
+
@Requirements("REQ_111", "REQ_222")
|
|
70
70
|
def somefunction():
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
```
|
|
74
|
-
@SVCs(SVC_111, SVC_222)
|
|
74
|
+
@SVCs("SVC_111", "SVC_222")
|
|
75
75
|
def test_somefunction():
|
|
76
76
|
```
|
|
77
77
|
|
|
@@ -80,20 +80,19 @@ def test_somefunction():
|
|
|
80
80
|
Import processor:
|
|
81
81
|
|
|
82
82
|
```
|
|
83
|
-
from reqstool.processors.decorator_processor import
|
|
83
|
+
from reqstool.processors.decorator_processor import DecoratorProcessor
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
Main function to collect decorators data and generate yaml file:
|
|
87
87
|
|
|
88
88
|
```
|
|
89
|
-
process_decorated_data(path_to_python_files)
|
|
89
|
+
process_decorated_data(path_to_python_files, output_file)
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
`path_to_python_files` is the directories to search through to find decorated code.
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
(Optional) `output_file` is output file(path) the yaml file is stored to. Default is `/build/reqstool/annotations.yml`.
|
|
95
95
|
|
|
96
|
-
Yaml file is saved into the `/dist` folder, make sure the folder exists before running the `process_decorated_data` function.
|
|
97
96
|
|
|
98
97
|
## License
|
|
99
98
|
|
{reqstool_python_decorators-0.0.2.dist-info → reqstool_python_decorators-0.0.4.dist-info}/RECORD
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
reqstool_python_decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
reqstool_python_decorators/decorators/decorators.py,sha256=7TnBcVour2VSH76rM4FtwmCDi9JY9gxqOvAL6o1kI_g,282
|
|
3
3
|
reqstool_python_decorators/processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
reqstool_python_decorators/processors/decorator_processor.py,sha256=
|
|
5
|
-
reqstool_python_decorators-0.0.
|
|
6
|
-
reqstool_python_decorators-0.0.
|
|
7
|
-
reqstool_python_decorators-0.0.
|
|
8
|
-
reqstool_python_decorators-0.0.
|
|
4
|
+
reqstool_python_decorators/processors/decorator_processor.py,sha256=NPtjJZA9HYcgSC90lPCFNWI_rfqv9ey2VUHP7OWDnyo,8446
|
|
5
|
+
reqstool_python_decorators-0.0.4.dist-info/METADATA,sha256=6kT_pJaabWOKuvh5m8x-MWwJDAq7IvHAkneEADpPzrk,2906
|
|
6
|
+
reqstool_python_decorators-0.0.4.dist-info/WHEEL,sha256=uNdcs2TADwSd5pVaP0Z_kcjcvvTUklh2S7bxZMF8Uj0,87
|
|
7
|
+
reqstool_python_decorators-0.0.4.dist-info/licenses/LICENSE,sha256=FVfPRmqjYUYTodYsh2C7Y70MWH64m0aWgTeIbqPj-P0,1060
|
|
8
|
+
reqstool_python_decorators-0.0.4.dist-info/RECORD,,
|
{reqstool_python_decorators-0.0.2.dist-info → reqstool_python_decorators-0.0.4.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|