reqstool-python-decorators 0.0.3__tar.gz → 0.0.4__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.3 → reqstool_python_decorators-0.0.4}/.github/workflows/publish_gh_pages.yml +1 -1
  2. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/PKG-INFO +12 -13
  3. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/README.md +11 -12
  4. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/docs/modules/ROOT/pages/usage.adoc +3 -3
  5. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/src/reqstool_python_decorators/processors/decorator_processor.py +1 -1
  6. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/.github/dependabot.yml +0 -0
  7. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/.github/workflows/build.yml +0 -0
  8. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/.github/workflows/check_release.yml +0 -0
  9. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/.github/workflows/lint.yml +0 -0
  10. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/.github/workflows/publish_pypi_prod.yml +0 -0
  11. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/.github/workflows/publish_pypi_test.yml +0 -0
  12. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/.gitignore +0 -0
  13. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/LICENSE +0 -0
  14. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/docs/antora-playbook.yml +0 -0
  15. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/docs/antora.yml +0 -0
  16. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/docs/modules/ROOT/nav.adoc +0 -0
  17. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/docs/modules/ROOT/pages/description.adoc +0 -0
  18. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/docs/modules/ROOT/pages/index.adoc +0 -0
  19. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/docs/modules/ROOT/pages/installation.adoc +0 -0
  20. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/docs/modules/ROOT/pages/licence.adoc +0 -0
  21. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/pyproject.toml +0 -0
  22. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/src/reqstool_python_decorators/__init__.py +0 -0
  23. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/src/reqstool_python_decorators/decorators/decorators.py +0 -0
  24. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/src/reqstool_python_decorators/processors/__init__.py +0 -0
  25. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/tests/resources/test_decorators/requirements_decorators.py +0 -0
  26. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/tests/resources/test_decorators/svc_decorators.py +0 -0
  27. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/tests/unit/conftest.py +0 -0
  28. {reqstool_python_decorators-0.0.3 → reqstool_python_decorators-0.0.4}/tests/unit/reqstool_decorators/processors/test_processors.py +0 -0
@@ -25,7 +25,7 @@ jobs:
25
25
  - name: Checkout repository
26
26
  uses: actions/checkout@v4
27
27
  - name: Configure Pages
28
- uses: actions/configure-pages@v4
28
+ uses: actions/configure-pages@v5
29
29
  - name: Install Node.js
30
30
  uses: actions/setup-node@v4
31
31
  with:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: reqstool-python-decorators
3
- Version: 0.0.3
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
- ## Using
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 ProcessDecorator
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
- Here `path_to_python_files` is the directories to search through to find decorated code.
92
+ `path_to_python_files` is the directories to search through to find decorated code.
93
93
 
94
- *Note:*
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
 
@@ -13,15 +13,15 @@ This provides decorators and collecting of decorated code, formatting it and wri
13
13
 
14
14
  ## Installation
15
15
 
16
- The package name is `reqstool-decorators`.
16
+ The package name is `reqstool-python-decorators`.
17
17
 
18
18
  * Using pip install:
19
19
 
20
20
  ```
21
- $pip install reqstool-decorators
21
+ $pip install reqstool-python-decorators
22
22
  ```
23
23
 
24
- ## Using
24
+ ## Usage
25
25
 
26
26
  ### pyproject.toml
27
27
 
@@ -29,7 +29,7 @@ $pip install reqstool-decorators
29
29
 
30
30
  ```
31
31
  dependencies = [
32
- "reqstool-decorators == <version>"
32
+ "reqstool-python-decorators == <version>"
33
33
  ]
34
34
  ```
35
35
 
@@ -37,7 +37,7 @@ dependencies = [
37
37
 
38
38
  ```
39
39
  [tool.poetry.dependencies]
40
- reqstool-decorators = "<version>"
40
+ reqstool-python-decorators = "<version>"
41
41
  ```
42
42
 
43
43
  ### Decorators
@@ -51,12 +51,12 @@ from reqstool-decorators.decorators.decorators import Requirements, SVCs
51
51
  Example usage of the decorators:
52
52
 
53
53
  ```
54
- @Requirements(REQ_111, REQ_222)
54
+ @Requirements("REQ_111", "REQ_222")
55
55
  def somefunction():
56
56
  ```
57
57
 
58
58
  ```
59
- @SVCs(SVC_111, SVC_222)
59
+ @SVCs("SVC_111", "SVC_222")
60
60
  def test_somefunction():
61
61
  ```
62
62
 
@@ -65,20 +65,19 @@ def test_somefunction():
65
65
  Import processor:
66
66
 
67
67
  ```
68
- from reqstool.processors.decorator_processor import ProcessDecorator
68
+ from reqstool.processors.decorator_processor import DecoratorProcessor
69
69
  ```
70
70
 
71
71
  Main function to collect decorators data and generate yaml file:
72
72
 
73
73
  ```
74
- process_decorated_data(path_to_python_files)
74
+ process_decorated_data(path_to_python_files, output_file)
75
75
  ```
76
76
 
77
- Here `path_to_python_files` is the directories to search through to find decorated code.
77
+ `path_to_python_files` is the directories to search through to find decorated code.
78
78
 
79
- *Note:*
79
+ (Optional) `output_file` is output file(path) the yaml file is stored to. Default is `/build/reqstool/annotations.yml`.
80
80
 
81
- Yaml file is saved into the `/dist` folder, make sure the folder exists before running the `process_decorated_data` function.
82
81
 
83
82
  ## License
84
83
 
@@ -28,12 +28,12 @@ from reqstool_python_decorators.decorators.decorators import Requirements, SVCs
28
28
  Example usage of the decorators:
29
29
 
30
30
  ```python
31
- @Requirements(REQ_111, REQ_222)
31
+ @Requirements("REQ_111", "REQ_222")
32
32
  def somefunction():
33
33
  ```
34
34
 
35
35
  ```python
36
- @SVCs(SVC_111, SVC_222)
36
+ @SVCs("SVC_111", "SVC_222")
37
37
  def test_somefunction():
38
38
  ```
39
39
 
@@ -53,5 +53,5 @@ process_decorated_data(path_to_python_files, output_file)
53
53
 
54
54
  `path_to_python_files` is the directories to search through to find decorated code.
55
55
 
56
- `output_file` is output file(path) the yaml file is stored to
56
+ (Optional) `output_file` is output file(path) the yaml file is stored to. Default is `/build/reqstool/annotations.yml`.
57
57
 
@@ -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,