DOC: Combine the modern and classic ReST files into a single file

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

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

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

Đá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
35/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với các tệp ReST hiện đại và cổ điển riêng biệt cho các mô-đun plotting, sử dụng #8487 làm ví dụ cho cách tiếp cận được đề xuất. Xem xét chỉ thị tab của sphinx-design và xác định các tệp tương ứng có thể được kết hợp. Được xem là hoàn tất khi mỗi mô-đun có một tệp tài liệu duy nhất, các tùy chọn chỉ dành cho classic được đánh dấu rõ ràng và các ví dụ modern/classic có thể được truy cập thông qua các tab.

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

Mô tả

discussion

For almost all plotting modules, we usually have two separate ReST files for modern and classic modes, respectively. For example, we have image.rst and psimage.rst and gmtlogo.rst and gmtlogo-classic.rst.

More ReST files usually mean more maintenance burden, especially sometimes we may fix or update the modern mode examples in one file, but forget to update the corresponding examples in another file.

So, I guess it makes more sense to have only one documentation file for a single module. Usually, the differences of modern and classic ReST files are:

  • -K/-O/-P is only available in classic mode
  • Examples have different syntax.

For point 1, this can be addressed by emphasizing the these options are classic-mode only. For point 2, modern/classic modes can be switched using sphinx-design's tab directive (https://sphinx-design.readthedocs.io/en/furo-theme/tabs.html).

#8487 is an example PR showing how it works.

The title:

Screenshot from 2024-05-13 12-01-39

Classic-only options:

Screenshot from 2024-05-13 12-02-19

Modern-mode example:

Screenshot from 2024-05-13 12-02-55

Classic-mode examples (after clicking the "Classic mode" Tab:
Screenshot from 2024-05-13 12-03-10

Ngôn ngữ chính
C
Star
999
Fork
421
Merge trung bình
12 giờ 59 phút
Pull request đã merge (30 ngày)
58

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 GenericMappingTools/gmt

Tất cả issue của GenericMappingTools/gmt

Issue tương tự

Thêm issue về C

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.