You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking at some of those examples directories in Rust projects and it occurred to me that Kotlin libraries do that as well. After asking ChatGPT, it appears that Swift libraries also sometimes include those types of directories (they call them Samples instead? to be confirmed).
I wonder if this might be a better way to showcase how to use the library than the tests. Our current tests basically do work as examples and it's very much how we use them (they're full of print statements and complete workflows rather than simple tests of APIs).
Just a thought. We could also of course run the examples as part of our CI runs.
The text was updated successfully, but these errors were encountered:
I think its a great idea to have examples. Having examples also gives room to explain what we are trying to show (via comments) and gives a direct place for a user to go and look at how to use stuff.
Call me Flintstone, but tests aren't the first place I go to to check out how to use a lib.
thunderbiscuit
changed the title
Consider creating examples and Samples directories for JVM and Swift libraries
Consider creating examples directories for JVM and Swift libraries
Jun 25, 2024
I was looking at some of those examples directories in Rust projects and it occurred to me that Kotlin libraries do that as well. After asking ChatGPT, it appears that Swift libraries also sometimes include those types of directories (they call them
Samples
instead? to be confirmed).I wonder if this might be a better way to showcase how to use the library than the tests. Our current tests basically do work as examples and it's very much how we use them (they're full of print statements and complete workflows rather than simple tests of APIs).
Just a thought. We could also of course run the examples as part of our CI runs.
The text was updated successfully, but these errors were encountered: