Make docs.bzl tests easier to understand and extend

Đang mở
#965 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@MaximilianSoerenPollak đang làm issue này rồi.

Từ ngày 23/11/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
documentation, testing-qa

Hướng nghiên cứu

Start with the docs_bzl test suite: the scenario directories with _expected/ golden samples, each scenario's BUILD and source documents, the central catalog that maps golden cases to Bazel targets, and the harness code that overwrites samples on mismatch. The reference_integration scenario is the representative composition to map. Done means a guide that explains when to use golden samples versus explicit assertions and when to extend the reference integration versus add a focused scenario, plus a clearer mapping of existing tests to the requirements they protect.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem statement

Overview

It is hard to tell what the docs_bzl tests cover or where to add a new test. Developers have to inspect several files and understand the test harness to work out what a test is meant to protect. We need clear test names and guidance on when to compare output with saved expected files (golden samples), when to write explicit assertions, and where new test cases belong.

Details

The docs_bzl tests cover important behavior, but it is difficult to determine which test protects which requirement and how to add new coverage.

The suite combines explicit Python assertions with golden samples stored in scenario _expected/ directories. Their relationship is unclear: which behavior is covered by the golden samples, which requires explicit assertions, and when should a new test use either approach?

Golden cases are discovered automatically from _expected/ and mapped to Bazel targets through a central catalog. Understanding what they actually protect requires inspecting the scenario’s BUILD, source documents, expected files, and harness code. The resulting test names identify a scenario and output rather than a behavioral expectation. When output differs, the test overwrites the golden samples and fails; reviewing that change requires understanding which differences matter to the scenario’s purpose.

Explicit tests introduce further difficulty:

  • Some check several distinct behaviors under one name.
  • Authors need to know internal Bazel targets, output paths, and helper conventions.
  • Failure assertions vary; some only establish that a build failed, without checking the reason.

reference_integration intentionally approximates the S-CORE setup, including platform requirements, legacy and modern modules, and nested components. This representative composition is valuable and should remain covered; its purpose and the expectations attached to it need to be easier to understand.

Desired outcome

Developers should be able to identify existing coverage and add tests without reverse-engineering the harness. This includes clear guidance on using and reviewing _expected golden samples, writing explicit assertions, and choosing between extending the reference integration and adding a focused scenario.

Ngôn ngữ chính
Python
Star
11
Fork
39
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
65

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-score/docs-as-code

Tất cả issue của eclipse-score/docs-as-code

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.