Skip to content

Doc streamline #875

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

Merged
merged 7 commits into from
Feb 7, 2020
Merged

Doc streamline #875

merged 7 commits into from
Feb 7, 2020

Conversation

kotfu
Copy link
Member

@kotfu kotfu commented Feb 7, 2020

It used to be that to reference code in the documentation you had to do something like:

:meth:`cmd2.cmd2.Cmd.poutput`

which just looks ugly. I fixed that so you can do:

:meth:`cmd2.Cmd.poutput`

Progress for #765

kotfu and others added 7 commits February 5, 2020 22:31
- In docs/api/cmd.rst, the `cmd2.Cmd` class was defined as `cmd2.cmd2.Cmd`, which required the extraneous `cmd2` every time we referenced it. This extra `cmd2` is no longer required.
- always refer to a bare cmd2 using ``cmd2`` per our documentation conventions
# Conflicts:
#	docs/features/settings.rst
# Conflicts:
#	docs/features/settings.rst
…into doc_streamline

# Conflicts:
#	docs/features/settings.rst
@kotfu kotfu requested a review from tleonhardt as a code owner February 7, 2020 02:12
@codecov
Copy link

codecov bot commented Feb 7, 2020

Codecov Report

Merging #875 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #875      +/-   ##
==========================================
+ Coverage   97.37%   97.39%   +0.01%     
==========================================
  Files          14       14              
  Lines        3580     3602      +22     
==========================================
+ Hits         3486     3508      +22     
  Misses         94       94
Impacted Files Coverage Δ
cmd2/utils.py 97.68% <100%> (-0.01%) ⬇️
cmd2/cmd2.py 96.65% <100%> (+0.04%) ⬆️
cmd2/argparse_completer.py 100% <100%> (ø) ⬆️
cmd2/py_bridge.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf3dc16...90152df. Read the comment docs.

Copy link
Member

@tleonhardt tleonhardt left a comment

Choose a reason for hiding this comment

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

Nice work making the documentation more internally consistent and clearer.

@@ -1,9 +1,11 @@
cmd2.Cmd
========

.. autoclass:: cmd2.cmd2.Cmd
.. autoclass:: cmd2.Cmd
Copy link
Member

Choose a reason for hiding this comment

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

Not having to type cmd2.cmd2 everywhere is so much nicer. Thanks!

Python built-in print function.

2. Reference the full dotted path to the method, but only display the method
name::

The :meth:`~cmd2.cmd2.Cmd.poutput` method is similar to the Python built-in print function.
The :meth:`~cmd2.Cmd.poutput` method is similar to the Python built-in print function.
Copy link
Member

Choose a reason for hiding this comment

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

I'm just curious, what does starting with a ~ do when using :meth:? Sometimes I see the tilde and others I don't.

@@ -149,7 +149,7 @@ single or double quotes)::
(Cmd)

Automating cmd2 apps from other CLI/CLU tools
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason you are extending past the text above? (applies to next file below too)

@tleonhardt
Copy link
Member

I'm going to merge this since it looks good.

@tleonhardt tleonhardt merged commit 3c627af into master Feb 7, 2020
@tleonhardt tleonhardt deleted the doc_streamline branch February 7, 2020 04:30
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