Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Fix some v2.0.0 docs #82

Merged
merged 5 commits into from
Jun 14, 2018
Merged

Conversation

Kyle-Verhoog
Copy link
Contributor

@Kyle-Verhoog Kyle-Verhoog commented May 17, 2018

Building (and reading through) the documentation revealed a number of issues:

...opentracing.Tracer.start_active_span:8: WARNING: Definition list ends without a blank line; unexpected unindent.
...opentracing.Tracer.start_active_span:16: WARNING: Block quote ends without a blank line; unexpected unindent.
...opentracing.Tracer.start_active_span:18: WARNING: Definition list ends without a blank line; unexpected unindent.
../CHANGELOG.rst:30: WARNING: Inline strong start-string without end-string.
../CHANGELOG.rst:118: WARNING: Bullet list ends without a blank line; unexpected unindent.
...
copying static files... WARNING: html_static_path entry u'/Users/kyle.verhoog/dev/ot-py-kyle/docs/_static' does not exist
...
build succeeded, 6 warnings.

This PR fixes these warnings.

This PR also attempts to:

  • Use :meth:, :attr:, :class: and :exc: where possible to make navigating the docs much easier.
  • Convert mentions of instances of classes to lower case
  • Use single backticks for argument names
  • Use double backticks for inline code and operators
  • Add argument types

@palazzem

@palazzem
Copy link
Member

@carlosalberto it's mostly cosmetic and fixing the warnings. I think it can go in before having conflicts with newer PRs?

@@ -108,7 +108,7 @@ def start_active_span(self,
:param finish_on_close: whether span should automatically be finished
when `Scope#close()` is called.

:return: a `Scope`, already registered via the `ScopeManager`.
:return: a `Scope`, already registered via the `ScopeManager`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Double backquotes maybe?

@@ -57,7 +57,7 @@ def active_span(self):
Tracer.scope_manager.active.span, and None will be returned if
Scope.span is None.

:return: returns the active Span.
:return: the active Span.
Copy link
Contributor

Choose a reason for hiding this comment

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

Backquote(s) here maybe, too?

@carlosalberto
Copy link
Contributor

@palazzem Oh, definitely.

@Kyle-Verhoog thanks for the patch. Left a pair of comments for you ;) Thank you so much for jumping in with the docs effort!

@Kyle-Verhoog
Copy link
Contributor Author

@carlosalberto this should be good to go 😄

@carlosalberto
Copy link
Contributor

Hey @Kyle-Verhoog thanks a lot for the iteration ;)

I was wondering, as a general doubt/idea, whether we should use :class: for Span and other members (and the same for functions).

I say this because, upon rendering your effort (through make docs), I realized that Span and ScopeManager.activate() show up using different styles, which can look a little bit strange (I went and check other Python libraries and saw they use the same style for classes/functions/methods/properties).

What do you know? Do you have an opinion on this? Thanks a lot and let me know ;)

@Kyle-Verhoog
Copy link
Contributor Author

@carlosalberto yeah it crossed my mind as I was making some of the fixes (whether or not to just do all of the formatting). I decided just to fix up the ones I came across, but maybe this is a good opportunity to just format all the things?

I think it might be overkill to format all the Span references unless it is referring to the actual class specifically then we could use :class:. I see in the Sphinx documentation that they don't format every occurrence of a class or instance of a class.

I personally don't have any strong opinions as long as things are consistent (which they currently aren't). 😄

I can go ahead and format all the things if we want to do that in this PR.

@carlosalberto
Copy link
Contributor

Hey @Kyle-Verhoog Thanks for the answer. I'd go for the formatting in case you have time - else, we can merge this PR (as this is definitely an improvement). Le me know ;)

cc @yurishkuro

- use :meth: :class: :attr: and :exc: where possible
- convert mentions of instances of classes to lowercase
- add argument types
- use double backtick for inline code and operators
@Kyle-Verhoog
Copy link
Contributor Author

@carlosalberto I went ahead and tried to make everything consistent. Let me know what you think.

@carlosalberto
Copy link
Contributor

@Kyle-Verhoog I have to say I didn't expect to have 'Span' and other instances changed from the current form to 'span' and similar (I had expected ':class:Span', at least to separate the style).

Maybe @yurishkuro can give his opinion on this? ;)

@carlosalberto
Copy link
Contributor

@palazzem Hey, what's your take on this, btw? Hopefully we can get this going to get closer to the actual release ;)

@carlosalberto
Copy link
Contributor

@Kyle-Verhoog sorry for the late feedback - busy times here...

Anyway, I think the best would be merge your changes, but without the last commit - sorry for making you lose time on that last iteration :(

Let us know and we will merge this PR prior to the long delayed release ;)

@Kyle-Verhoog
Copy link
Contributor Author

@carlosalberto sure, whatever you think works best.

To make the case for my changes: I found that, for example, "Span" / "Span" to just be a bit too cumbersome and out of place to both read and mark-up whenever referring to a span instance. Especially with the type annotations in place, it's usually quite easy to navigate to the doc section for the class for an instance.

Eg:
screen shot 2018-06-08 at 2 49 16 pm

But I understand if this opinion is not shared. In hindsight it would have been good to break off those change into another commit.. 😛

@carlosalberto
Copy link
Contributor

Hey @Kyle-Verhoog thanks for the explanation.

So I was trying to follow the pattern I had seen in requests: http://docs.python-requests.org/en/master/api/#main-interface

captura de pantalla 2018-06-08 a la s 21 06 25

But I'd say we don't need to have a link per each Span and others though ;)

@carlosalberto carlosalberto mentioned this pull request Jun 8, 2018
@Kyle-Verhoog
Copy link
Contributor Author

Kyle-Verhoog commented Jun 8, 2018

@carlosalberto ah, I see. I can revert my changes on the lower-casing and follow a similar style to the requests library.

I'd rather see some of the work in that last commit kept since a bunch of type annotations were also added, along with some other improvements.

I'm fine with whatever you decide. Let me know if I should go ahead with those changes, I can get those done today still! 😄

@carlosalberto
Copy link
Contributor

Hey @Kyle-Verhoog sorry for not answering before.

I can revert my changes on the lower-casing and follow a similar style to the requests library.

Yes, if you have some time.

I'd rather see some of the work in that last commit kept since a bunch of type annotations were also added, along with some other improvements.

Oh, definitely ;)

@Kyle-Verhoog
Copy link
Contributor Author

@carlosalberto let me know what you think!

@carlosalberto
Copy link
Contributor

Oh, lovely, thanks a lot @Kyle-Verhoog !

Unless @yurishkuro disagrees, I think we should merge this soon ;)

@yurishkuro
Copy link
Member

:shipit:

@palazzem
Copy link
Member

@carlosalberto all good from my side! Thank you very much @Kyle-Verhoog!

@carlosalberto carlosalberto merged commit cb3eb7b into opentracing:v2.0.0 Jun 14, 2018
@carlosalberto
Copy link
Contributor

Merged, thanks ;)

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

Successfully merging this pull request may close these issues.

None yet

4 participants