docs: cli: Add documentation for CLI part of FPGAd#148
Draft
artiepoole wants to merge 2 commits intoartie/document_interfacesfrom
Draft
docs: cli: Add documentation for CLI part of FPGAd#148artiepoole wants to merge 2 commits intoartie/document_interfacesfrom
artiepoole wants to merge 2 commits intoartie/document_interfacesfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive Rust documentation (docstrings) to the CLI component of FPGAd, making the codebase more maintainable and accessible to developers.
Changes:
- Added module-level and function-level documentation throughout the CLI codebase
- Removed non-existent
get_platform_namemethod from the status proxy interface - Fixed
sanitize_path_strto return aResultinstead of panicking on path resolution failures
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/src/status.rs | Added comprehensive documentation for status query functions including device state, platform types, and overlay information |
| cli/src/set.rs | Added documentation for FPGA attribute setting functionality and command handler |
| cli/src/remove.rs | Added documentation for overlay and bitstream removal operations |
| cli/src/proxies/status_proxy.rs | Added documentation for DBus status interface methods and removed non-existent get_platform_name method |
| cli/src/proxies/mod.rs | Added module-level documentation explaining the DBus proxy architecture |
| cli/src/proxies/control_proxy.rs | Added documentation for DBus control interface methods including bitstream loading and overlay management |
| cli/src/main.rs | Added top-level documentation with common concepts section explaining device handles, overlay handles, and error handling patterns |
| cli/src/load.rs | Added documentation for loading operations and fixed sanitize_path_str to properly handle path resolution errors |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
001157a to
a0c1a68
Compare
21568cc to
7aedcec
Compare
a0c1a68 to
0278039
Compare
7aedcec to
ee50b5a
Compare
- main - load - remove - set - status Signed-off-by: Artie Poole <stuart.poole@canonical.com>
Signed-off-by: Artie Poole <stuart.poole@canonical.com>
ee50b5a to
aa2a21e
Compare
0278039 to
7bcdfc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR primarily adds docstrings to all files in the CLI part of FPGAd.
In doing so, two other changes were made:get_platform_namewas removed from the status_proxy.rs file - it doesn't exist in FPGAd.sanitize_path_str was fixed such that it will not panic if the path doesn't exist (absolute path was none).edit: these were moved into #150