Skip to content

feat: Adopt pytest from tools - #881

Merged
AlexanderLanin merged 11 commits into
eclipse-score:mainfrom
MaximilianSoerenPollak:MSP_adopt_pytest_tools
Oct 2, 2026
Merged

AlexanderLanin merged 11 commits into
eclipse-score:mainfrom
MaximilianSoerenPollak:MSP_adopt_pytest_tools

Conversation

@MaximilianSoerenPollak

Copy link
Copy Markdown
Contributor

📌 Description

Adopting the pytest from tools, reducing complexity in Docs-AS-Code

🚨 Impact Analysis

  • This change does not violate any tool requirements and is covered by existing tool requirements
  • This change does not violate any design decisions
  • Otherwise I have created a ticket for new tool qualification

✅ Checklist

  • Added/updated documentation for new or changed features
  • Added/updated tests to cover the changes
  • Followed project coding standards and guidelines

a-zw
a-zw previously approved these changes Sep 30, 2026
Comment thread MODULE.bazel Outdated
# PlantUML for docs
bazel_dep(name = "rules_java", version = "8.15.1")
bazel_dep(name = "score_tools")
git_override(

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.

Currently, we need HEAD but after the next release we should switch to a version. Better to annotate that more explicitly.

Suggested change
git_override(
git_override( # necessary until v0.0.3+ is available

Comment thread MODULE.bazel Outdated

# 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 = "aspect_rules_py", version = "1.6.6")

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.

Why this version? score_tools uses 1.6.3. We are sure enough this is backwards-compatible?

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-881: https://eclipse-score.github.io/docs-as-code/pr-881/

@a-zw a-zw 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.

LGTM

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Plugin imports still reference the removed local package, and the documented public Bazel load path is removed without compatibility handling.

Review effort: Balanced
Findings: 4 High severity · 1 Medium severity

Open (5)
What changed in this PR

Adopts score_pytest from score_tools, replacing the repository-local implementation.

Changes:

  • Adds the score_tools Bazel dependency and updates test targets.
  • Removes the local pytest wrapper and plugin.
  • Adds external plugin support to the IDE environment.
File Description
tools/​tests/​BUILD Uses external pytest rule.
src/​requirements_py314.txt Changes Python 3.14 dependency pins.
src/​helper_lib/​BUILD Uses external pytest rule.
src/​extensions/​score_sync_toml/​BUILD Uses external pytest rule.
src/​extensions/​score_sphinx_needs_templates/​BUILD Uses external pytest rule.
src/​extensions/​score_source_code_linker/​tests/​test_testcase_annotations.py Reorders plugin import.
src/​extensions/​score_source_code_linker/​tests/​test_source_code_link_integration.py Reorders plugin import.
src/​extensions/​score_source_code_linker/​BUILD Uses external pytest rule.
src/​extensions/​score_mounts/​BUILD Uses external pytest rule.
src/​extensions/​score_metrics/​tests/​test_traceability_metrics.py Reorders plugin import.
src/​extensions/​score_metrics/​BUILD Uses external pytest rule.
src/​extensions/​score_metamodel/​tests/​test_rules_file_based.py Reorders plugin import.
src/​extensions/​score_metamodel/​BUILD Uses external pytest rule.
src/​extensions/​score_layout/​BUILD Uses external pytest rule.
src/​extensions/​score_cross_module_compatibility/​BUILD Uses external pytest rule.
src/​docs_cli/​BUILD Uses external pytest rule.
scripts_bazel/​tests/​BUILD Uses external pytest rule.
score_pytest/​tests/​test_rules_are_working_correctly.py Removes local wrapper test.
score_pytest/​tests/​conftest.py Removes local fixture.
score_pytest/​README.md Removes local wrapper documentation.
score_pytest/​pytest.ini Removes local pytest configuration.
score_pytest/​main.py Removes local pytest launcher.
score_pytest/​BUILD Removes local plugin targets.
score_pytest/​attribute_plugin.py Removes local metadata plugin.
score_pytest.bzl Removes local pytest macro.
MODULE.bazel.lock Locks score_tools registry metadata.
MODULE.bazel Adds score_tools dependency.
docs.bzl Adds the external plugin to IDE environments.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


import pytest
from score_metamodel.tests import need as test_need
from score_pytest.attribute_plugin import apply_test_metadata
import score_metrics.traceability_metrics as metrics
from score_metamodel import ScoreNeedType
from score_metamodel.tests import need as test_need
from score_pytest.attribute_plugin import add_test_properties

import pytest
from pytest import TempPathFactory
from score_pytest.attribute_plugin import add_test_properties
from typing import cast

from docutils import nodes
from score_pytest.attribute_plugin import add_test_properties
Comment on lines +484 to +486
docutils==0.22.4 \
--hash=sha256:4db53b1fde9abecbb74d91230d32ab626d94f6badfc575d6db9194a49df29968 \
--hash=sha256:d0013f540772d1420576855455d050a2180186c91c15779301ac2ccb3eeb68de
@AlexanderLanin
AlexanderLanin merged commit df729c5 into eclipse-score:main Oct 2, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants