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

Improve some documentation and start testing our documentation examples #421

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

michaelherold
Copy link
Member

We have two major problems with our documentation:

  1. It is incomplete. Before this PR, we only had 52.52% of the codebase documented at all. This brings us up to 63.03%.
  2. We have examples in the documentation that are wrong, which causes confusion for our users. To address this, I added yard-doctest to help us test our examples to make sure they actually work.

Related to #325, I chose YARD as the de facto documentation format. I like YARD because there are a lot of tools built around it and it is more precise in its language that TomDoc and RDoc.

I would like to see us get much closer to 100% documentation coverage.

To test all of our documentation examples, you can now run:

    $ bundle exec yard doctest

There are a few problems in the library that are causing issues with the
Coercion specs, so those are disabled for now. I'm going to see if I can
figure out the problem and fix it so we don't have to skip those tests.
@michaelherold michaelherold self-assigned this Jul 17, 2017
@michaelherold
Copy link
Member Author

Things I want to add for doc testing:

  1. Integrate it into the default Rake task so it runs on Travis. The current Rake task in the library doesn't work so I couldn't add it.
  2. Integrate it into Guard so documentation examples are tested when a file is modified.

@dangerpr-bot
Copy link

1 Warning
⚠️ Unless you’re refactoring existing code, please update CHANGELOG.md.

Here's an example of a CHANGELOG.md entry:

* [#421](https://github.com/intridea/hashie/pull/421): Improve some documentation and start testing our documentation examples - [@michaelherold](https://github.com/michaelherold).

Generated by 🚫 Danger

@dblock
Copy link
Member

dblock commented Jul 17, 2017

This is great. Can we also have something publish the doc (versioned) on github gh-pages? Maybe part of the release or build?

@michaelherold
Copy link
Member Author

That would be a great long-term plan. I think the way the dry-rb project does it is interesting.

@dblock
Copy link
Member

dblock commented Apr 10, 2020

I think we still want this @michaelherold. Need help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants