Skip to content

docs: Fix warnings and update CLI documentation#60

Merged
eman merged 1 commit intomainfrom
docs/fix-warnings-and-update-cli-docs
Dec 27, 2025
Merged

docs: Fix warnings and update CLI documentation#60
eman merged 1 commit intomainfrom
docs/fix-warnings-and-update-cli-docs

Conversation

@eman
Copy link
Copy Markdown
Owner

@eman eman commented Dec 27, 2025

Summary

This PR fixes all documentation warnings and updates the CLI documentation to be complete and up-to-date.

Documentation Warnings Fixed

Docstring Formatting

  • Fixed field_factory.py module docstring indentation (blank line before bullet list)

Broken Cross-Reference Links

  • enumerations.rst: protocol/control_commandsprotocol/quick_reference
  • mqtt_diagnostics.rst: Fixed incorrect absolute paths to proper relative paths
    • /docs/DEVICE_STATUS_FIELDS../protocol/device_status
    • /docs/MQTT_CLIENT../python_api/mqtt_client
  • cli.rst: ../guides/mqtt_basics../guides/auto_recovery
  • models.rst: Removed non-existent constants reference

JSON Syntax Issues

  • Removed invalid [...] and ... tokens from JSON code blocks
    • cli.rst: Fixed by_day field in energy example
    • mqtt_protocol.rst: Fixed status and feature response examples

Duplicate Enum Documentation

  • Added :no-index: to 17 autoclass directives in enumerations.rst

Re-export Duplicate Warnings

  • Added custom logging filter in docs/conf.py to suppress "duplicate object description" warnings from re-exported classes

CLI Documentation Updates

New Content

  • Added device-info command documentation (was completely missing)
  • Added --raw flag documentation for status, info, and device-info commands
  • Added --month option to energy command for daily breakdown queries
  • Clarified mutually exclusive options (--months vs --month)

Improvements

  • All 19 CLI commands now have complete documentation
  • All command options are fully documented with descriptions
  • Added examples for new features

Build Results

✓ Documentation builds successfully with no critical errors
✓ All originally reported warnings are fixed
✓ Only 14 import warnings remain (missing optional CLI dependencies: click, rich)

Files Modified

  • src/nwp500/field_factory.py - Fixed docstring indentation
  • docs/conf.py - Added custom logging filter for duplicate warnings
  • docs/enumerations.rst - Added :no-index: to enum autodoc
  • docs/guides/mqtt_diagnostics.rst - Fixed broken doc links
  • docs/protocol/mqtt_protocol.rst - Fixed JSON syntax in code blocks
  • docs/python_api/cli.rst - Added device-info command, --raw flags, and --month option
  • docs/python_api/models.rst - Removed non-existent reference
  • docs/api/nwp500.rst - Auto-generated update

This commit addresses all documentation warnings and updates the CLI documentation
to be complete and up-to-date.

## Documentation Warnings Fixed

### Docstring Formatting
- Fixed field_factory.py module docstring indentation

### Broken Cross-Reference Links
- enumerations.rst: protocol/control_commands → protocol/quick_reference
- mqtt_diagnostics.rst: Fixed incorrect absolute paths to relative paths
  - /docs/DEVICE_STATUS_FIELDS → ../protocol/device_status
  - /docs/MQTT_CLIENT → ../python_api/mqtt_client
- cli.rst: ../guides/mqtt_basics → ../guides/auto_recovery
- models.rst: Removed non-existent constants reference

### JSON Syntax Issues
- Removed invalid [...] and ... tokens from JSON code blocks in:
  - cli.rst: Fixed by_day field
  - mqtt_protocol.rst: Fixed status response and feature response examples

### Duplicate Enum Documentation
- Added :no-index: to 17 autoclass directives in enumerations.rst

### Re-export Duplicate Warnings
- Added custom logging filter in docs/conf.py to suppress duplicate object
  description warnings from re-exported classes

## CLI Documentation Updates

### New Content
- Added device-info command documentation (was completely missing)
- Added --raw flag documentation for status, info, and device-info commands
- Added --month option to energy command for daily breakdown queries
- Clarified mutually exclusive options (--months vs --month)

### Improvements
- All 19 CLI commands now have complete documentation
- All command options are fully documented with descriptions
- Added examples for new features

## Build Results
- Documentation builds successfully with no critical errors
- Only 14 import warnings remain (missing optional CLI dependencies: click, rich)
- All originally reported warnings are fixed
@eman eman merged commit 419da4c into main Dec 27, 2025
7 checks passed
@eman eman deleted the docs/fix-warnings-and-update-cli-docs branch December 27, 2025 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant