reqstool-python-decorators 0.0.9__tar.gz → 0.1.0__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 (45) hide show
  1. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/.github/workflows/build.yml +6 -4
  2. reqstool_python_decorators-0.1.0/.github/workflows/check-semantic-pr.yml +10 -0
  3. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/.github/workflows/lint.yml +1 -1
  4. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/.github/workflows/publish_pypi_prod.yml +2 -2
  5. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/.github/workflows/publish_pypi_test.yml +2 -2
  6. reqstool_python_decorators-0.1.0/.gitignore +286 -0
  7. reqstool_python_decorators-0.1.0/.python-version +1 -0
  8. reqstool_python_decorators-0.1.0/CONTRIBUTING.md +25 -0
  9. reqstool_python_decorators-0.1.0/PKG-INFO +73 -0
  10. reqstool_python_decorators-0.1.0/README.md +56 -0
  11. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/docs/antora-playbook.yml +2 -1
  12. reqstool_python_decorators-0.1.0/docs/modules/ROOT/nav.adoc +3 -0
  13. reqstool_python_decorators-0.1.0/docs/modules/ROOT/pages/index.adoc +12 -0
  14. reqstool_python_decorators-0.1.0/docs/modules/ROOT/pages/installation.adoc +8 -0
  15. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/docs/modules/ROOT/pages/usage.adoc +21 -15
  16. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/pyproject.toml +20 -17
  17. reqstool_python_decorators-0.1.0/renovate.json5 +4 -0
  18. reqstool_python_decorators-0.1.0/src/reqstool_python_decorators/decorators/__init__.py +1 -0
  19. reqstool_python_decorators-0.1.0/src/reqstool_python_decorators/decorators/decorators.py +19 -0
  20. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/src/reqstool_python_decorators/processors/decorator_processor.py +57 -26
  21. reqstool_python_decorators-0.1.0/tests/e2e/__init__.py +0 -0
  22. reqstool_python_decorators-0.1.0/tests/e2e/reqstool_decorators/__init__.py +0 -0
  23. reqstool_python_decorators-0.1.0/tests/integration/__init__.py +0 -0
  24. reqstool_python_decorators-0.1.0/tests/integration/reqstool_decorators/__init__.py +0 -0
  25. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/tests/resources/test_decorators/requirements_decorators.py +1 -1
  26. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/tests/resources/test_decorators/svc_decorators.py +1 -1
  27. reqstool_python_decorators-0.1.0/tests/unit/reqstool_decorators/processors/test_processors.py +303 -0
  28. reqstool_python_decorators-0.1.0/tests/unit/reqstool_decorators/test_decorators.py +59 -0
  29. reqstool_python_decorators-0.0.9/.github/workflows/publish_gh_pages.yml +0 -47
  30. reqstool_python_decorators-0.0.9/.gitignore +0 -183
  31. reqstool_python_decorators-0.0.9/PKG-INFO +0 -99
  32. reqstool_python_decorators-0.0.9/README.md +0 -84
  33. reqstool_python_decorators-0.0.9/docs/modules/ROOT/nav.adoc +0 -2
  34. reqstool_python_decorators-0.0.9/docs/modules/ROOT/pages/description.adoc +0 -3
  35. reqstool_python_decorators-0.0.9/docs/modules/ROOT/pages/index.adoc +0 -7
  36. reqstool_python_decorators-0.0.9/docs/modules/ROOT/pages/installation.adoc +0 -9
  37. reqstool_python_decorators-0.0.9/docs/modules/ROOT/pages/licence.adoc +0 -3
  38. reqstool_python_decorators-0.0.9/src/reqstool_python_decorators/decorators/decorators.py +0 -17
  39. reqstool_python_decorators-0.0.9/tests/unit/reqstool_decorators/processors/test_processors.py +0 -65
  40. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/.github/workflows/check_release.yml +0 -0
  41. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/LICENSE +0 -0
  42. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/docs/antora.yml +0 -0
  43. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/src/reqstool_python_decorators/__init__.py +0 -0
  44. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/src/reqstool_python_decorators/processors/__init__.py +0 -0
  45. {reqstool_python_decorators-0.0.9 → reqstool_python_decorators-0.1.0}/tests/unit/conftest.py +0 -0
@@ -3,6 +3,8 @@ on:
3
3
  workflow_call:
4
4
  workflow_dispatch:
5
5
  push:
6
+ branches:
7
+ - main
6
8
  pull_request:
7
9
  types:
8
10
  - opened
@@ -25,16 +27,16 @@ jobs:
25
27
  - name: Set up Python
26
28
  uses: actions/setup-python@v6
27
29
  with:
28
- python-version: "3.14"
30
+ python-version: "3.13"
29
31
  - name: Install dependencies
30
32
  run: pip install hatch
31
- - name: Run unit and integrations tests
32
- run: hatch run dev:pytest --cov=reqstool-python-decorators --cov-report=xml --cov-report=html
33
+ - name: Run tests
34
+ run: hatch run dev:pytest --junitxml=build/junit.xml --cov=reqstool_python_decorators --cov-report=xml:build/coverage.xml
33
35
  - name: Build project
34
36
  run: hatch build
35
37
  # Upload artifacts for later use
36
38
  - name: Upload Artifacts
37
- uses: actions/upload-artifact@v6
39
+ uses: actions/upload-artifact@v7
38
40
  with:
39
41
  name: dist
40
42
  path: dist/
@@ -0,0 +1,10 @@
1
+ name: Check Semantic PR
2
+ on:
3
+ pull_request:
4
+ types: [opened, edited, synchronize, reopened]
5
+ pull_request_target:
6
+ types: [opened, edited, synchronize, reopened]
7
+
8
+ jobs:
9
+ check:
10
+ uses: reqstool/.github/.github/workflows/check-semantic-pr.yml@main
@@ -12,7 +12,7 @@ jobs:
12
12
  - name: Set up Python
13
13
  uses: actions/setup-python@v6
14
14
  with:
15
- python-version: "3.14"
15
+ python-version: "3.13"
16
16
  - name: Install pip package(s)
17
17
  run: pip install hatch
18
18
  - name: Run black formatter check
@@ -26,12 +26,12 @@ jobs:
26
26
  steps:
27
27
  # Download artifacts from the build job
28
28
  - name: Download Artifacts
29
- uses: actions/download-artifact@v7
29
+ uses: actions/download-artifact@v8
30
30
  with:
31
31
  name: dist
32
32
  path: dist
33
33
  - name: Publish distribution 📦 to PyPI
34
34
  # if: startsWith(github.ref, 'refs/tags')
35
- uses: pypa/gh-action-pypi-publish@release/v1
35
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
36
36
  with:
37
37
  sign-artifacts: true
@@ -23,12 +23,12 @@ jobs:
23
23
  steps:
24
24
  # Download artifacts from the build job
25
25
  - name: Download Artifacts
26
- uses: actions/download-artifact@v7
26
+ uses: actions/download-artifact@v8
27
27
  with:
28
28
  name: dist
29
29
  path: dist
30
30
  - name: Publish distribution 📦 to Test PyPI
31
- uses: pypa/gh-action-pypi-publish@release/v1
31
+ uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
32
32
  with:
33
33
  repository-url: https://test.pypi.org/legacy/
34
34
  sign-artifacts: true
@@ -0,0 +1,286 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/python,intellij+all,visualstudiocode
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python,intellij+all,visualstudiocode
3
+
4
+ ### Intellij+all ###
5
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
6
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7
+
8
+ # User-specific stuff
9
+ .idea/**/workspace.xml
10
+ .idea/**/tasks.xml
11
+ .idea/**/usage.statistics.xml
12
+ .idea/**/dictionaries
13
+ .idea/**/shelf
14
+
15
+ # AWS User-specific
16
+ .idea/**/aws.xml
17
+
18
+ # Generated files
19
+ .idea/**/contentModel.xml
20
+
21
+ # Sensitive or high-churn files
22
+ .idea/**/dataSources/
23
+ .idea/**/dataSources.ids
24
+ .idea/**/dataSources.local.xml
25
+ .idea/**/sqlDataSources.xml
26
+ .idea/**/dynamic.xml
27
+ .idea/**/uiDesigner.xml
28
+ .idea/**/dbnavigator.xml
29
+
30
+ # Gradle
31
+ .idea/**/gradle.xml
32
+ .idea/**/libraries
33
+
34
+ # Gradle and Maven with auto-import
35
+ # When using Gradle or Maven with auto-import, you should exclude module files,
36
+ # since they will be recreated, and may cause churn. Uncomment if using
37
+ # auto-import.
38
+ # .idea/artifacts
39
+ # .idea/compiler.xml
40
+ # .idea/jarRepositories.xml
41
+ # .idea/modules.xml
42
+ # .idea/*.iml
43
+ # .idea/modules
44
+ # *.iml
45
+ # *.ipr
46
+
47
+ # CMake
48
+ cmake-build-*/
49
+
50
+ # Mongo Explorer plugin
51
+ .idea/**/mongoSettings.xml
52
+
53
+ # File-based project format
54
+ *.iws
55
+
56
+ # IntelliJ
57
+ out/
58
+
59
+ # mpeltonen/sbt-idea plugin
60
+ .idea_modules/
61
+
62
+ # JIRA plugin
63
+ atlassian-ide-plugin.xml
64
+
65
+ # Cursive Clojure plugin
66
+ .idea/replstate.xml
67
+
68
+ # SonarLint plugin
69
+ .idea/sonarlint/
70
+
71
+ # Crashlytics plugin (for Android Studio and IntelliJ)
72
+ com_crashlytics_export_strings.xml
73
+ crashlytics.properties
74
+ crashlytics-build.properties
75
+ fabric.properties
76
+
77
+ # Editor-based Rest Client
78
+ .idea/httpRequests
79
+
80
+ # Android studio 3.1+ serialized cache file
81
+ .idea/caches/build_file_checksums.ser
82
+
83
+ ### Intellij+all Patch ###
84
+ # Ignore everything but code style settings and run configurations
85
+ # that are supposed to be shared within teams.
86
+
87
+ .idea/*
88
+
89
+ !.idea/codeStyles
90
+ !.idea/runConfigurations
91
+
92
+ ### Python ###
93
+ # Byte-compiled / optimized / DLL files
94
+ __pycache__/
95
+ *.py[cod]
96
+ *$py.class
97
+
98
+ # C extensions
99
+ *.so
100
+
101
+ # Distribution / packaging
102
+ .Python
103
+ build/
104
+ develop-eggs/
105
+ dist/
106
+ downloads/
107
+ eggs/
108
+ .eggs/
109
+ lib/
110
+ lib64/
111
+ parts/
112
+ sdist/
113
+ var/
114
+ wheels/
115
+ share/python-wheels/
116
+ *.egg-info/
117
+ .installed.cfg
118
+ *.egg
119
+ MANIFEST
120
+
121
+ # PyInstaller
122
+ # Usually these files are written by a python script from a template
123
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
124
+ *.manifest
125
+ *.spec
126
+
127
+ # Installer logs
128
+ pip-log.txt
129
+ pip-delete-this-directory.txt
130
+
131
+ # Unit test / coverage reports
132
+ htmlcov/
133
+ .tox/
134
+ .nox/
135
+ .coverage
136
+ .coverage.*
137
+ .cache
138
+ nosetests.xml
139
+ coverage.xml
140
+ *.cover
141
+ *.py,cover
142
+ .hypothesis/
143
+ .pytest_cache/
144
+ cover/
145
+
146
+ # Translations
147
+ *.mo
148
+ *.pot
149
+
150
+ # Django stuff:
151
+ *.log
152
+ local_settings.py
153
+ db.sqlite3
154
+ db.sqlite3-journal
155
+
156
+ # Flask stuff:
157
+ instance/
158
+ .webassets-cache
159
+
160
+ # Scrapy stuff:
161
+ .scrapy
162
+
163
+ # Sphinx documentation
164
+ docs/_build/
165
+
166
+ # PyBuilder
167
+ .pybuilder/
168
+ target/
169
+
170
+ # Jupyter Notebook
171
+ .ipynb_checkpoints
172
+
173
+ # IPython
174
+ profile_default/
175
+ ipython_config.py
176
+
177
+ # pyenv
178
+ # For a library or package, you might want to ignore these files since the code is
179
+ # intended to run in multiple environments; otherwise, check them in:
180
+ # .python-version
181
+
182
+ # pipenv
183
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
184
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
185
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
186
+ # install all needed dependencies.
187
+ #Pipfile.lock
188
+
189
+ # poetry
190
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
191
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
192
+ # commonly ignored for libraries.
193
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
194
+ #poetry.lock
195
+
196
+ # pdm
197
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
198
+ #pdm.lock
199
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
200
+ # in version control.
201
+ # https://pdm.fming.dev/#use-with-ide
202
+ .pdm.toml
203
+
204
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
205
+ __pypackages__/
206
+
207
+ # Celery stuff
208
+ celerybeat-schedule
209
+ celerybeat.pid
210
+
211
+ # SageMath parsed files
212
+ *.sage.py
213
+
214
+ # Environments
215
+ .env
216
+ .venv
217
+ env/
218
+ venv/
219
+ ENV/
220
+ env.bak/
221
+ venv.bak/
222
+
223
+ # Spyder project settings
224
+ .spyderproject
225
+ .spyproject
226
+
227
+ # Rope project settings
228
+ .ropeproject
229
+
230
+ # mkdocs documentation
231
+ /site
232
+
233
+ # mypy
234
+ .mypy_cache/
235
+ .dmypy.json
236
+ dmypy.json
237
+
238
+ # Pyre type checker
239
+ .pyre/
240
+
241
+ # pytype static type analyzer
242
+ .pytype/
243
+
244
+ # Cython debug symbols
245
+ cython_debug/
246
+
247
+ # PyCharm
248
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
249
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
250
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
251
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
252
+ #.idea/
253
+
254
+ ### Python Patch ###
255
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
256
+ poetry.toml
257
+
258
+ # ruff
259
+ .ruff_cache/
260
+
261
+ # LSP config files
262
+ pyrightconfig.json
263
+
264
+ ### VisualStudioCode ###
265
+ .vscode/*
266
+ !.vscode/settings.json
267
+ !.vscode/tasks.json
268
+ !.vscode/launch.json
269
+ !.vscode/extensions.json
270
+ !.vscode/*.code-snippets
271
+
272
+ # Local History for Visual Studio Code
273
+ .history/
274
+
275
+ # Built Visual Studio Code Extensions
276
+ *.vsix
277
+
278
+ ### VisualStudioCode Patch ###
279
+ # Ignore all local history of files
280
+ .history
281
+ .ionide
282
+
283
+ # End of https://www.toptal.com/developers/gitignore/api/python,intellij+all,visualstudiocode
284
+
285
+ # Claude Code
286
+ .claude/
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,25 @@
1
+ # Contributing to reqstool-python-decorators
2
+
3
+ Thank you for your interest in contributing!
4
+
5
+ For DCO sign-off, commit conventions, and code review process, see the organization-wide [CONTRIBUTING.md](https://github.com/reqstool/.github/blob/main/CONTRIBUTING.md).
6
+
7
+ ## Prerequisites
8
+
9
+ - Python 3.13+
10
+ - [Hatch](https://hatch.pypa.io/) (`pip install hatch`)
11
+
12
+ ## Setup
13
+
14
+ ```bash
15
+ git clone https://github.com/reqstool/reqstool-python-decorators.git
16
+ cd reqstool-python-decorators
17
+ hatch env create
18
+ ```
19
+
20
+ ## Build & Test
21
+
22
+ ```bash
23
+ hatch build
24
+ hatch run test
25
+ ```
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: reqstool-python-decorators
3
+ Version: 0.1.0
4
+ Summary: Reqstool Python Decorators
5
+ Project-URL: Homepage, https://reqstool.github.io
6
+ Project-URL: Source, https://github.com/reqstool/reqstool-python-decorators.git
7
+ Project-URL: Documentation, https://github.com/reqstool/reqstool-python-decorators.git
8
+ Author: reqstool
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.13
15
+ Requires-Dist: ruamel-yaml==0.19.1
16
+ Description-Content-Type: text/markdown
17
+
18
+ [![Commit Activity](https://img.shields.io/github/commit-activity/m/reqstool/reqstool-python-decorators?label=commits&style=for-the-badge)](https://github.com/reqstool/reqstool-python-decorators/pulse)
19
+ [![GitHub Issues](https://img.shields.io/github/issues/reqstool/reqstool-python-decorators?style=for-the-badge&logo=github)](https://github.com/reqstool/reqstool-python-decorators/issues)
20
+ [![License](https://img.shields.io/github/license/reqstool/reqstool-python-decorators?style=for-the-badge&logo=opensourceinitiative)](https://opensource.org/license/mit/)
21
+ [![Build](https://img.shields.io/github/actions/workflow/status/reqstool/reqstool-python-decorators/build.yml?style=for-the-badge&logo=github)](https://github.com/reqstool/reqstool-python-decorators/actions/workflows/build.yml)
22
+ [![Documentation](https://img.shields.io/badge/Documentation-blue?style=for-the-badge&link=docs)](https://reqstool.github.io)
23
+
24
+ # Reqstool Python Decorators
25
+
26
+ Python decorators for [reqstool](https://github.com/reqstool/reqstool-client) requirements traceability. Provides `@Requirements` and `@SVCs` decorators for linking Python code to requirements and software verification cases.
27
+
28
+ ## Prerequisites
29
+
30
+ - Python >= 3.13
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ pip install reqstool-python-decorators
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ```python
41
+ from reqstool_python_decorators.decorators.decorators import Requirements, SVCs
42
+
43
+ @Requirements("REQ_111", "REQ_222")
44
+ def somefunction():
45
+ pass
46
+
47
+ @SVCs("SVC_111", "SVC_222")
48
+ def test_somefunction():
49
+ pass
50
+ ```
51
+
52
+ ### Processor
53
+
54
+ ```python
55
+ from reqstool_python_decorators.processors.decorator_processor import DecoratorProcessor
56
+
57
+ # Collect decorators and generate annotations.yml
58
+ process_decorated_data(path_to_python_files, output_file)
59
+ ```
60
+
61
+ Used together with the [Hatch Plugin](https://github.com/reqstool/reqstool-python-hatch-plugin) or [Poetry Plugin](https://github.com/reqstool/reqstool-python-poetry-plugin).
62
+
63
+ ## Documentation
64
+
65
+ Full documentation can be found [here](https://reqstool.github.io).
66
+
67
+ ## Contributing
68
+
69
+ See the organization-wide [CONTRIBUTING.md](https://github.com/reqstool/.github/blob/main/CONTRIBUTING.md).
70
+
71
+ ## License
72
+
73
+ MIT License.
@@ -0,0 +1,56 @@
1
+ [![Commit Activity](https://img.shields.io/github/commit-activity/m/reqstool/reqstool-python-decorators?label=commits&style=for-the-badge)](https://github.com/reqstool/reqstool-python-decorators/pulse)
2
+ [![GitHub Issues](https://img.shields.io/github/issues/reqstool/reqstool-python-decorators?style=for-the-badge&logo=github)](https://github.com/reqstool/reqstool-python-decorators/issues)
3
+ [![License](https://img.shields.io/github/license/reqstool/reqstool-python-decorators?style=for-the-badge&logo=opensourceinitiative)](https://opensource.org/license/mit/)
4
+ [![Build](https://img.shields.io/github/actions/workflow/status/reqstool/reqstool-python-decorators/build.yml?style=for-the-badge&logo=github)](https://github.com/reqstool/reqstool-python-decorators/actions/workflows/build.yml)
5
+ [![Documentation](https://img.shields.io/badge/Documentation-blue?style=for-the-badge&link=docs)](https://reqstool.github.io)
6
+
7
+ # Reqstool Python Decorators
8
+
9
+ Python decorators for [reqstool](https://github.com/reqstool/reqstool-client) requirements traceability. Provides `@Requirements` and `@SVCs` decorators for linking Python code to requirements and software verification cases.
10
+
11
+ ## Prerequisites
12
+
13
+ - Python >= 3.13
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pip install reqstool-python-decorators
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```python
24
+ from reqstool_python_decorators.decorators.decorators import Requirements, SVCs
25
+
26
+ @Requirements("REQ_111", "REQ_222")
27
+ def somefunction():
28
+ pass
29
+
30
+ @SVCs("SVC_111", "SVC_222")
31
+ def test_somefunction():
32
+ pass
33
+ ```
34
+
35
+ ### Processor
36
+
37
+ ```python
38
+ from reqstool_python_decorators.processors.decorator_processor import DecoratorProcessor
39
+
40
+ # Collect decorators and generate annotations.yml
41
+ process_decorated_data(path_to_python_files, output_file)
42
+ ```
43
+
44
+ Used together with the [Hatch Plugin](https://github.com/reqstool/reqstool-python-hatch-plugin) or [Poetry Plugin](https://github.com/reqstool/reqstool-python-poetry-plugin).
45
+
46
+ ## Documentation
47
+
48
+ Full documentation can be found [here](https://reqstool.github.io).
49
+
50
+ ## Contributing
51
+
52
+ See the organization-wide [CONTRIBUTING.md](https://github.com/reqstool/.github/blob/main/CONTRIBUTING.md).
53
+
54
+ ## License
55
+
56
+ MIT License.
@@ -1,8 +1,9 @@
1
1
  # yaml-language-server: $schema=https://raw.githubusercontent.com/asciidoctor/asciidoctor-intellij-plugin/main/src/main/resources/jsonSchemas/antoraPlaybookSchema.json
2
+ # For local development only. Published site: https://reqstool.github.io
2
3
 
3
4
  site:
4
5
  title: Reqstool Python Decorators Documentation
5
- url: https://github.com/Luftfartsverket/reqstool-python-decorators.git
6
+ url: https://github.com/reqstool/reqstool-python-decorators.git
6
7
  start_page: reqstool-python-decorators::index.adoc
7
8
 
8
9
  content:
@@ -0,0 +1,3 @@
1
+ * xref:index.adoc[Overview]
2
+ * xref:installation.adoc[Installation]
3
+ * xref:usage.adoc[Usage]
@@ -0,0 +1,12 @@
1
+ = reqstool Python Decorators
2
+
3
+ This provides decorators and collecting of decorated code, formatting it and writing to yaml file.
4
+
5
+ == Related components
6
+
7
+ * xref:reqstool-python-hatch-plugin::index.adoc[Hatch Plugin] -- packages decorators output into a reqstool artifact during Hatch builds
8
+ * xref:reqstool-python-poetry-plugin::index.adoc[Poetry Plugin] -- packages decorators output into a reqstool artifact during Poetry builds
9
+
10
+ == License
11
+
12
+ MIT License.
@@ -0,0 +1,8 @@
1
+ == Installation
2
+
3
+ The package name is `reqstool-python-decorators`.
4
+
5
+ [source,bash]
6
+ ----
7
+ pip install reqstool-python-decorators
8
+ ----
@@ -4,54 +4,60 @@
4
4
 
5
5
  * Hatch
6
6
 
7
- ```
7
+ [source,toml]
8
+ ----
8
9
  dependencies = [
9
10
  "reqstool-python-decorators == <version>"
10
11
  ]
11
- ```
12
+ ----
12
13
 
13
14
  * Poetry
14
15
 
15
- ```
16
+ [source,toml]
17
+ ----
16
18
  [tool.poetry.dependencies]
17
19
  reqstool-python-decorators = "<version>"
18
- ```
20
+ ----
19
21
 
20
22
  === Decorators
21
23
 
22
24
  Import decorators:
23
25
 
24
- ```
26
+ [source,python]
27
+ ----
25
28
  from reqstool_python_decorators.decorators.decorators import Requirements, SVCs
26
- ```
29
+ ----
27
30
 
28
31
  Example usage of the decorators:
29
32
 
30
- ```python
33
+ [source,python]
34
+ ----
31
35
  @Requirements("REQ_111", "REQ_222")
32
36
  def somefunction():
33
- ```
37
+ ----
34
38
 
35
- ```python
39
+ [source,python]
40
+ ----
36
41
  @SVCs("SVC_111", "SVC_222")
37
42
  def test_somefunction():
38
- ```
43
+ ----
39
44
 
40
45
  === Processor
41
46
 
42
47
  Import processor:
43
48
 
44
- ```
49
+ [source,python]
50
+ ----
45
51
  from reqstool_python_decorators.processors.decorator_processor import DecoratorProcessor
46
- ```
52
+ ----
47
53
 
48
54
  Main function to collect decorators data and generate yaml file:
49
55
 
50
- ```
56
+ [source,python]
57
+ ----
51
58
  process_decorated_data(path_to_python_files, output_file)
52
- ```
59
+ ----
53
60
 
54
61
  `path_to_python_files` is the directories to search through to find decorated code.
55
62
 
56
63
  (Optional) `output_file` is output file(path) the yaml file is stored to. Default is `/build/reqstool/annotations.yml`.
57
-