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

Documentation for the Midi module #5

Open
pitag-ha opened this issue Mar 15, 2023 · 11 comments · May be fixed by #11
Open

Documentation for the Midi module #5

pitag-ha opened this issue Mar 15, 2023 · 11 comments · May be fixed by #11
Assignees
Labels
good first issue Good for newcomers

Comments

@pitag-ha
Copy link
Owner

We currently don't have a hygienic structure for cardio-crumble, yet. One thing is that we don't have interface files (i.e. mli-files) for all implementation files (i.e. ml-files). And for the mli-files we have, we don't have documentation.

As a first step to approach this, I propose to add documentation to the midi.mli-file. In OCaml, you mark documentation by (** <your documentation *). You can have a look at the mli-files of, for example, the mirage repo to see some examples for documentation in OCaml.

In general, to write API documentation, one needs to formulate the idea of what the values/types are for, as opposed to putting the implementation of the values/types into words.

@pitag-ha pitag-ha added the good first issue Good for newcomers label Mar 15, 2023
@Mojoeffect
Copy link

Okay,thanks @pitag-ha
I'll read through that of the mirage repo as you suggested for better understanding.

@AryanGodara
Copy link
Contributor

@pitag-ha Can I work on this alongside #3 (I'll learn about the codebase as I work on both together, and write the docs)

@Mojoeffect
Copy link

Hiii @pitag-ha, I'm Joy from Outreachy.
So I'm currently working with VScode text editor to add the documentation.
There are still some Ocaml syntax I'm trying to get familiar with - with the help of a textbook on Ocaml - for efficient documentation of what each value and type that was implemented actually represents.

I've also gone through the mirage repository, where I went through the key.mli file, and the argv.mli to grasp the concept of the documentation.

We currently don't have a hygienic structure for cardio-crumble, yet. One thing is that we don't have interface files (i.e. mli-files) for all implementation files (i.e. ml-files). And for the mli-files we have, we don't have documentation.

As a first step to approach this, I propose to add documentation to the midi.mli-file. In OCaml, you mark documentation by (** <your documentation *). You can have a look at the mli-files of, for example, the mirage repo to see some examples for documentation in OCaml.

In general, to write API documentation, one needs to formulate the idea of what the values/types are for, as opposed to putting the implementation of the values/types into words.

@pitag-ha
Copy link
Owner Author

As mentioned in #3, I've just assigned you @Mojoeffect, to this issue, and you, @AryanGodara to #3 to avoid duplicating work.

There are still some Ocaml syntax I'm trying to get familiar with - with the help of a textbook on Ocaml - for efficient documentation of what each value and type that was implemented actually represents.

Sounds great. Don't hesitate to ask if you're stuck with anything!

By the way, if you want, as a first step, you can skip the documentation for module Event and val error_to_string and only write documentation for the rest of Midi for now. Those two items are a bit trickier than the rest.

@kamtoeddy
Copy link
Contributor

Hi @Mojoeffect, please what's the name of the book you are using to study OCaml?

@AryanGodara
Copy link
Contributor

Hi @Mojoeffect, please what's the name of the book you are using to study OCaml?

Hey @kamtoeddy , most people are offline during the weekend I think :D
In the meantime, you can go through these 2 books (really helped me out) :-
OCaml Programming: Correct + Efficient + Beautiful
Real World OCaml 2nd Ed

@Mojoeffect
Copy link

Hi @Mojoeffect, please what's the name of the book you are using to study OCaml?

Hey, @kamtoeddy
Well, I started out with
OCaml Programming: Correct + Efficient + Beautiful

In the further reading section of every chapter of that textbook, you'll get access to other documents that will aid the learning process. It's a pretty guided way to learn Ocaml.

@kamtoeddy
Copy link
Contributor

@AryanGodara @Mojoeffect Thanks

@Mojoeffect
Copy link

Hiiiiii
So I just opened a PR #11 on this issue, and a review would be appreciated as this is my first attempt at documentation....kinda nervous. Thanks in advance!

@Mojoeffect
Copy link

@Mojoeffect Mojoeffect linked a pull request Mar 20, 2023 that will close this issue
@Mojoeffect
Copy link

File midi.mli documentation #11

Hiiii @pitag-ha @Engil
I've made the necessary corrections to the file.
I'd appreciate a feedback/review :) Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants