Commit Graph

52 Commits

Author SHA1 Message Date
Stephen Finucane 13424d1214 Fix pre-commit issues
Mostly trailing spaces.

Change-Id: I3cde0f4bc51bdeb3e82859a131f866728234c9ad
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-09-05 10:17:38 +01:00
Jiri Podivin a04a48f4f7 Removing modindex link from docs
The global module documentation is no longer being generated
and the link points to a non-existent document.

The purpose of global module documentation is now fulfilled by
the automatically generated class, and function level reference
documents which are linked properly.

As such there is no need to keep the link around, or to
reestablish module level documentation.

Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I05e5144a36f33aa5feb996964d1a098b1716cf6a
2021-11-19 13:58:06 +01:00
Stephen Finucane 117a1005dc requirements: Uncap PrettyTable
PrettyTable was capped at a < 0.8, which meant we were getting the
veritably ancient 0.7.2 release first release in April 2013 (!) [1].
The project is now being maintained as a Jazzband project [2], meaning
we should switch to this new version.

The only significant change required here is that we no longer set the
'min_width' attribute since that actually does something - the wrong
thing - now. We want this attribute to set a lower bound on the wrap
width as opposed to an absolute minimum we can use, which is what
setting the 'min_width' attribute would do.

While we're here, we also remove a now useless bit of Python 2 code and
bump cmd2 to a slightly newer version.

[1] https://pypi.org/project/prettytable/#history
[2] https://github.com/jazzband/prettytable

Change-Id: Iceac729e7a9429e8ab25c60524a48d0aaeebeb37
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: https://review.opendev.org/c/openstack/requirements/+/774917
2021-02-11 11:01:48 +00:00
xuanyandong 0d18e8812c Remove unicode from code
Change-Id: I040fccd1714dccd7a87aaf10d397ad3a3ef476d3
2021-01-28 17:00:45 +00:00
Stephen Finucane 37e53cad85 trivial: Remove references to Python 2.7
There were some in both the docs and the demo application.

Change-Id: I58d14cd3a372f9bdf617cbfbcb5ce34169ac83f8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-11-18 18:06:04 +00:00
Akihiro Motoki ab4ec34ed9 doc: Update bug tracker to storyboard
cliff now uses storyboard as the bug tracker, but the documents
have not been updated.

Change-Id: Ie2ceda088f708dee2d6dd0877087e9a5c27e928f
2020-10-23 12:47:42 +09:00
Stephen Finucane f3587efee8 Remove references to setuptools
With the advent of importlib, entry points are no long a setuptools-only
thing. Update the docs to reflect that.

Change-Id: I099f397ddb4d71879597cfe67ef2a1eff4a8d1af
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-10-22 10:30:15 +01:00
Andreas Jaeger 60ab3cdedf Switch to newer openstackdocstheme version
Switch to openstackdocstheme 2.2.1 version. Using
this version will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I50caba24ba8d458e5061cf412b8f59e3815c58f7
2020-05-31 20:32:08 +02:00
Andreas Jaeger 9724108710 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Cleanup setup.cfg, conf.py, and tox.ini from cruft.

Change-Id: Icb08c704cb5d0d8004d0a5408822c9d53ae9c728
2020-02-04 15:05:33 +01:00
Eric Fried 8e4ae2b86c Add autoprogram_cliff_app_dist_name config opt
This allows consumers to let cliff know who they are, so the
autoprogram-sphinx directive doesn't produce messages like

 This command is provided by the $me plugin.

Change-Id: I2d5a527910ddc64f83d0cba39c584b8b05a299b7
2019-11-14 12:09:22 -06:00
Zuul 6b6b1863ff Merge "Pin cmd2 back to <0.9 on all versions" 2019-09-06 19:14:41 +00:00
Monty Taylor 01ce75f5b3 Pin cmd2 back to <0.9 on all versions
cmd2 is now also broken on python3.

Change-Id: Ib72830b26aabfd8244196be562f925fd76080dd9
Depends-On: https://review.openstack.org/629269
2019-09-03 08:58:29 +00:00
Zuul b39b3276ec Merge "Remove dead files" 2019-05-05 19:27:49 +00:00
Dean Troyer ffb579b76c Updates for OpenDev transition
Change-Id: If5a40b37102d4f729c5eb5a0316f7e3857afe151
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-21 10:07:45 -05:00
Stephen Finucane a4ff48c63b Remove dead files
MANIFEST files aren't needed when using pbr, while the Makefiles have
since been replace by infra's release tooling (for release) and tox (for
docs).

Change-Id: I2a7ac86c8a9b07fe6e35be1f0ac552ef77d17bfd
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-10-19 14:40:45 +01:00
OpenStack Proposal Bot 065924ecfc Updated from global requirements
Change-Id: Ic10fe257544d9c0114a466be11588570377e2049
2018-03-15 06:49:26 +00:00
OpenStack Proposal Bot 6e7a0172cb Updated from global requirements
Change-Id: I7cef56bc16ffda5c01f862482686f31695bd088d
2018-01-27 17:31:51 +00:00
OpenStack Proposal Bot 86cd4c2ded Updated from global requirements
Change-Id: I517dc7c33e2cd6b1e6a575c8c5c523e210870351
2017-12-04 20:30:37 +00:00
Monty Taylor 2f687e3373
Move doc requirements to doc/requirements.txt
Put these in place as a setup for the new versions of the doc build
jobs. Keep using them from the normal dep list until the jobs are
changed.

While we're here, update the docs env to use sphinx-build instead of
python setup.py build_sphinx. Also add python2.7 to the docs env, since
I accidentally tried building it with my python3 tox and it blew up
substantially.

Change-Id: I0fcc50c4c396758e839c329ce786a6f609bb1342
2017-12-01 12:35:37 -06:00
Doug Hellmann 3662d5a809 do not require installing demo app to build docs
Remove the dependency on the demoapp and just add it to the import
path so it is available to be imported. Copy the entry point settings
into the main cliff setup.cfg to ensure they are registered for the
doc build to find.

Change-Id: I390410bc5247e8b6c8d0a8fec8e7ecb223d8d6c1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-12-01 13:18:53 -05:00
Akihiro Motoki 9a29859cf2 sphinxext: Support cliff application
This commit adds a feature to generate a reference of global
optoions of a cliff application to autoprogram-cliff directive.
If a class path of a cliff application is specified as the argument of
autoprogram-cliff directive, it will be interpreted as a cliff application
and global options of the specified application are rendered.

Change-Id: I20e46521a137ca721fae28f10c5cf75d26069e45
2017-10-30 20:38:26 +00:00
Stephen Finucane b6f87c443b doc: Cleanup of demoapp doc
Wrap at a sane width and remove errant whitespace.

Change-Id: I31fada44126d3a55b1045990c8bcd756093a508a
2017-10-10 16:10:17 +01:00
Akihiro Motoki 3e028aa340 Generate demoapp CLI refernece
We have no way to check the cliff sphinxext work expectedly now.
It would be useful if we can check the cliff sphinxext in our doc.

Change-Id: If0578460dd678ffd33c20cf3707c08fa637eaf87
Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
2017-10-10 16:10:13 +01:00
Jenkins 2111afeb41 Merge "Update and replace http with https for doc links" 2017-08-23 09:53:11 +00:00
Vitalii Kulanov 5d77d6bd7b Update doc on Sphinx integration process
This patch adds some minor information that also
should be taken into account  while integrate sphinx

Change-Id: I0f88b96a5858ce27ad330a647255c11762dd413a
2017-08-22 18:20:58 +00:00
Thomas Bechtold 5c37935139 Make openstackdocstheme an optional doc dependency
cliff is a library that is used outside of OpenStack, too. Having
a build requirement that needs something OpenStack specific makes
life in cases (eg. for downstream packagers) more difficult.
So let's make openstackdocstheme an optional requirement.

Change-Id: I0f94a431be083b8b4baec850b1885ba07b5bf5c2
2017-08-07 09:28:04 +02:00
Akihiro Motoki eec65e3dfe doc: minor cleanup
* We have a long index in user/index page, as the history page
  has a lot of sections. It loses the readability in general.
  Let's use maxdepth 1 for history in the toctree directive.

* Remove unnecessary vertical line for quote blocks.
  openstackdocstheme shows a vertial line for quote blocks.
  If we have unnecessary leading spaces, the vertical line are shown.
  This cleans up such spaces in user/sphinxext.rst.

Change-Id: I913d23cc6148d37d28c27c4f3a40b5a6225dac76
2017-07-25 21:50:02 +00:00
howardlee da463b31fe Update and replace http with https for doc links
1) Update doc links according to OpenStack document migration
2) Use https instead of http for docs links

Change-Id: I0af218e58e32a06b7bd9cef661fc75f801689323
2017-07-21 10:55:01 +08:00
Akihiro Motoki ccd2e048c6 sphinxext: Add 'application' option to the autoprogram directive
In some cases, a single documentation build wants to handle multiple
cliff-based CLI. One possible example is openstack-manuals CLI ref.
In this case, the global setting 'autoprogram_cliff_application'
does not work. It is nice if we can specify an application name
per autoprogram-cliff directive.
This commit introduces a new option 'application' to
autoprogram-cliff directive to allow this.

Change-Id: Ie2d01920dc04f2a92031a641d809f7da8af8b395
2017-07-03 09:17:41 +09:00
Doug Hellmann 807c910c4f use openstackdocstheme html context
Set some of the new config values and enable openstackdocstheme as an
extension so it will inject values into the page context as it writes
each documentation page. This ensures the pages link to the right bug
tracker, etc.

Change-Id: I0bc0f1c42e1e54af0dc29d7dfcb23293a3347723
Depends-On: Icf3a40ed104cfd828f532f6f2b112ed02f996ff5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-30 22:54:10 +00:00
Jenkins d713da39ce Merge "switch from oslosphinx to openstackdocstheme" 2017-06-30 21:20:19 +00:00
Doug Hellmann efa324ac05 switch from oslosphinx to openstackdocstheme
Change-Id: Ife54259642bd71b899d34fa8d18ccc90e6f35bc2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-30 13:35:52 -05:00
Doug Hellmann d4f3c49d40 remove references to distribute in the docs
distribute is dead, long live setuptools

Change-Id: Iedf1fafeb1178aa9e7b74d67f87c10166026820d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-30 09:50:30 -04:00
Doug Hellmann 95c749d55e add before and after hooks
Add hooks that are called before and after the take_action() method of
the command.

Change-Id: Id6527dfe0946c0ab169fc165b84d40f3ff95e08c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-30 09:50:21 -04:00
Doug Hellmann 45de8e45ef add hook for get_epilog
Change-Id: If3fe077522c156472a0213e8768470e0505c189d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-30 09:50:12 -04:00
Doug Hellmann e72e54e757 add hook for manipulating the argument parser
Update Commands to load a separate set of extensions to be used as
"hooks," triggered at different points in the processing of the
command. Start with a hook that is given access to the argument parser
for the command so it can modify it.

Change-Id: I0785548fd36a61cda616921a4a21be3f67701300
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-30 09:50:07 -04:00
Doug Hellmann 44db83ff0b rearrange existing content to follow new standard
Change-Id: Ib923265aaab4c001e5313800002aae63b159ec0d
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-22 13:26:05 -04:00
Stephen Finucane 8d85b1c9a4 sphinxext: Allow configuration of ignorable options
At the moment, the help action (-h, --help) is ignored by default.
However, there is merit in being able to ignore further options. Make it
so.

Change-Id: I924d89fd6b602accac90604a3427b19bd4f9777a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2017-06-06 10:59:08 +01:00
Stephen Finucane e7a6a596c5 Add 'autoprogram-cliff' Sphinx directive
Many projects, such as 'python-openstackclient', manually write
documentation for their cliff-based command line tools. In many cases,
this documentation is a 1:1 reflection of what one could build from the
command line. This is unnecessary overhead that could and should be
avoided.

Add an 'autoprogram-cliff' directive that will allow folks to
automatically document their command line tools.

Change-Id: I497e62382768ffc9668a103706001735a7d851ff
2017-04-07 10:31:55 +01:00
Atsushi SAKAI 64a3e0e7d5 [doc]Fix URL for 'setuptools entry points'
Following URL is not existed.
  https://pythonhosted.org/setuptools/pkg_resources.html#entry-points
Update URL by following page
  (it comments "Documentation moved to read the docs.")
  https://pythonhosted.org/setuptools/

Change-Id: I04cd99740ec75dc6982760811bac411c243722c8
2016-09-07 21:41:54 +09:00
Masayuki Igawa f7c9713c53 Fix cliff URLs in doc and demoapp
This commit fixes cliff URLs in the documents and demoapp.

Change-Id: I5a190841d1126119eddacedd02667efd52709330
2016-07-28 16:08:47 +09:00
Steve Baker 4e1470d93e Implement a json formatter in cliff
This change replaces the cliff-tablib json formatter with an internal
replacement. It differs from the tablib formatter in the following ways:
- by default outputs with an indent of 2 spaces. The --noindent formatting
  argument outputs with no indentation, to save space or to pipe to tools
  which can't handle multi-line input.
- emit_one serialises a simple dict where the column name is the key
and the data item is the value (rather than a list of dicts with
'Field' and 'Value' keys)

The cliff release which contains this change will need a corresponding
cliff-tablib release which removes the json formatter from its setup.py
entry_points.

Change-Id: I7f9b1f339d96ead347a0c9d95ec7004a78d8c9d5
Related-Bug: #1308744
2015-08-18 09:42:19 +12:00
Steve Baker 0a8daff7bd Implement a yaml formatter in cliff
This change replaces the cliff-tablib yaml formatter with an internal
replacement. It differs from the tablib formatter in the following ways:
- always outputs with block formatting rather than the PyYAML default
  of deciding based on value content
- emit_one serialises a simple dict where the column name is the key
  and the data item is the value (rather than a list of dicts with
  'Field' and 'Value' keys)
- emit_one preserves column order by printing a single-item dict for
  each column_name

The cliff release which contains this change will need a corresponding
cliff-tablib release which removes the yaml formatter from its setup.py
entry_points.

Change-Id: I691dbab3dee7c5ec28b1083f87ab1f5c051d582b
Related-Bug: #1308744
2015-08-18 09:42:19 +12:00
Andreas Jaeger 784f6d6d3d Improve help messages
Help messages are in normally fully sentences starting with a capital
letter, some of the help messages follow this but not all. Adjust all so
that help messages look consistent.

Also, improve wording of --help text.

Change-Id: Ia22ccc42d71a4c9d7085303939dae9948ba52418
2015-08-07 16:49:09 +02:00
Doug Hellmann 79e05f6bdc Set demo app up with deferred help
Change-Id: Ia48866e17d5823a2ccc85172c717581316ad05a7
2015-07-24 15:44:06 +00:00
Doug Hellmann e7b63b911f Include the automatically-generated changelog
pbr generates a changelog for us, and since we haven't been keeping up
with doing that manually for all releases just go ahead and include the
one pbr generates.

Change-Id: I6f166dc01beeb3feafb3839d3c92e31798c2caf1
2015-06-19 20:37:50 +00:00
Jenkins bff7d6bfd6 Merge "Add some docs for list value formatter" 2015-06-08 15:18:43 +00:00
TerryHowe c904cd0bd7 Add some docs for list value formatter
Change-Id: Ifd27e397d186ea36e04c9f342ba30cdf728101bd
2015-05-26 11:02:06 -06:00
TerryHowe 6d292000aa Add documentation for the value formatter
Change-Id: I46a0f4cb74a689d1c14f1c538268433c687a5d01
2015-04-15 10:11:00 -06:00
Andrew Spiers c7462f8ab1 Update links to setuptools doc.
The link is README was redirecting permanently to the adjusted location,
The link in introduction.rst returned 404.

Change-Id: I5de1d950b58efb9d4718b2c8916d3c6ecf977070
2015-03-10 16:35:58 +11:00