Repository navigation
feat: Adopt pytest from tools - #881
AlexanderLanin merged 11 commits into
Conversation
783c06d to
01f9271
Compare
bd478b2 to
f2e47f0
Compare
| # PlantUML for docs | ||
| bazel_dep(name = "rules_java", version = "8.15.1") | ||
| bazel_dep(name = "score_tools") | ||
| git_override( |
There was a problem hiding this comment.
Currently, we need HEAD but after the next release we should switch to a version. Better to annotate that more explicitly.
| git_override( | |
| git_override( # necessary until v0.0.3+ is available |
|
|
||
| # 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") |
There was a problem hiding this comment.
Why this version? score_tools uses 1.6.3. We are sure enough this is backwards-compatible?
|
Documentation preview for this pull request is available at: |
There was a problem hiding this comment.
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
Open (5)
What changed in this PR
Adopts score_pytest from score_tools, replacing the repository-local implementation.
Changes:
- Adds the
score_toolsBazel 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 |
| docutils==0.22.4 \ | ||
| --hash=sha256:4db53b1fde9abecbb74d91230d32ab626d94f6badfc575d6db9194a49df29968 \ | ||
| --hash=sha256:d0013f540772d1420576855455d050a2180186c91c15779301ac2ccb3eeb68de |


📌 Description
Adopting the pytest from tools, reducing complexity in Docs-AS-Code
🚨 Impact Analysis
✅ Checklist