Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

module(
name = "score_docs_as_code",
version = "0.3.3",
version = "0.4.0",
compatibility_level = 0,
)

Expand All @@ -22,7 +22,7 @@ module(
# Packaging dependencies
#
###############################################################################
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_pkg", version = "1.1.0")

###############################################################################
#
Expand Down Expand Up @@ -58,17 +58,17 @@ use_repo(pip, "pip_process")

# Additional Python rules provided by aspect, e.g. an improved version of
bazel_dep(name = "aspect_rules_py", version = "1.4.0")
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")

###############################################################################
#
# Generic linting and formatting rules
#
###############################################################################
bazel_dep(name = "aspect_rules_lint", version = "1.4.2")
bazel_dep(name = "aspect_rules_lint", version = "1.4.4")

# PlantUML for docs
bazel_dep(name = "rules_java", version = "8.11.0")
bazel_dep(name = "rules_java", version = "8.13.0")

http_jar = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_jar")

Expand All @@ -94,8 +94,7 @@ bazel_dep(name = "score_python_basics", version = "0.3.2")
bazel_dep(name = "score_cr_checker", version = "0.2.2")

# This is only needed to build the examples.
bazel_dep(name = "score_platform", version = "0.1.1")

# Grab dash
bazel_dep(name = "score_dash_license_checker", version = "0.1.1")
bazel_dep(name = "score_process", version = "0.2.0")
bazel_dep(name = "score_process", version = "1.0.1")
11 changes: 0 additions & 11 deletions docs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ docs(
{
"suffix": "latest", # latest main branch documentation build
"external_needs_info": [
{
"base_url": "https://eclipse-score.github.io/score/main",
"json_url": "https://eclipse-score.github.io/score/main/needs.json",
"id_prefix": "score_",
},
{
"base_url": "https://eclipse-score.github.io/process_description/main",
"json_url": "https://eclipse-score.github.io/process_description/main/needs.json",
Expand All @@ -41,15 +36,9 @@ docs(
{
"suffix": "release", # The version imported from MODULE.bazel
"target": [
"@score_platform//docs:docs_needs",
"@score_process//process:docs_needs_latest",
],
"external_needs_info": [
{
"base_url": "https://eclipse-score.github.io/score/main",
"json_path": "/score_platform~/docs/docs_needs/_build/needs/needs.json",
"id_prefix": "score_",
},
{
"base_url": "https://eclipse-score.github.io/process_description/main",
"json_path": "/score_process~/process/docs_needs_latest/_build/needs/needs.json",
Expand Down
10 changes: 5 additions & 5 deletions docs/how-to-integrate/example/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ This is a rendered example of the 'examples/linking-both' folder using the `docs

Some content to make sure we also can render this
This is a link to an external need inside the 'score' documentation.
:need:`SCORE_feat_req__persistency__config_file`.
:need:`PROCESS_gd_req__req__attr_uid`.
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>`_



.. feat_req:: Some Title
:id: feat_req__example__some_title
.. tool_req:: Some Title
:id: tool_req__example__some_title
:reqtype: Process
:security: YES
:safety: ASIL_D
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
:satisfies: PROCESS_gd_req__req__attr_uid
:status: invalid

With this requirement we can check if the removal of the prefix is working correctly.
It should remove id_prefix (SCORE _) as it's defined inside the BUILD file and remove it before it checks the leftover value
It should remove id_prefix (PROCESS _) as it's defined inside the BUILD file and remove it before it checks the leftover value
against the allowed defined regex in the metamodel
Note: The ID is different here as the 'folder structure' is as well

Expand Down
10 changes: 5 additions & 5 deletions docs/how-to-integrate/example/testing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ This example will help catch things and bugs when rst's are defined inside a fol

Some content to make sure we also can render this.
This is a link to an external need inside the 'score' documentation.
:need:`SCORE_feat_req__persistency__config_file`.
:need:`PROCESS_gd_req__req__attr_uid`
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>`_


.. feat_req:: Some Title
:id: feat_req__testing__some_title
.. tool_req:: Some Title
:id: tool_req__testing__some_title
:reqtype: Process
:security: YES
:safety: ASIL_D
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
:satisfies: PROCESS_gd_req__req__attr_uid
:status: invalid

With this requirement we can check if the removal of the prefix is working correctly.
It should remove id_prefix (SCORE _) as it's defined inside the BUILD file and remove it before it checks the leftover value
It should remove id_prefix (PROCESS _) as it's defined inside the BUILD file and remove it before it checks the leftover value
against the 'allowed' defined regex in the metamodel
18 changes: 8 additions & 10 deletions examples/linking-both/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,24 @@ docs(
"suffix": "latest", # latest main branch documentation build
"external_needs_info": [
{
"base_url": "https://eclipse-score.github.io/score/main",
"json_url": "https://eclipse-score.github.io/score/main/needs.json",
"id_prefix": "score_",
"base_url": "https://eclipse-score.github.io/process_description/main/",
"json_url": "https://eclipse-score.github.io/process_description/main/needs.json",
"id_prefix": "process_",
},
],
},
{
"suffix": "release", # The version imported from MODULE.bazel
"target": ["@score_platform//docs:docs_needs"],
"target": ["@score_process//process:docs_needs_latest"],
"external_needs_info": [
{
"base_url": "https://eclipse-score.github.io/score/main",
"json_path": "/score_platform~/docs/docs_needs/_build/needs/needs.json",
"id_prefix": "score_",
"base_url": "https://eclipse-score.github.io/process_description/main",
"json_path": "/score_process~/process/docs_needs_latest/_build/needs/needs.json",
"id_prefix": "process_",
},
],
},
],
source_dir = "examples/linking-both",
source_files_to_scan_for_needs_links = [
"//src:score_extension_files",
],
source_files_to_scan_for_needs_links = [],
)
10 changes: 5 additions & 5 deletions examples/linking-both/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ This is a simple example of a documentation page using the `docs` tool.

Some content to make sure we also can render this
This is a link to an external need inside the 'score' documentation.
:need:`SCORE_feat_req__kvs__config_file`
:need:`PROCESS_gd_req__req__attr_uid`
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>`_



.. feat_req:: Some Title
:id: feat_req__index__some_title
.. tool_req:: Some Title
:id: tool_req__index__some_title
:reqtype: Process
:security: YES
:safety: ASIL_D
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
:satisfies: PROCESS_gd_req__req__attr_uid
:status: invalid

With this requirement we can check if the removal of the prefix is working correctly.
It should remove id_prefix (SCORE _) as it's defined inside the BUILD file and remove it before it checks the leftover value
It should remove id_prefix (PROCESS _) as it's defined inside the BUILD file and remove it before it checks the leftover value
against the allowed defined regex in the metamodel

10 changes: 5 additions & 5 deletions examples/linking-both/testing/test.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ This example will help catch things and bugs when rst's are defined inside a fol

Some content to make sure we also can render this.
This is a link to an external need inside the 'score' documentation.
:need:`SCORE_feat_req__kvs__config_file`.
:need:`PROCESS_gd_req__req__attr_uid`
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>`_


.. feat_req:: Some Title
:id: feat_req__testing__some_title
.. tool_req:: Some Title
:id: tool_req__testing__some_title
:reqtype: Process
:security: YES
:safety: ASIL_D
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
:satisfies: PROCESS_gd_req__req__attr_uid
:status: invalid

With this requirement we can check if the removal of the prefix is working correctly.
It should remove id_prefix (SCORE _) as it's defined inside the BUILD file and remove it before it checks the leftover value
It should remove id_prefix (PRCOESS _) as it's defined inside the BUILD file and remove it before it checks the leftover value
against the 'allowed' defined regex in the metamodel

11 changes: 4 additions & 7 deletions examples/linking-latest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,13 @@ docs(
"suffix": "latest", # latest main branch documentation build
"external_needs_info": [
{
"base_url": "https://eclipse-score.github.io/score/main",
"json_url": "https://eclipse-score.github.io/score/main/needs.json",
"version": "0.1",
"id_prefix": "score_",
"base_url": "https://eclipse-score.github.io/process_description/main/",
"json_url": "https://eclipse-score.github.io/process_description/main/needs.json",
"id_prefix": "process_",
},
],
},
],
source_dir = "examples/linking-latest",
source_files_to_scan_for_needs_links = [
"//src:score_extension_files",
],
source_files_to_scan_for_needs_links = [],
)
7 changes: 6 additions & 1 deletion examples/linking-latest/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ Hello World
=================
This is a simple example of a documentation page using the `docs` tool.


Hello World
=================
This is a simple example of a documentation page using the `docs` tool.

.. stkh_req:: TestTitle
:id: stkh_req__docs__test_requirement
:status: valid
Expand All @@ -25,6 +30,6 @@ This is a simple example of a documentation page using the `docs` tool.

Some content to make sure we also can render this
This is a link to an external need inside the 'score' documentation.
:need:`SCORE_feat_req__kvs__config_file`.
:need:`PROCESS_gd_req__req__attr_uid`
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>`_

19 changes: 4 additions & 15 deletions examples/linking-release/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,16 @@ docs(
docs_targets = [
{
"suffix": "release", # The version imported from MODULE.bazel
"target": ["@score_platform//docs:docs_needs"],
"target": ["@score_process//process:docs_needs_latest"],
"external_needs_info": [
{
"base_url": "https://eclipse-score.github.io/score/main",
"json_path": "/score_platform~/docs/docs_needs/_build/needs/needs.json",
"version": "0.1",
"id_prefix": "score_",
"json_path": "/score_process~/process/docs_needs_latest/_build/needs/needs.json",
"id_prefix": "process_",
},
],
},
],
source_dir = "examples/linking-release",
source_files_to_scan_for_needs_links = [
# Note: you can add filegroups, globs, or entire targets here.
"//src:score_extension_files",
],
source_files_to_scan_for_needs_links = [],
)

# ╭───────────────────────────────────────╮
# │ This is commented out until local │
# │ multi-repo testing is implemented │
# ╰───────────────────────────────────────╯

# {
5 changes: 2 additions & 3 deletions examples/linking-release/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ This is a simple example of a documentation page using the `docs` tool.
:reqtype: Functional

Some content to make sure we also can render this
This is a link to an external need inside the 'score' documentation
:need:`SCORE_stkh_req__overall_goals__reuse_of_app_soft`
This is a link to an external need inside the 'score' documentation.
:need:`PROCESS_gd_req__req__attr_uid`
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>`_

Loading