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

SDK docs #172

Merged
merged 15 commits into from
Feb 4, 2025
Merged

SDK docs #172

merged 15 commits into from
Feb 4, 2025

Conversation

gasmith
Copy link
Contributor

@gasmith gasmith commented Feb 3, 2025

I made only small changes to existing wording, because it was well done. I added docs for types missing docs, hid types that are public for technical reasons, and renamed TypedMessage trait to Encode after discussing with Greg.

This doesn't fix the problem of having no readme. I'm not sure if we should repeat the crate docs, or just part of them, or put something else there.

@gasmith gasmith self-assigned this Feb 3, 2025
Copy link
Member

@jtbandes jtbandes left a comment

Choose a reason for hiding this comment

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

Please also see my feedback from https://github.com/foxglove/foxglove-sdk-old/pull/65#pullrequestreview-2587986589 (looks like maybe some parts have been addressed already)

@gasmith
Copy link
Contributor Author

gasmith commented Feb 3, 2025

Yep! I was working off those comments. This is actually a WIP (and ought to be marked as such). I was just using this PR branch to hand off to @eloff.

@gasmith gasmith changed the title SDK readme [WIP] SDK readme Feb 3, 2025
@eloff eloff changed the title [WIP] SDK readme SDK docs Feb 3, 2025
rust/foxglove/src/lib.rs Outdated Show resolved Hide resolved
rust/foxglove/src/metadata.rs Outdated Show resolved Hide resolved
rust/foxglove/src/schemas.rs Outdated Show resolved Hide resolved
fn encoded_len(&self) -> Option<usize> {
None
}
}

impl<T: Serialize + JsonSchema> TypedMessage for T {
/// Automatically implements [`Encode`] for any type that implements [`Serialize`] and [`JsonSchema`].
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still not sure why rustdoc can't figure out the linkage on JsonSchema.

Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't figure it out either, just going to add links manually

rust/foxglove/src/lib.rs Outdated Show resolved Hide resolved
rust/foxglove/src/log_sink.rs Outdated Show resolved Hide resolved
rust/foxglove/src/channel.rs Outdated Show resolved Hide resolved
rust/foxglove/src/channel_builder.rs Outdated Show resolved Hide resolved
rust/foxglove/src/channel_builder.rs Show resolved Hide resolved
rust/foxglove/src/channel.rs Show resolved Hide resolved
rust/foxglove/src/channel.rs Outdated Show resolved Hide resolved
rust/foxglove/src/typed_channel.rs Outdated Show resolved Hide resolved
rust/foxglove/src/channel.rs Outdated Show resolved Hide resolved
rust/foxglove/src/lib.rs Outdated Show resolved Hide resolved
pub mod websocket;
mod websocket_server;

pub use channel::{Channel, Schema};
pub use channel_builder::ChannelBuilder;
pub use encode::{Encode, TypedChannel};
#[doc(hidden)]
pub use log_context::{GlobalContextTest, LogContext};
pub use log_sink::LogSink;
pub use mcap_writer::{McapWriter, McapWriterHandle};
pub use metadata::{Metadata, PartialMetadata};
pub use time::nanoseconds_since_epoch;
Copy link
Contributor Author

@gasmith gasmith Feb 4, 2025

Choose a reason for hiding this comment

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

I think we should remove time::nanoseconds_since_epoch from the public API - not our core line of business.

Copy link
Contributor

@eloff eloff Feb 4, 2025

Choose a reason for hiding this comment

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

Edit, I thought you were talking about GlobalContextTest. Yeah we can remove nanoseconds_since_epoch.

It's useful if they want to set timestamps themselves, but it's also not complicated for them to replicate.

rust/foxglove/src/log_sink.rs Outdated Show resolved Hide resolved
@eloff eloff marked this pull request as ready for review February 4, 2025 00:45
@gasmith gasmith requested review from bryfox and jtbandes February 4, 2025 00:47
Copy link
Contributor Author

@gasmith gasmith left a comment

Choose a reason for hiding this comment

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

I guess I can't approve this PR, since I opened it, but you've got my stamp of approval. We should get feedback from Bryan & Jacob as well.

@eloff eloff self-requested a review February 4, 2025 00:48
Copy link
Contributor

@eloff eloff left a comment

Choose a reason for hiding this comment

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

Approved my own PR (ok, well Greg did sign off on it)

@eloff eloff merged commit 94f1ccc into main Feb 4, 2025
26 checks passed
@eloff eloff deleted the gasmith/sdk-readme branch February 4, 2025 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants