Skip to content

Commit 27c4a52

Browse files
Remove dependency to score_platform (#108)
* Remove dependency to score_platform Co-authored-by: Alexander Lanin <alex@lanin.de>
1 parent 995415a commit 27c4a52

11 files changed

Lines changed: 50 additions & 74 deletions

File tree

MODULE.bazel

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
module(
1515
name = "score_docs_as_code",
16-
version = "0.3.3",
16+
version = "0.4.0",
1717
compatibility_level = 0,
1818
)
1919

@@ -22,7 +22,7 @@ module(
2222
# Packaging dependencies
2323
#
2424
###############################################################################
25-
bazel_dep(name = "rules_pkg", version = "1.0.1")
25+
bazel_dep(name = "rules_pkg", version = "1.1.0")
2626

2727
###############################################################################
2828
#
@@ -58,17 +58,17 @@ use_repo(pip, "pip_process")
5858

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

6363
###############################################################################
6464
#
6565
# Generic linting and formatting rules
6666
#
6767
###############################################################################
68-
bazel_dep(name = "aspect_rules_lint", version = "1.4.2")
68+
bazel_dep(name = "aspect_rules_lint", version = "1.4.4")
6969

7070
# PlantUML for docs
71-
bazel_dep(name = "rules_java", version = "8.11.0")
71+
bazel_dep(name = "rules_java", version = "8.13.0")
7272

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

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

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

9998
# Grab dash
10099
bazel_dep(name = "score_dash_license_checker", version = "0.1.1")
101-
bazel_dep(name = "score_process", version = "0.2.0")
100+
bazel_dep(name = "score_process", version = "1.0.1")

docs/BUILD

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ docs(
2626
{
2727
"suffix": "latest", # latest main branch documentation build
2828
"external_needs_info": [
29-
{
30-
"base_url": "https://eclipse-score.github.io/score/main",
31-
"json_url": "https://eclipse-score.github.io/score/main/needs.json",
32-
"id_prefix": "score_",
33-
},
3429
{
3530
"base_url": "https://eclipse-score.github.io/process_description/main",
3631
"json_url": "https://eclipse-score.github.io/process_description/main/needs.json",
@@ -41,15 +36,9 @@ docs(
4136
{
4237
"suffix": "release", # The version imported from MODULE.bazel
4338
"target": [
44-
"@score_platform//docs:docs_needs",
4539
"@score_process//process:docs_needs_latest",
4640
],
4741
"external_needs_info": [
48-
{
49-
"base_url": "https://eclipse-score.github.io/score/main",
50-
"json_path": "/score_platform~/docs/docs_needs/_build/needs/needs.json",
51-
"id_prefix": "score_",
52-
},
5342
{
5443
"base_url": "https://eclipse-score.github.io/process_description/main",
5544
"json_path": "/score_process~/process/docs_needs_latest/_build/needs/needs.json",

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ 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__persistency__config_file`.
33+
:need:`PROCESS_gd_req__req__attr_uid`.
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

3737

38-
.. feat_req:: Some Title
39-
:id: feat_req__example__some_title
38+
.. tool_req:: Some Title
39+
:id: tool_req__example__some_title
4040
:reqtype: Process
4141
:security: YES
4242
:safety: ASIL_D
43-
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
43+
:satisfies: PROCESS_gd_req__req__attr_uid
4444
:status: invalid
4545

4646
With this requirement we can check if the removal of the prefix is working correctly.
47-
It should remove id_prefix (SCORE _) as it's defined inside the BUILD file and remove it before it checks the leftover value
47+
It should remove id_prefix (PROCESS _) 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
5050

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ This example will help catch things and bugs when rst's are defined inside a fol
2525

2626
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__persistency__config_file`.
28+
:need:`PROCESS_gd_req__req__attr_uid`
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

32-
.. feat_req:: Some Title
33-
:id: feat_req__testing__some_title
32+
.. tool_req:: Some Title
33+
:id: tool_req__testing__some_title
3434
:reqtype: Process
3535
:security: YES
3636
:safety: ASIL_D
37-
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
37+
:satisfies: PROCESS_gd_req__req__attr_uid
3838
:status: invalid
3939

4040
With this requirement we can check if the removal of the prefix is working correctly.
41-
It should remove id_prefix (SCORE _) as it's defined inside the BUILD file and remove it before it checks the leftover value
41+
It should remove id_prefix (PROCESS _) 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

examples/linking-both/BUILD

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,24 @@ docs(
2727
"suffix": "latest", # latest main branch documentation build
2828
"external_needs_info": [
2929
{
30-
"base_url": "https://eclipse-score.github.io/score/main",
31-
"json_url": "https://eclipse-score.github.io/score/main/needs.json",
32-
"id_prefix": "score_",
30+
"base_url": "https://eclipse-score.github.io/process_description/main/",
31+
"json_url": "https://eclipse-score.github.io/process_description/main/needs.json",
32+
"id_prefix": "process_",
3333
},
3434
],
3535
},
3636
{
3737
"suffix": "release", # The version imported from MODULE.bazel
38-
"target": ["@score_platform//docs:docs_needs"],
38+
"target": ["@score_process//process:docs_needs_latest"],
3939
"external_needs_info": [
4040
{
41-
"base_url": "https://eclipse-score.github.io/score/main",
42-
"json_path": "/score_platform~/docs/docs_needs/_build/needs/needs.json",
43-
"id_prefix": "score_",
41+
"base_url": "https://eclipse-score.github.io/process_description/main",
42+
"json_path": "/score_process~/process/docs_needs_latest/_build/needs/needs.json",
43+
"id_prefix": "process_",
4444
},
4545
],
4646
},
4747
],
4848
source_dir = "examples/linking-both",
49-
source_files_to_scan_for_needs_links = [
50-
"//src:score_extension_files",
51-
],
49+
source_files_to_scan_for_needs_links = [],
5250
)

examples/linking-both/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ This is a simple example of a documentation page using the `docs` tool.
3333

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

3939

4040

41-
.. feat_req:: Some Title
42-
:id: feat_req__index__some_title
41+
.. tool_req:: Some Title
42+
:id: tool_req__index__some_title
4343
:reqtype: Process
4444
:security: YES
4545
:safety: ASIL_D
46-
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
46+
:satisfies: PROCESS_gd_req__req__attr_uid
4747
:status: invalid
4848

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

examples/linking-both/testing/test.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ This example will help catch things and bugs when rst's are defined inside a fol
2525

2626
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:`PROCESS_gd_req__req__attr_uid`
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

32-
.. feat_req:: Some Title
33-
:id: feat_req__testing__some_title
32+
.. tool_req:: Some Title
33+
:id: tool_req__testing__some_title
3434
:reqtype: Process
3535
:security: YES
3636
:safety: ASIL_D
37-
:satisfies: SCORE_stkh_req__overall_goals__reuse_of_app_soft
37+
:satisfies: PROCESS_gd_req__req__attr_uid
3838
:status: invalid
3939

4040
With this requirement we can check if the removal of the prefix is working correctly.
41-
It should remove id_prefix (SCORE _) as it's defined inside the BUILD file and remove it before it checks the leftover value
41+
It should remove id_prefix (PRCOESS _) 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
4343

examples/linking-latest/BUILD

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,13 @@ docs(
2727
"suffix": "latest", # latest main branch documentation build
2828
"external_needs_info": [
2929
{
30-
"base_url": "https://eclipse-score.github.io/score/main",
31-
"json_url": "https://eclipse-score.github.io/score/main/needs.json",
32-
"version": "0.1",
33-
"id_prefix": "score_",
30+
"base_url": "https://eclipse-score.github.io/process_description/main/",
31+
"json_url": "https://eclipse-score.github.io/process_description/main/needs.json",
32+
"id_prefix": "process_",
3433
},
3534
],
3635
},
3736
],
3837
source_dir = "examples/linking-latest",
39-
source_files_to_scan_for_needs_links = [
40-
"//src:score_extension_files",
41-
],
38+
source_files_to_scan_for_needs_links = [],
4239
)

examples/linking-latest/index.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ Hello World
1616
=================
1717
This is a simple example of a documentation page using the `docs` tool.
1818

19+
20+
Hello World
21+
=================
22+
This is a simple example of a documentation page using the `docs` tool.
23+
1924
.. stkh_req:: TestTitle
2025
:id: stkh_req__docs__test_requirement
2126
:status: valid
@@ -25,6 +30,6 @@ This is a simple example of a documentation page using the `docs` tool.
2530

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

examples/linking-release/BUILD

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,16 @@ docs(
2525
docs_targets = [
2626
{
2727
"suffix": "release", # The version imported from MODULE.bazel
28-
"target": ["@score_platform//docs:docs_needs"],
28+
"target": ["@score_process//process:docs_needs_latest"],
2929
"external_needs_info": [
3030
{
3131
"base_url": "https://eclipse-score.github.io/score/main",
32-
"json_path": "/score_platform~/docs/docs_needs/_build/needs/needs.json",
33-
"version": "0.1",
34-
"id_prefix": "score_",
32+
"json_path": "/score_process~/process/docs_needs_latest/_build/needs/needs.json",
33+
"id_prefix": "process_",
3534
},
3635
],
3736
},
3837
],
3938
source_dir = "examples/linking-release",
40-
source_files_to_scan_for_needs_links = [
41-
# Note: you can add filegroups, globs, or entire targets here.
42-
"//src:score_extension_files",
43-
],
39+
source_files_to_scan_for_needs_links = [],
4440
)
45-
46-
# ╭───────────────────────────────────────╮
47-
# │ This is commented out until local │
48-
# │ multi-repo testing is implemented │
49-
# ╰───────────────────────────────────────╯
50-
51-
# {

0 commit comments

Comments
 (0)