-
Notifications
You must be signed in to change notification settings - Fork 64
Adds introductory example #197
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
Adds introductory example #197
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the examples, that's nice and I'll gladly include them once ready. I appreciate the way that they are in line with the rest of the code as I would not want to install public executables onto users systems.
What would be nice is also examples in the documentation using odoc. That way users would see the examples on ocaml.org in the documentation, which is probably more approachable than the source repository.
Thanks. I've fixed the issues. You idea about examples in the documentation sounds good too for the future. |
Cool. Can you fix the remaining CI failures? It seems like it's only missing reformatting. |
Can you fix the remaining formatting failures? I tried pushing the fixes to your branch directly, but don't have permission to do so. |
The commit I pushed a couple of hours ago 4165aca is still waiting for CI to report. I'm hoping the fact I used a more modern version of ocamlformat than your |
The formatting linter has already finished and while the ocamlformat version hasn't been a problem, the The easiest way to get everything formatted correctly is just calling |
Merged. Thanks for your contribution! |
Hello!
This pull request adds an introductory example to YoJSON. This is part of a pilot programme funded by the OCaml Software Foundation.
Many OCaml libraries have no examples, or perfunctory examples only. This makes it difficult to get started with a library, particularly if it has an elaborate interface. A working example, no matter how small, can help a newcomer get started quickly. One day, it would be nice to have an example for every Opam package.
For now, examples begin in the OCaml Nursery, here: https://github.com/johnwhitington/ocaml-nursery (you can read in the README there about the principles behind these examples.) Then, if package authors agree, they are promoted to upstream source. The hope is that this will mean they are more likely to be kept up to date with the library.
The examples are usually, included in a separate directory, within a separate Dune workspace. And so they are intended to be used after installation of the library. However, in this case, I have followed the pattern of the existing examples.
As well as considering accepting this pull request, please do give any comments you have on this programme.