ozankasikci / rust-music-theory

A music theory guide written in Rust.
MIT License
626 stars 28 forks source link

Add documentation #9

Closed Kestrer closed 4 years ago

Kestrer commented 4 years ago

This PR documents everything and adds #![warn(missing_docs)] to ensure that everything is documented.

I also ran rustfmt on the code and introduced a couple useful additions such as implementing FromStr for PitchClass, adding Mode::is_diatonic, and implementing From<Mode> for ScaleType.

Kestrer commented 4 years ago

I apologise, I'm not very familiar with this code coverage thing. I haven't actually written any additional code but it says that it isn't covered. Please could you edit my PR to fix this?

ozankasikci commented 4 years ago

I apologise, I'm not very familiar with this code coverage thing. I haven't actually written any additional code but it says that it isn't covered. Please could you edit my PR to fix this?

No worries, thanks for the contribution!

You've actually added a few small methods to Mode and PitchClass, they are not covered bystanders unit tests. If you could write tests for those would be appreciated, otherwise i can add the tests.

Kestrer commented 4 years ago

I've removed all the superfluous doc comments and added tests for the new additions, which all pass.

ozankasikci commented 4 years ago

Awesome! thank you 👍