Skip to content

Conversation

@artiepoole
Copy link
Contributor

@artiepoole artiepoole commented Jan 8, 2026

The documentation is in: daemon/src/comm/dbus/README.md

I also

  • standardised the name for the platform string variable to platform_string, replacing usages of platform_compat_str
  • removed 2 unused imports from cli/main.rs (clap's arg and command) to pass code formatting checks

…_str

The use of platform_compat_str and platform_string was inconsistent, and
not very critical, so I have chosen to use platform_string everywhere

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
@github-actions github-actions bot added the cli label Jan 8, 2026
@artiepoole artiepoole linked an issue Jan 8, 2026 that may be closed by this pull request
@artiepoole artiepoole added documentation Improvements or additions to documentation comm dbus labels Jan 8, 2026
@artiepoole artiepoole assigned artiepoole and unassigned artiepoole Jan 8, 2026
necessary to pass inspection after updating clippy

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
@artiepoole artiepoole force-pushed the artie/document_interfaces branch 2 times, most recently from 30b70d4 to d89f332 Compare January 8, 2026 17:28
@artiepoole artiepoole requested a review from hkhonming January 8, 2026 17:29
@artiepoole artiepoole marked this pull request as ready for review January 15, 2026 10:17
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we could add all these documentation as rust docstring to the relevant places/functions etc. and then use rust docs to refer in readme which would have better interface and would be easier to maintain since the doc would reside with code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's actually a very good idea.

Can we host the docs here in the repo, and build them on merge or something (automation)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can and actually if we publish this to cargo it will automatically have docs.rs page for us

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I registered the name for fpgad in cargo gonna add you as owner as well let me check

@artiepoole artiepoole force-pushed the artie/document_interfaces branch from d89f332 to 1654535 Compare January 19, 2026 18:12
@github-actions github-actions bot added the root label Jan 19, 2026
@github-actions github-actions bot requested a review from talhaHavadar January 19, 2026 18:12
@artiepoole
Copy link
Contributor Author

artiepoole commented Jan 19, 2026

I have documented the code as suggested. I removed the original API readme. I also discovered an issue - we were writing out the requested data after writing it in fs_write_bytes - this is not good practice so I stopped this. I think we should also not do this in fs_write either. (it's great for debugging, sure, but "n_bytes" or just "succeeded" is better.
Let me know what you think. here

As for the documentation - check out my branch and run cargo doc et voila!

documentation added for:
- helper functions
- StatusInterface
- ControlInterface

Documentation added at
- top level
- class level
- function level

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
these are messy, and also could leak secure information

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
Signed-off-by: Artie Poole <stuart.poole@canonical.com>
Signed-off-by: Artie Poole <stuart.poole@canonical.com>
the hex value is returned as undecorated ascii (no 0x prefix)

Signed-off-by: Artie Poole <stuart.poole@canonical.com>
Signed-off-by: Artie Poole <stuart.poole@canonical.com>
@artiepoole artiepoole force-pushed the artie/document_interfaces branch from 1654535 to d7a5734 Compare January 19, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli documentation Improvements or additions to documentation root

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: interfaces are not documented

3 participants