[CI]: Consider/Discuss Tools for Verifying Fenced Code in Markdown Documents

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
markdown, python
Lĩnh vực
ci-cd, documentation, testing

Hướng nghiên cứu

Bắt đầu bằng việc xem xét introduction.md, about.md và instruction.md, sau đó so sánh doctest, mkcodes và pmdoctest với các fenced Python examples tương ứng. Xác định chiến lược nào xử lý các fence được ghi lại trong tài liệu và việc tích hợp CI sẽ kiểm tra chúng như thế nào; được xem là hoàn thành khi đã thống nhất một công cụ và quy trình đánh giá.

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

Mô tả

discussion 💬

This came up in discussing PR #2838, so opening an issue here for longer discussion/evaluation.

We currently "hand validate" example python code used in introduction.md, about.md, and instruction.md and similar documents. This leads to errors where certain code will not work in the REPL, or syntax or other errors get made and published. As we scale up exercises, this doesn't feel like a sustainable solution, hence this issue to propose, evaluate, and track possible tools and strategies for verifying code , and (possibly) adding that verification to the track CI.

Below are three applicable libraries, but I'd warmly welcome more. Of the three below, pmdoctest feels like the nicest solution, and I've run the comparisons concept exercise through it with reasonable results. But I'd like to see if there are other strategies/libraries out there.

doctest - this is the old-school original, but doesn't really work well in markdown fences.
mkcodes - have not tried this yet.
pmdoctest - reasonably good, but requires some weird quirks with code fence language names and or excess >>> in code fences to make parsing work.

Ngôn ngữ chính
Python
Star
2.5k
Fork
1.5k
Merge trung bình
2 ngày 17 giờ
Pull request đã merge (30 ngày)
2

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

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 exercism/python

Tất cả issue của exercism/python

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.