Skip to content

Commit

Permalink
Improving docs according to new CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekSuchanek committed Jul 1, 2018
1 parent ab499cf commit a1a1d04
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 36 deletions.
3 changes: 1 addition & 2 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ API
.. toctree::
:maxdepth: 3

repocribro/api.rst
repocribro/cli.rst
repocribro/commands.rst
repocribro/config.rst
repocribro/controllers.rst
repocribro/ext_core.rst
repocribro/extending.rst
repocribro/github.rst
repocribro/manage.rst
repocribro/models.rst
repocribro/repocribro.rst
repocribro/security.rst
8 changes: 0 additions & 8 deletions docs/api/repocribro/api.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repocribro.manage
=================

.. automodule:: repocribro.manage
.. automodule:: repocribro.cli
:members:
:private-members:
:special-members:
Expand Down
40 changes: 25 additions & 15 deletions docs/api/repocribro/commands.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
repocribro.commands
===================

AssignRoleCommand
-----------------
assign_role
-----------

.. autoclass:: repocribro.commands.AssignRoleCommand
.. automodule:: repocribro.commands.assign_role
:members:
:private-members:
:special-members: __init__
:special-members:
:undoc-members:
:show-inheritance:

DbCreateCommand
---------------

.. autoclass:: repocribro.commands.DbCreateCommand
check_config
---------

.. automodule:: repocribro.commands.check_config
:members:
:private-members:
:special-members: __init__
:special-members:
:undoc-members:
:show-inheritance:

RepocheckCommand
----------------

.. autoclass:: repocribro.commands.RepocheckCommand
db_create
---------

.. automodule:: repocribro.commands.db_create
:members:
:private-members:
:special-members: __init__
:special-members:
:undoc-members:
:show-inheritance:


repocheck
---------

.. automodule:: repocribro.commands.repocheck
:members:
:private-members:
:special-members:
:undoc-members:

7 changes: 7 additions & 0 deletions docs/install/config.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _config:

Configuration
=============

Expand Down Expand Up @@ -28,6 +30,11 @@ Default config file can be also specified with environment variable:
>>> from repocribro.app import app
>>> app.run()

You can also take advantage of `python-dotenv`_ and specify configuration
in `.env` file.

.. _python-dotenv: https://github.com/theskumar/python-dotenv

Application
-----------

Expand Down
25 changes: 15 additions & 10 deletions docs/usage/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ There are various command for the app management some are
provided by Flask extensions, some by repocribro. You can
use option ``--help`` to get more information.

assign-role
You can use both ``repocribro`` and ``flask`` commands. The
configuration must by specified by environenment variable as
described in :ref:`config`.

assign_role
-----------

Main purpose for this command is to set the initial admin
Expand All @@ -14,7 +18,7 @@ set within administration zone of web interface.

::

$ repocribro assign-role --login MarekSuchanek --role admin
$ repocribro assign_role --login MarekSuchanek --role admin
Loaded extensions: core
Role admin not in DB... adding
Role admin added to MarekSuchanek
Expand All @@ -27,10 +31,10 @@ set within administration zone of web interface.
For more information:
::

$ repocribro assign-role --help
$ repocribro assign_role --help


check-config
check_config
------------

Commands for checking configuration currently used by repocribro.
Expand All @@ -39,12 +43,12 @@ There are two styles for printing, same syntax as is in the cfg file

::

$ repocribro -c my_cfg1.cfg -c my_cfg2.cfg check-config
$ repocribro check_config
[flask]
secret_key = MySecretKey
...

$ repocribro check-config --style triple
$ repocribro check_config --style triple
flask secret_key MySecretKey
...

Expand All @@ -65,13 +69,14 @@ For more information:
repocheck
---------

*Not implemented yet!*

This command will provide simple checking of one or all
This command provides simple checking of one or all
repositories if there are some uncaught events within specified
time. Main idea is to get the missed events (from webhooks) due
to app outage.

::

$ repocribro repocheck --help

runserver
---------
Expand All @@ -83,7 +88,7 @@ For more information:

::

$ repocribro runserver --help
$ repocribro run --help



Expand Down

0 comments on commit a1a1d04

Please sign in to comment.