Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rustdos and intra-doc links to media.rs #144

Merged
merged 8 commits into from
Nov 19, 2024
Merged

Conversation

John15321
Copy link
Member

@John15321 John15321 commented Nov 13, 2024

This PR adds comprehensive Rustdoc comments to the media.rs module, including descriptions and examples for all structs, functions, and constants. It also introduces intra-doc links for easier navigation. The module-level documentation has been enhanced to provide a clear overview and usage examples. Due to the current lack of mocking, some functions remain testless, but this will be addressed in a later PR.

@John15321
Copy link
Member Author

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Collaborator

@dongsupark dongsupark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for creating the PR.

See below:

libazureinit/src/media.rs Outdated Show resolved Hide resolved
@John15321 John15321 changed the title DRAFT: Adding rustdocs for public functions of libazureinit in media module (#127) Add rustdos and intra-doc links to media.rs Nov 18, 2024
@John15321 John15321 marked this pull request as ready for review November 18, 2024 16:43
Copy link
Collaborator

@dongsupark dongsupark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general it looks good to me.

See below:

libazureinit/src/media.rs Outdated Show resolved Hide resolved
//! - [`mount_parse_ovf_env`]: A function to mount a media device, read its OVF environment data, and return the parsed data.
//! - [`get_mount_device`]: A function to retrieve a list of mounted devices with CDROM-type filesystems.
//!
//! [`Media`]: struct.Media.html
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the OVF link above

[`OVF`]: https://www.dmtf.org/standards/ovf

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, please check :)

Copy link
Collaborator

@dongsupark dongsupark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

One minor note:
In general it is better to start working on your local branch, not with main, but with a different name. That makes reviewers easier to check out your changes to their local repos, for their own testing. If you create a PR from main, then reviewers would need to do something like git checkout -B john15321-rustdocs john15321/main to check out, which is confusing.

@dongsupark dongsupark merged commit 25d23f7 into Azure:main Nov 19, 2024
5 checks passed
peytonr18 pushed a commit that referenced this pull request Nov 21, 2024
* Add rustdocs to basic structs

* add rustdoc for get_mount_devices

* Add rustdocs for parse_ovf_env and read_ovf_env_to_string

* Add some more rustdocs and tests

* Fixes

* Add module level rustdoc

* Update libazureinit/src/media.rs

* Add more links

Co-authored-by: Dongsu Park <dpark@linux.microsoft.com>
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.

2 participants