Skip to content

tooling: Link and create checks for guidance process requirements - #625

Merged
AlexanderLanin merged 3 commits into
eclipse-score:mainfrom
Aymen-Soussi-01:Aymen-Soussi-complete-guidance-checks-and-tests
Mar 18, 2025
Merged

AlexanderLanin merged 3 commits into
eclipse-score:mainfrom
Aymen-Soussi-01:Aymen-Soussi-complete-guidance-checks-and-tests

Conversation

@Aymen-Soussi-01

@Aymen-Soussi-01 Aymen-Soussi-01 commented Mar 10, 2025 •

Copy link
Copy Markdown
Contributor

Link existing checks via source code linker and implement missing checks.

Also-by: Aymen Soussi aymen.soussi@expleogroup.com

We decided to disable the optional_links check for now and correct the finding related to that in a separate PR

closes #521

@github-actions

github-actions Bot commented Mar 10, 2025 •

Copy link
Copy Markdown
Contributor

License Check Results

🚀 The license check preparation job ran successfully.

Status: ⚠️ Needs Review

Click to expand output
2025/03/18 15:35:51 Downloading https://releases.bazel.build/7.4.0/release/bazel-7.4.0-linux-x86_64...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: docs
Loading: 0 packages loaded
    currently loading: docs
Loading: 0 packages loaded
    currently loading: docs
Analyzing: target //docs:license.check.python (1 packages loaded, 0 targets configured)
Analyzing: target //docs:license.check.python (1 packages loaded, 0 targets configured)

Analyzing: target //docs:license.check.python (92 packages loaded, 10 targets configured)

Analyzing: target //docs:license.check.python (96 packages loaded, 10 targets configured)

Analyzing: target //docs:license.check.python (116 packages loaded, 201 targets configured)

Analyzing: target //docs:license.check.python (130 packages loaded, 824 targets configured)

Analyzing: target //docs:license.check.python (144 packages loaded, 2465 targets configured)

Analyzing: target //docs:license.check.python (144 packages loaded, 2465 targets configured)

Analyzing: target //docs:license.check.python (147 packages loaded, 2481 targets configured)

Analyzing: target //docs:license.check.python (147 packages loaded, 4487 targets configured)

Analyzing: target //docs:license.check.python (148 packages loaded, 4611 targets configured)

INFO: Analyzed target //docs:license.check.python (149 packages loaded, 4736 targets configured).
[11 / 13] [Prepa] JavaToolchainCompileBootClasspath external/rules_java~/toolchains/platformclasspath.jar
INFO: Found 1 target...
Target //docs:license.check.python up-to-date:
  bazel-bin/docs/license.check.python
  bazel-bin/docs/license.check.python.jar
INFO: Elapsed time: 21.713s, Critical Path: 2.38s
INFO: 13 processes: 9 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 13 total actions
INFO: Running command line: bazel-bin/docs/license.check.python docs/formatted.txt -review -project automotive.score -repo https://github.com/eclipse-score/score -token otyhZ4eaRYK1tKLNNF-Y
[main] INFO Querying Eclipse Foundation for license data for 69 items.
[main] INFO Found 45 items.
[main] INFO Querying ClearlyDefined for license data for 28 items.
[main] INFO Found 28 items.
[main] INFO License information could not be automatically verified for the following content:
[main] INFO 
[main] INFO pypi/pypi/-/debugpy/1.8.12
[main] INFO pypi/pypi/-/docutils/0.21.2
[main] INFO pypi/pypi/-/matplotlib/3.10.0
[main] INFO pypi/pypi/-/pillow/11.1.0
[main] INFO 
[main] INFO This content is either not correctly mapped by the system, or requires review.
[main] INFO A review is required for pypi/pypi/-/docutils/0.21.2.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/19880 .
[main] INFO A review is required for pypi/pypi/-/pillow/11.1.0.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/19890 .
[main] INFO A review is required for pypi/pypi/-/debugpy/1.8.12.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/19903 .
[main] INFO A review is required for pypi/pypi/-/matplotlib/3.10.0.
[main] INFO A review request already exists https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/19892 .

@Aymen-Soussi-01
Aymen-Soussi-01 force-pushed the Aymen-Soussi-complete-guidance-checks-and-tests branch from 8e764ff to 98b0083 Compare March 11, 2025 00:12
Comment thread docs/_tooling/extensions/score_metamodel/checks/id_format_and_length.py Outdated
Comment thread docs/_tooling/extensions/score_metamodel/checks/id_format_and_length.py Outdated
@AlexanderLanin

Copy link
Copy Markdown
Member

@Aymen-Soussi-01 is this related to your PR?

architecture_modeling_example.rst:162: WARNING: comp_arc_sta__archdes_sub_component_1.implements (['comp_arc_int_op__archdes_real_operation_3']): does not follow pattern ^comp_arc_int__.*$. [score_metamodel]

Comment thread docs/_tooling/extensions/score_metamodel/checks/check_options.py
Comment thread docs/_tooling/extensions/score_metamodel/checks/check_options.py
Comment thread docs/_tooling/extensions/score_metamodel/checks/id_format_and_length.py Outdated
Comment thread docs/_tooling/extensions/score_metamodel/checks/id_format_and_length.py Outdated
Comment thread docs/_tooling/extensions/score_metamodel/checks/check_options.py
Comment thread docs/_tooling/extensions/score_metamodel/metamodel.yaml Outdated
Comment thread docs/_tooling/extensions/score_metamodel/tests/test_id_format_and_length.py Outdated
Comment thread docs/_tooling/extensions/score_metamodel/tests/test_id_format_and_length.py Outdated
Comment thread docs/_tooling/extensions/score_metamodel/tests/test_standards.py Outdated
Comment thread docs/_tooling/extensions/score_metamodel/tests/test_id_format_and_length.py Outdated
source_code_link: "^https://github.com/eclipse-score/score/blob/.*$"
# Custom semantic validation rules
custom_validation:
stop_words:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhh those are not generic "stop_words". They must not appear in the title. They potentially must appear in the content. So it's really context dependent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Please resolve.

- shall
- must
- will
weak_words:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "weak"? Those are stop words ("prohibited" would be clearer) for the content?!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's something like:

prohibited_words:
  id:
    - shall
    - must
    - will
  content:
    - just
    - ...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh and by the way. Especially the filter for content is probably only relevant for requirements, not for all needs?!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Please resolve.

app.config.needs_extra_links = metamodel["needs_extra_links"]
app.config.needs_extra_options = metamodel["needs_extra_options"]
app.config.graph_checks = metamodel["needs_graph_check"]
app.config.stop_words = metamodel["stop_words"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q:
Do we need them inside the App config? Will they be used from anywhere else?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just need it in the check related but I didnt find an other way to import them without repeating the code of reading the metamodel.yaml file and adding extra code functions

Comment thread docs/_tooling/extensions/score_metamodel/checks/attributes_format.py Outdated
Comment thread docs/_tooling/extensions/score_metamodel/checks/check_options.py Outdated
Comment thread docs/_tooling/extensions/score_metamodel/checks/check_options.py Outdated
@MaximilianSoerenPollak

Copy link
Copy Markdown
Contributor

@AlexanderLanin Just saw that this PR again fails the 'build' as the checks it introduces are having new findings (since the rebase I guess) and now it again does not go through. I think we have to implement this new_check attribute we talked about otherwise this (and any other similar PR's) will expand in scope to fix a lot of issues, or will be dependent on other PR's to fix those first.

@Aymen-Soussi-01
Aymen-Soussi-01 force-pushed the Aymen-Soussi-complete-guidance-checks-and-tests branch 3 times, most recently from af0b66f to 6605ec5 Compare March 13, 2025 13:52
@AlexanderLanin

Copy link
Copy Markdown
Member

@Aymen-Soussi-01 please don't amend/squash next time. That makes re-reviews rather impossible.

@AlexanderLanin

Copy link
Copy Markdown
Member

@hoe-jo this produces ~110 new warnings. Can you have a look and tell whether the guidelines/checks are correct. Either they are wrong, or we will introduce a new non-fatal-warning type for them.

hoe-jo
hoe-jo previously requested changes Mar 14, 2025

@hoe-jo hoe-jo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there was a misunderstanding: Since the weak word check originated from the process requirements of the requirements guidance it should also only be applied to stkh_req, feat_req and comp_req

optional_options:
source_code_link: "^https://github.com/eclipse-score/score/blob/.*$"
# Custom semantic validation rules
prohibited_words:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add req-Id to the guidance

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already added the corresponding req-Id to the related check

@AlexanderLanin

Copy link
Copy Markdown
Member

gd_req__req__attr_desc_weak: It shall be ensured that no weak words are contained in the requirement description.

=> only requirements, not all elements

gd_req__requirements_attr_title: The title of the requirement shall provide a short summary of the description. This means that e.g. the word “shall” must not be used here.

=> only requirements, not all elements

@Aymen-Soussi-01
Aymen-Soussi-01 force-pushed the Aymen-Soussi-complete-guidance-checks-and-tests branch from 6605ec5 to 3ed722f Compare March 14, 2025 15:01
@AlexanderLanin

Copy link
Copy Markdown
Member

Correction: requirement was wrong. It's really only "stkh_req, feat_req and comp_req". @hoe-jo will fix the requirement.

@Aymen-Soussi-01
Aymen-Soussi-01 force-pushed the Aymen-Soussi-complete-guidance-checks-and-tests branch 3 times, most recently from e7e0fc3 to 8221e32 Compare March 17, 2025 15:00
@github-actions

Copy link
Copy Markdown
Contributor

The created documentation from the pull request is available at: docu-html

@Aymen-Soussi-01
Aymen-Soussi-01 force-pushed the Aymen-Soussi-complete-guidance-checks-and-tests branch 2 times, most recently from 340ac4d to 51c43fe Compare March 17, 2025 15:07
Link existing checks via source code linker and implement missing checks.

Also-by: Aymen Soussi aymen.soussi@expleogroup.com
@Aymen-Soussi-01
Aymen-Soussi-01 force-pushed the Aymen-Soussi-complete-guidance-checks-and-tests branch from 51c43fe to 7c0cc6a Compare March 18, 2025 13:44
Remove unnecessary added code after merge conflicts with main branch

Also-by: Aymen Soussi aymen.soussi@expleogroup.com
This helps enforce clear and concise naming conventions.
"""
stop_words = app.config.stop_words
if need["type"] in ["stkh_req", "feat_req", "comp_req"]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure whether it is a good idea to use hardcoded values.

This should be made configurable so that it is easily expandable.
They could be added as well in the config, something like

# List of requirement types to apply the check to
requirement_types = ["stkh_req", "feat_req", "comp_req"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should definitely be in the metamodel.yaml, but I would merge this PR and adjust later.

---
"""
weak_words = app.config.weak_words
if need["type"] in [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, this is not easily exapnadable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should definitely be in the metamodel.yaml, but I would merge this PR and adjust later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will do it later in an other PR as this one took too long and needs to be merged as soon as possible

log.warning_for_need(need, f"is missing required {field_type}: `{field}`.")
continue

if values is None or values in [[], ""]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this block is redundant

do something like

    if values in [None, [], ""]:
        if required:
            log.warning_for_need(need, f"is missing required {field_type}: `{field}`.")
        continue  # Skip empty optional fields
        
        ```

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Please resolve

@hoe-jo
hoe-jo dismissed their stale review March 18, 2025 15:29

check correcteed

@Aymen-Soussi-01
Aymen-Soussi-01 force-pushed the Aymen-Soussi-complete-guidance-checks-and-tests branch from 8411433 to ddd3a62 Compare March 18, 2025 15:29
@Aymen-Soussi-01
Aymen-Soussi-01 force-pushed the Aymen-Soussi-complete-guidance-checks-and-tests branch from ddd3a62 to 4b33d61 Compare March 18, 2025 15:35

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further findings and improvements will be implemented in a future PR.

@AlexanderLanin
AlexanderLanin merged commit a9aeaba into eclipse-score:main Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Fix tests after metamodel change and integrate standards charts + create missing guidance checks

5 participants