Skip to content

Commit 9c7cef3

Browse files
add requirements (#67)
Co-authored-by: Maximilian Sören Pollak <maximilian.pollak@expleogroup.com>
1 parent 491a82b commit 9c7cef3

25 files changed

Lines changed: 1182 additions & 421 deletions

.vscode/settings.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,11 @@
3232
"python.testing.unittestEnabled": false,
3333
"python.testing.pytestEnabled": true,
3434
"bazel.lsp.command": "bazel",
35-
"bazel.lsp.args": ["run", "//:starpls_server"]
35+
"bazel.lsp.args": [
36+
"run",
37+
"//:starpls_server"
38+
],
39+
40+
// Disable internal type checking, since we use basedpyright
41+
"python.analysis.typeCheckingMode": "off"
3642
}

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,4 @@ bazel_dep(name = "score_platform", version = "0.1.1")
9696

9797
# Grab dash
9898
bazel_dep(name = "score_dash_license_checker", version = "0.1.1")
99+
bazel_dep(name = "score_process", version = "0.2.0")

docs/BUILD

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,30 @@ docs(
3131
"json_url": "https://eclipse-score.github.io/score/main/needs.json",
3232
"id_prefix": "score_",
3333
},
34+
{
35+
"base_url": "https://eclipse-score.github.io/process_description/main",
36+
"json_url": "https://eclipse-score.github.io/process_description/main/needs.json",
37+
"id_prefix": "process_",
38+
},
3439
],
3540
},
3641
{
3742
"suffix": "release", # The version imported from MODULE.bazel
38-
"target": ["@score_platform//docs:docs_needs"],
43+
"target": [
44+
"@score_platform//docs:docs_needs",
45+
"@score_process//process:docs_needs_latest",
46+
],
3947
"external_needs_info": [
4048
{
4149
"base_url": "https://eclipse-score.github.io/score/main",
4250
"json_path": "/score_platform~/docs/docs_needs/_build/needs/needs.json",
4351
"id_prefix": "score_",
4452
},
53+
{
54+
"base_url": "https://eclipse-score.github.io/process_description/main",
55+
"json_path": "/score_process~/process/docs_needs_latest/_build/needs/needs.json",
56+
"id_prefix": "process_",
57+
},
4558
],
4659
},
4760
],

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
"score_layout",
4141
]
4242

43+
myst_enable_extensions = ["colon_fence"]
44+
4345
exclude_patterns = [
4446
# The following entries are not required when building the documentation via 'bazel
4547
# build //docs:docs', as that command runs in a sandboxed environment. However, when
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This is a rendered example of the 'examples/linking-both' folder using the `docs
3030

3131
Some content to make sure we also can render this
3232
This is a link to an external need inside the 'score' documentation.
33-
:need:`SCORE_feat_req__kvs__config_file`.
33+
:need:`SCORE_feat_req__persistency__config_file`.
3434
Note how it starts with the defined prefix but in UPPERCASE. This comes from sphinx-needs, `see here <https://github.com/useblocks/sphinx-needs/blob/master/sphinx_needs/external_needs.py#L119>`_
3535

3636

@@ -42,8 +42,8 @@ This is a rendered example of the 'examples/linking-both' folder using the `docs
4242
:safety: ASIL_D
4343
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
4444
:status: invalid
45-
46-
With this requirement we can check if the removal of the prefix is working correctly.
45+
46+
With this requirement we can check if the removal of the prefix is working correctly.
4747
It should remove id_prefix (SCORE _) as it's defined inside the BUILD file and remove it before it checks the leftover value
4848
against the allowed defined regex in the metamodel
4949
Note: The ID is different here as the 'folder structure' is as well

docs/example/testing/index.rst renamed to docs/how-to-integrate/example/testing/index.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ This example will help catch things and bugs when rst's are defined inside a fol
2323
:rationale: A simple requirement we need to enable a documentation build
2424
:reqtype: Functional
2525

26-
Some content to make sure we also can render this.
26+
Some content to make sure we also can render this.
2727
This is a link to an external need inside the 'score' documentation.
28-
:need:`SCORE_feat_req__kvs__config_file`.
28+
:need:`SCORE_feat_req__persistency__config_file`.
2929
Note how it starts with the defined prefix but in UPPERCASE. This comes from sphinx-needs, `see here <https://github.com/useblocks/sphinx-needs/blob/master/sphinx_needs/external_needs.py#L119>`_
3030

3131

@@ -35,9 +35,8 @@ This example will help catch things and bugs when rst's are defined inside a fol
3535
:security: YES
3636
:safety: ASIL_D
3737
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
38-
:status: invalid
38+
:status: invalid
3939

40-
With this requirement we can check if the removal of the prefix is working correctly.
40+
With this requirement we can check if the removal of the prefix is working correctly.
4141
It should remove id_prefix (SCORE _) as it's defined inside the BUILD file and remove it before it checks the leftover value
4242
against the 'allowed' defined regex in the metamodel
43-
Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ bazel build //path/to/BUILD-file:docs_latest # documentation at 'bazel-bin/
9595
<br>
9696
<br>
9797

98-
> ### *For the full example as well as more complex ones, check out the {doc}`example <../example/index>`
98+
> ### *For the full example as well as more complex ones, check out the {doc}`example <example/index>`
9999
100-
---
100+
---
101101

102102
### Available Targets
103103

@@ -129,39 +129,3 @@ The `docs()` macro accepts the following arguments:
129129
| `docs_targets` | List of dictionaries which allows multi-repo setup | Yes | - |
130130
| `source_files_to_scan_for_needs_links` | List of targets,globs,filegroups that the 'source_code_linker' should parse | No | `[]` |
131131
| `visibility` | Bazel visibility | No | `None` |
132-
133-
---
134-
135-
136-
## Available Extensions
137-
This module includes several custom Sphinx extensions to enhance your documentation:
138-
139-
### Score Layout Extension
140-
141-
Custom layout options for Sphinx HTML output are defined in `score_layout`
142-
<README missing>
143-
144-
### Score Header Service
145-
146-
Consistent header styling across documentation pages.
147-
{doc}`Learn more <extensions/header_service>`
148-
149-
### Score Metamodel
150-
151-
Validation and checking of documentation structure against a defined Metamodel.
152-
{doc}`Learn more <extensions/metamodel>`
153-
154-
### Score Source Code Linker
155-
156-
Links between requirements documentation and source code implementations.
157-
{doc}`Learn more <extensions/source_code_linker.md>
158-
159-
### Score PlantUML
160-
161-
Integration with PlantUML for generating diagrams.
162-
<README missing>
163-
164-
### Score Draw UML Functions
165-
166-
Helper functions for creating UML diagrams.
167-
<README missing>

docs/how-to-integrate/index.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. _how-to-integrate:
2+
3+
How to Integrate
4+
==================
5+
6+
7+
Here we'll document how to integrate the docs-as-code tooling into your S-CORE repository.
8+
9+
For now here are some :ref:`example <example>` files to get you started.
10+
11+
See also :doc:`getting_started`.
12+
13+
.. toctree::
14+
:hidden:
15+
16+
example/index
17+
getting_started
File renamed without changes.

docs/how-to-use/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. _how-to-use:
2+
3+
How To Use
4+
==========
5+
6+
Interesting Links:
7+
* https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
8+
9+
.. toctree::
10+
:hidden:
11+
12+
faq

0 commit comments

Comments
 (0)