Contributingยค
Quick Navigation
- :material-file-tree: Project Structure
- :material-book-open: Documentation Guidelines
- :material-palette: Admonitions Guide
- :material-workflow: Review Process
๐ Project Structureยค
The PANTHER project is organized into the following key directories:
experiment-config/ # Experiments configurations files
tests/ # Unit tests
outputs/ # Experiment results and logs
panther/
โโโ config/ # Configuration files and schemas
โโโ core/ # Core experiment logic
โโโ plugins/ # Plugin implementations for protocols, environments, etc.
โโโโโ services/ # Protocol implementations
โโโโโโโ iut/ # Protocol-specific implementations
โโโโโโโโโโโ quic/ # QUIC protocol implementations
โโโโโโโโโโโโโ picoquic/ # Picoquic implementation
โโโโโโโโโโโโโ ...
โโโโโโโโโโโ minip/ # MiniP protocol implementations
โโโโโโโโโโโ ...
โโโโโโโ testers/ # Testers for protocol implementations
โโโโโโโโโโโ panther_ivy/ # Ivy tester implementation
โโโโโ environments/ # Environment configurations
โโโโโโโ network_environment/ # Network environment configurations
โโโโโโโโโโโ docker_compose/ # Docker Compose configurations
โโโโโโโโโโโ shadow_ns/ # Shadow NS configurations
โโโโโโโโโโโ localhost_single_container/ # Localhost single container configurations
โโโโโโโ execution_environment/ # Execution environment configurations
โโโโโโโโโโโ strace/ # Strace configurations
โโโโโโโโโโโ gperf_heap/ # Gperf Heap profiling configurations
โโโโโโโโโโโ gperf_cpu/ # Gperf CPU profiling configurations
โโโโโ protocols/ # Protocol definitions
โโโ __main__.py # Command-line interface for PANTHER
Contributing to PANTHER Documentationยค
This guide provides standards and procedures for contributing to PANTHER documentation.
Documentation Principlesยค
- Accuracy: All documentation must reflect the current codebase.
- Verifiability: Technical statements should include source references.
- Structure: Follow the established hierarchical organization.
- Conciseness: Top-level documents should be โค 300 lines.
- Clarity: Write in clear, accessible language.
Documentation Structureยค
PANTHER's documentation is organized into several categories:
- Core Documentation: Main project documents like README.md, CONTRIBUTING.md, and WORKFLOW.md
- Plugin Documentation: README.md files in each plugin directory
- API Documentation: Generated from Python docstrings
- User Guides: Step-by-step tutorials in the docs directory
- Development Guides: Technical information for contributors
All documentation should follow the established hierarchy and use relative links to reference other documents.
Adding New Documentationยค
For New Pluginsยค
Plugin Development Requirements
Before creating a new plugin, ensure you understand the plugin architecture by reading the Plugin Developer Guide. All plugins must implement the required interfaces and follow naming conventions.
- Create a README.md in your plugin directory using the plugin template.
- Add a corresponding entry in the appropriate index.md file.
- Ensure all examples are tested and functional.
For Existing Componentsยค
- Use the appropriate template from the templates directory.
- Include source references for all technical statements.
- Keep overview files concise, linking to detailed documentation.
Source Verificationยค
Include source references for technical statements using HTML comments:
PANTHER supports plugin-based architecture.
<!-- src: /panther/plugins/plugin_interface.py -->
For statements that need verification, mark them clearly:
// Use this format only during documentation development, not in final docs
The system can handle multiple concurrent test runs.
<!-- Note: This needs verification once benchmarks are complete -->
Documentation CI Pipelineยค
The documentation CI pipeline will:
- Check all links for validity
- Flag unverified statements (TODO:VERIFY)
- Validate source references against the current codebase
- Check markdown formatting compliance
Details on the CI pipeline can be found in the Documentation CI file.
Documentation Tools and Workflowยค
PANTHER provides several tools to help with documentation management:
- Documentation Update Script - update_docs.sh: All-in-one script to update documentation in the correct order
- Link Verification - verify_links.py: Validates and fixes links in Markdown files
- Cross-References - add_cross_references.py: Adds "See Also" sections to connect related docs
- MkDocs Configuration - enhance_mkdocs_config.py: Enhances the MkDocs configuration
For a complete understanding of the documentation system, refer to:
- Documentation Workflow Guide: Step-by-step guides for updating documentation
- Documentation Integration Guide: How documentation tools work together
- Documentation Link Management: How to manage and verify links
- Documentation System Enhancements: Overview of recent enhancements
Writing Styleยค
Follow the PANTHER Style Guide for detailed formatting instructions. General guidelines:
- Use active voice and present tense
- Specify language for all code blocks
- Use second person for instructions
- Include tables for parameter documentation
- Use admonitions for important information
Admonitions Usage Guideยค
PANTHER documentation uses Material for MkDocs admonitions (call-out blocks) to highlight important information. Use admonitions strategically to improve readability and user experience.
Admonition Types Referenceยค
The most commonly used admonition types in PANTHER documentation:
Type | Purpose | Use Cases |
---|---|---|
info |
General information | System requirements, platform notes |
tip |
Helpful suggestions | Best practices, recommended approaches |
note |
Additional details | Clarifications, alternative methods |
warning |
Important cautions | Prerequisites, potential issues |
danger |
Critical alerts | Failures, security issues, data loss |
example |
Demonstrations | Code samples, configurations |
Best Practicesยค
Strategic Placement Guidelines
- Maximum one admonition per screenful to avoid visual clutter
- Place admonitions before the content they relate to
- Use specific, descriptive titles rather than generic ones
- Keep admonition content concise and focused
Basic Syntaxยค
!!! type "Descriptive Title"
Content goes here with proper 4-space indentation.
Can include multiple paragraphs and code blocks.
Examplesยค
System Requirements:
!!! info "System Requirements"
**Target platform:** Linux (x86-64) with Docker >= 27
Best Practices:
!!! tip "Recommended Setup"
Using a virtual environment is highly recommended.
Critical Warnings:
!!! danger "Common Failure Points"
Most issues occur during plugin loading or container builds.
Admonitions Usage Guideยค
Admonitions are colored call-out blocks that help highlight important information in documentation. Use them strategically to improve user experience and information scannability.
Available Admonition Typesยค
Type | Purpose | Use Cases |
---|---|---|
note |
General information | Additional context, alternative methods |
tip |
Helpful suggestions | Best practices, recommended approaches |
warning |
Important cautions | Prerequisites, potential issues |
danger |
Critical warnings | Data loss risks, security concerns |
example |
Code examples | Sample configurations, usage demos |
info |
Neutral information | System requirements, version notes |
success |
Positive outcomes | Successful completion indicators |
question |
Interactive queries | User decision points |
Admonition Syntaxยค
!!! note "Optional Custom Title"
Content goes here. Maintain proper indentation (4 spaces).
You can include:
- Lists
- Code blocks
- Multiple paragraphs
Admonition Guidelinesยค
- Strategic Placement: Maximum one admonition per screenful to avoid visual clutter
- Clear Titles: Use descriptive titles when the default doesn't fit
- Proper Indentation: Content must be indented with 4 spaces
- Code Blocks: Maintain proper indentation within admonitions
Template Examplesยค
System Requirements:
!!! info "System Requirements"
**Target platform:** Linux (x86-64) with Docker >= 27
**Estimated time:** โ 30 minutes per test
Installation Tips:
!!! tip "Recommended Setup"
Using a virtual environment is highly recommended:
```bash
python -m venv .venv
source .venv/bin/activate
```
Important Warnings:
!!! warning "Prerequisites Required"
Ensure you have Docker access and at least 10GB free disk space before proceeding.
Code Examples:
!!! example "Sample Configuration"
Create `config.yaml`:
```yaml
tests:
- name: "Basic Test"
protocol: quic
```
Documentation Review Processยค
- Self-review: Ensure your documentation follows all guidelines.
- Peer review: Have another contributor review your documentation.
- Verification: Ensure all technical statements have source references.
- Integration: Update any affected index files or links.