Set up Sphinx Documentation Infrastructure
@erikrose đang làm issue này rồi.
Từ ngày 8/4/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Overview
Set up Sphinx-based documentation infrastructure for the Fastly Compute Python SDK, enabling auto-generated API documentation from docstrings. This issue focuses on getting docs to generate consistently - hosting location and styling are out of scope.
Goals
- Configure Sphinx with autodoc - Generate API docs from code
- Standardize docstring format - Convert all docstrings to Sphinx RST style (
:param:,:returns:,:raises:) - Build infrastructure - Add
make docsand CI validation - Fix inconsistencies - Some modules use Google style (
Args:), others use RST style
Out of Scope:
- Documentation hosting platform (Read the Docs, GitHub Pages, etc.)
- Documentation styling/theming
- Hosting deployment configuration
Current State
Inconsistent docstring formats:
- ✅
config_store.py,erl.py- Use Sphinx RST style (:param:,:raises:,Example::) - ❌
requests/__init__.py- Uses Google style (Args:,Raises:,Note:) - ❌ Test files - Mixed styles
RST format example (preferred):
def get(self, key: str, default: str | None = None) -> str | None:
"""Get a configuration value.
:param key: The configuration key
:param default: Default value if key not found
:return: Configuration value or default if not found
:raises ~fastly_compute.exceptions.types.error.InvalidArgument: If the key is invalid
Example::
config = ConfigStore.open("app-config")
api_url = config.get("api_url", "https://api.example.com")
"""
Tasks
-
Sphinx Setup
- Install Sphinx and autodoc extension
- Create
docs/directory withconf.py,index.rst - Configure autodoc to generate API reference from
fastly_compute/modules - Add intersphinx for cross-references to Python stdlib
-
Standardize Docstrings
- Convert
requests/module docstrings from Google style to RST style - Audit all other modules for consistency
- Update any remaining Google-style docstrings to RST format
- Use full exception paths in
:raises:(e.g.,~fastly_compute.exceptions.types.error.InvalidArgument)
- Convert
-
Build Process
- Add
make docstarget to build HTML documentation - Configure Sphinx to fail on warnings (ensure all docstrings are valid RST)
- Add CI check to validate docs build successfully
- Add
-
Documentation Standards Guide
- Document the RST format convention in contributing guide
- Provide examples for common patterns (module docstrings, class docstrings, method docstrings)
- Reference
config_store.pyanderl.pyas canonical examples
Acceptance Criteria
- Sphinx generates HTML documentation without warnings
- All modules use consistent RST docstring format
-
make docsbuilds complete API reference - CI validates documentation builds successfully
- Contributing guide documents RST format requirements
Cross-SDK Comparison: Rust uses rustdoc, Go uses godoc, JS uses JSDoc/TypeScript. Python ecosystem standard is Sphinx with RST docstrings, which integrates well with IDEs and type checkers.
Reference
- Sphinx Documentation
- Read the Docs
- Existing docstring examples in
fastly_compute/config_store.pyandfastly_compute/erl.py
- Ngôn ngữ chính
- Python
- Star
- 5
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fastly/compute-sdk-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
fastly/compute-sdk-python#116 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
fastly/compute-sdk-python#98 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
fastly/compute-sdk-python#74 ·
-
Add HTTP Downstream Metadata API Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
fastly/compute-sdk-python#61 ·
-
Add Image Optimization Support Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
fastly/compute-sdk-python#59 ·
Tất cả issue của fastly/compute-sdk-python
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stephrobert/dsoxlab#238 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sublimehq/package_control#1780 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nwg-piotr/nwg-displays#145 ·