Skip to content

Commit

Permalink
Documentation + minor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
pcisar committed Jul 3, 2019
1 parent 8919326 commit 0106688
Show file tree
Hide file tree
Showing 8 changed files with 727 additions and 31 deletions.
4 changes: 2 additions & 2 deletions fbupkeep/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import configparser
from pkg_resources import iter_entry_points

__version__ = '1.0'
__version__ = '1.0.1'

# Exceptions

Expand Down Expand Up @@ -72,7 +72,7 @@ class ConfigOption:
:required: True if option must have a value.
:default: Default value.
:proposal: Text with proposed configuration entry (if it's different from default).
:value: Current optin value.
:value: Current option value.
"""
def __init__(self, name: str, datatype: Any, description: str, required: bool = False,
default: Any = None, proposal: Any = None):
Expand Down
6 changes: 3 additions & 3 deletions fbupkeep/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def run(self) -> None:
self.logger.debug("Service closed")

class TaskIndexRecompute(Task):
"""Task that recomputes database indices.
"""Task that recomputes statistics for all database indices.
"""
def __init__(self, executor):
super().__init__(executor)
Expand Down Expand Up @@ -318,7 +318,7 @@ def recompute(idx):
self.logger.debug("Database connection closed")

class TaskIndexRebuild(Task):
"""Task that recomputes database indices.
"""Task that rebuilds all user (i.e. not system) indices.
"""
def __init__(self, executor):
super().__init__(executor)
Expand Down Expand Up @@ -409,7 +409,7 @@ def run(self) -> None:
"""
for dir_config in self.dir_configs:
for dirpath, _, filenames in os.walk(dir_config.path):
for filename in fnmatch.filter(filenames, dir_config.pattern):
for filename in fnmatch.filter(filenames, self.timestamp.strftime(dir_config.pattern)):
try:
filespec = os.path.join(dirpath, filename)
age = self.timestamp - datetime.datetime.fromtimestamp(os.path.getmtime(filespec))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

setup(
name='fbupkeep',
version='1.0',
version='1.0.1',
description='Firebird Upkeep utility',
long_description=LONG_DESCRIPTION,
long_description_content_type="text/x-rst",
Expand Down
12 changes: 6 additions & 6 deletions sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
author = u'Pavel Císař'

# The short X.Y version
version = u'1.0'
version = u'1.0.1'
# The full version, including alpha/beta/rc tags
release = u'1.0'
release = u'1.0.1'


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -138,7 +138,7 @@

# Global TOC depth for "site" navbar tab. (Default: 1)
# Switching to -1 shows all levels.
'globaltoc_depth': 3,
'globaltoc_depth': 4,

# Include hidden TOCs in Site navbar?
#
Expand All @@ -159,8 +159,8 @@

# Location of link to source.
# Options are "nav" (default), "footer" or anything else to exclude.
'source_link_position': "none",
#'source_link_position': "nav",
#'source_link_position': "none",
'source_link_position': "nav",

# Bootswatch (http://bootswatch.com/) theme.
#
Expand Down Expand Up @@ -264,7 +264,7 @@
autoclass_content = "both"
autodoc_member_order = "groupwise"
autodoc_default_options = {
# 'members': None,
#'members': None,
'member-order': 'groupwise',
# 'special-members': '__init__',
'undoc-members': True,
Expand Down
12 changes: 10 additions & 2 deletions sphinx/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
FBUPKEEP - Firebird server & database maintenance utility
#########################################################

FBUPKEEP is a Python library that provides a task executor engine and a command-line tool to execute tasks.
Its primary purpose is to run maintenance tasks for `Firebird`_ ® servers and databases, but could be easily
FBUPKEEP is a Python library that provides a task executor engine and a command-line tool to execute tasks.
Its primary purpose is to run maintenance tasks for `Firebird`_ ® servers and databases, but could be easily
extended to run other tasks of various type.

Built-in tasks:
Expand All @@ -18,6 +18,13 @@ Built-in tasks:

FBUPKEEP is designed to run on Python 3.5+, and uses FDB_ Firebird driver.

Installation
------------

From PyPI_::

pip install fbupkeep

Content
*******

Expand All @@ -42,3 +49,4 @@ Indices and tables
.. _FDB: https://github.com/FirebirdSQL/fdb
.. _IBPhoenix: http://www.ibphoenix.com
.. _Python: http://python.org
.. _PyPI: https://pypi.org/project/fbupkeep/
2 changes: 1 addition & 1 deletion sphinx/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=.build
set BUILDDIR=../docs

if "%1" == "" goto help

Expand Down
26 changes: 26 additions & 0 deletions sphinx/reference.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ Exceptions
==========

.. autoexception:: Error
:show-inheritance:

.. autoexception:: StopError
:show-inheritance:

Functions
=========
Expand All @@ -40,26 +42,36 @@ ConfigOption
------------

.. autoclass:: ConfigOption
:members:
:show-inheritance:

TaskConfig
----------

.. autoclass:: TaskConfig
:members:
:show-inheritance:

LoggedObject
------------

.. autoclass:: LoggedObject
:members:
:show-inheritance:

Task
----

.. autoclass:: Task
:members:
:show-inheritance:

TaskExecutor
------------

.. autoclass:: TaskExecutor
:members:
:show-inheritance:

==============
fbupkeep.tasks
Expand All @@ -74,36 +86,50 @@ TaskGstat
---------

.. autoclass:: TaskGstat
:members:
:show-inheritance:

TaskGbak
--------

.. autoclass:: TaskGbak
:members:
:show-inheritance:

TaskGbakRestore
---------------

.. autoclass:: TaskGbakRestore
:members:
:show-inheritance:

TaskSweep
---------

.. autoclass:: TaskSweep
:members:
:show-inheritance:

TaskIndexRecompute
------------------

.. autoclass:: TaskIndexRecompute
:members:
:show-inheritance:

TaskIndexRebuild
----------------

.. autoclass:: TaskIndexRebuild
:members:
:show-inheritance:

TaskRemoveOld
-------------

.. autoclass:: TaskRemoveOld
:members:
:show-inheritance:

===============
fbupkeep.runner
Expand Down

0 comments on commit 0106688

Please sign in to comment.