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 doc coverage (#44) #84

Merged
merged 13 commits into from
Sep 16, 2020
Merged

Conversation

lulu-berlin
Copy link
Contributor

@lulu-berlin lulu-berlin commented Aug 13, 2020

I added documentation to most public elements in sophia/, using
the method described in the issue (#44) of adding #![deny(missing_docs)]
to sophia/src/lib.rs.

2 doc comments are missing:

I don't know how to add comments to the macro-created types.

I found out that it's possible to add doc comments to macros (https://stackoverflow.com/a/33999625/4696215) and updated the relevant macros accordingly in a separate commit.

I added documentation to most public elements in `sophia/`, using
the method described in the issue (pchampin#44) of adding `#![deny(missing_docs)]`
to `sophia/src/lib.rs`.

2 doc comments are missing:
- sophia/src/parser/rio_common.rs:72:1
  sophia_api::make_scoped_triple_streaming_mode!(ScopedRioSourceTriple, RioSourceTriple);
- sophia/src/parser/rio_common.rs:112:1
  sophia_api::make_scoped_quad_streaming_mode!(ScopedRioSourceQuad, RioSourceQuad);

I don't know how to add comments to the macro-created types.
I adapted the macros `make_scoped_triple_streaming_mode` and
`make_scoped_quad_streaming_mode` to pass through attributes to
the generated `struct`.

A doc comment is reresented as `#[doc="..."]`.

I learned this trick from https://stackoverflow.com/a/33999625/4696215
@lulu-berlin
Copy link
Contributor Author

I have added the last missing doc comments in the sophia crate and now the travis build is green :)

This pull request is now ready to be reviewed. @pchampin

- parser::xml
- parser::xml_legacy
Copy link
Owner

@pchampin pchampin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from a few things that I would rather rephrase (see comments), this is great. Thanks a lot.

sophia/src/dataset/indexed.rs Outdated Show resolved Hide resolved
sophia/src/dataset/inmem/_ogps_wrapper.rs Outdated Show resolved Hide resolved
sophia/src/graph/indexed.rs Outdated Show resolved Hide resolved
sophia/src/parser/gtrig.rs Outdated Show resolved Hide resolved
sophia/src/parser/rio_common.rs Outdated Show resolved Hide resolved
sophia/src/parser/trig.rs Outdated Show resolved Hide resolved
sophia/src/parser/turtle.rs Outdated Show resolved Hide resolved
sophia/src/parser/turtle.rs Outdated Show resolved Hide resolved
sophia/src/parser/xml.rs Outdated Show resolved Hide resolved
sophia/src/parser/xml_legacy.rs Outdated Show resolved Hide resolved
lulu-berlin and others added 10 commits August 28, 2020 22:36
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
Co-authored-by: Pierre-Antoine Champin <github-100614@champin.net>
@pchampin pchampin merged commit 823be86 into pchampin:master Sep 16, 2020
@pchampin
Copy link
Owner

Finally found a moment to merge this! Thanks again @YEver

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

Successfully merging this pull request may close these issues.

2 participants