Skip to content

Commit

Permalink
Update Sphinx documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
xDaile committed Jul 13, 2023
1 parent 3ee3da7 commit 320cf31
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 27 deletions.
21 changes: 21 additions & 0 deletions docs/module_documentation/iib.common.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
iib.common package
==================

Submodules
----------

iib.common.tracing module
-------------------------

.. automodule:: iib.common.tracing
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: iib.common
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/module_documentation/iib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Subpackages

.. toctree::

iib.common
iib.web
iib.workers

Expand Down
25 changes: 24 additions & 1 deletion docs/module_documentation/iib.web.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ iib.web.errors module
:private-members:
:show-inheritance:

iib.web.iib\_static\_types module
---------------------------------

.. automodule:: iib.web.iib_static_types
:members:
:undoc-members:
:show-inheritance:

iib.web.manage module
---------------------

Expand All @@ -67,6 +75,14 @@ iib.web.manage module
:private-members:
:show-inheritance:

iib.web.messaging module
------------------------

.. automodule:: iib.web.messaging
:members:
:undoc-members:
:show-inheritance:

iib.web.models module
---------------------

Expand All @@ -76,6 +92,14 @@ iib.web.models module
:private-members:
:show-inheritance:

iib.web.s3\_utils module
------------------------

.. automodule:: iib.web.s3_utils
:members:
:undoc-members:
:show-inheritance:

iib.web.utils module
--------------------

Expand All @@ -94,7 +118,6 @@ iib.web.wsgi module
:private-members:
:show-inheritance:


Module contents
---------------

Expand Down
23 changes: 23 additions & 0 deletions docs/module_documentation/iib.workers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,29 @@ iib.workers.config module
:private-members:
:show-inheritance:

iib.workers.dogpile\_cache module
---------------------------------

.. automodule:: iib.workers.dogpile_cache
:members:
:undoc-members:
:show-inheritance:

iib.workers.greenwave module
----------------------------

.. automodule:: iib.workers.greenwave
:members:
:undoc-members:
:show-inheritance:

iib.workers.s3\_utils module
----------------------------

.. automodule:: iib.workers.s3_utils
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------
Expand Down
71 changes: 63 additions & 8 deletions docs/module_documentation/iib.workers.tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,46 @@ iib.workers.tasks.build module
:private-members:
:show-inheritance:

iib.workers.tasks.build\_create\_empty\_index module
----------------------------------------------------

.. automodule:: iib.workers.tasks.build_create_empty_index
:members:
:undoc-members:
:show-inheritance:

iib.workers.tasks.build\_fbc\_operations module
-----------------------------------------------

.. automodule:: iib.workers.tasks.build_fbc_operations
:members:
:undoc-members:
:show-inheritance:

iib.workers.tasks.build\_merge\_index\_image module
---------------------------------------------------

.. automodule:: iib.workers.tasks.build_merge_index_image
:members:
:undoc-members:
:show-inheritance:

iib.workers.tasks.build\_recursive\_related\_bundles module
-----------------------------------------------------------

.. automodule:: iib.workers.tasks.build_recursive_related_bundles
:members:
:undoc-members:
:show-inheritance:

iib.workers.tasks.build\_regenerate\_bundle module
--------------------------------------------------

.. automodule:: iib.workers.tasks.build_regenerate_bundle
:members:
:undoc-members:
:show-inheritance:

iib.workers.tasks.celery module
-------------------------------

Expand All @@ -22,6 +62,14 @@ iib.workers.tasks.celery module
:private-members:
:show-inheritance:

iib.workers.tasks.fbc\_utils module
-----------------------------------

.. automodule:: iib.workers.tasks.fbc_utils
:members:
:undoc-members:
:show-inheritance:

iib.workers.tasks.general module
--------------------------------

Expand All @@ -31,19 +79,26 @@ iib.workers.tasks.general module
:private-members:
:show-inheritance:

iib.workers.tasks.utils module
------------------------------
iib.workers.tasks.iib\_static\_types module
-------------------------------------------

.. automodule:: iib.workers.tasks.utils
:ignore-module-all:
.. automodule:: iib.workers.tasks.iib_static_types
:members:
:private-members:
:undoc-members:
:show-inheritance:

iib.workers.tasks.iib_static_types module
-----------------------------------------
iib.workers.tasks.opm\_operations module
----------------------------------------

.. automodule:: iib.workers.tasks.iib_static_types
.. automodule:: iib.workers.tasks.opm_operations
:members:
:undoc-members:
:show-inheritance:

iib.workers.tasks.utils module
------------------------------

.. automodule:: iib.workers.tasks.utils
:ignore-module-all:
:members:
:private-members:
Expand Down
21 changes: 16 additions & 5 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
celery
# https://github.com/sphinx-doc/sphinx/issues/2796
boto3
celery
dogpile.cache
flask
flask-login
flask-migrate
flask-sqlalchemy
opentelemetry-api
opentelemetry-exporter-otlp
opentelemetry-instrumentation
opentelemetry-instrumentation-botocore
opentelemetry-instrumentation-celery
opentelemetry-instrumentation-flask
opentelemetry-instrumentation-logging
opentelemetry-instrumentation-requests
opentelemetry-instrumentation-sqlalchemy
opentelemetry-instrumentation-wsgi
opentelemetry-sdk
operator-manifest
python-qpid-proton
python-memcached
psycopg2-binary
python-memcached
python-qpid-proton
recommonmark
requests
ruamel.yaml
# https://github.com/sphinx-doc/sphinx/issues/2796
sphinx==6.2.0
sphinx==6.2.1
sphinx_rtd_theme
tenacity
typing-extensions
4 changes: 2 additions & 2 deletions iib/common/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
Usage:
@instrument_tracing()
def func():
pass
def func():
pass
"""
import os
Expand Down
6 changes: 3 additions & 3 deletions iib/workers/tasks/fbc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ def extract_fbc_fragment(temp_dir: str, fbc_fragment: str) -> Tuple[str, str]:
"""
Extract operator package from the fbc_fragment image.
:param str temp_dir: base temp directory for IIB request
:pararm str fbc_fragment: pull specification of fbc_fragment in the IIB request
:return fbc_fragment path, fbc_operator_package
:param str temp_dir: base temp directory for IIB request.
:param str fbc_fragment: pull specification of fbc_fragment in the IIB request.
:return: fbc_fragment path, fbc_operator_package.
:rtype: tuple
"""
from iib.workers.tasks.build import _copy_files_from_image
Expand Down
10 changes: 5 additions & 5 deletions iib/workers/tasks/opm_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ def opm_registry_add_fbc_fragment(
:param str binary_image: the pull specification of the container image where the opm binary
gets copied from. This should point to a digest or stable tag.
:param str fbc_fragment: the pull specification of fbc fragment to be added in from_index.
:pararm str overwrite_from_index_token: token used to access the image
:param str overwrite_from_index_token: token used to access the image
"""
set_request_state(request_id, 'in_progress', 'Extracting operator package from fbc_fragment')
# fragment path will look like /tmp/iib-**/fbc-fragment
Expand Down Expand Up @@ -863,11 +863,11 @@ def verify_operator_exists(
"""
Check if operator exists in index image.
:pararm str from_index: index in which operator existence is checke
:param str from_index: index in which operator existence is checked
:param str base_dir: base temp directory for IIB request
:pararm str operator_package: operator_package to check
:pararm str overwrite_from_index_token: token used to access the image
:return is_package_in_index, index_db_path
:param str operator_package: operator_package to check
:param str overwrite_from_index_token: token used to access the image
:return: is_package_in_index, index_db_path
:rtype: (str, str)
"""
from iib.workers.tasks.build import terminate_process, get_bundle_json
Expand Down
6 changes: 3 additions & 3 deletions iib/workers/tasks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class RequestConfigFBCOperation(RequestConfig):
:param str from_index: the pull specification of the container image
containing the index that the index image build
will be based from.
param set add_arches: the set of arches to build in addition to the
:param set add_arches: the set of arches to build in addition to the
arches ``from_index`` is currently built for;
if ``from_index`` is ``None``, then this is used as the list of arches
to build the index image for
Expand Down Expand Up @@ -929,8 +929,8 @@ def chmod_recursively(dir_path: str, dir_mode: int, file_mode: int) -> None:
"""Change file mode bits recursively.
:param str dir_path: the path to the starting directory to apply the file mode bits
:param dir_mode int: the mode, as defined in the stat module, to apply to directories
:param file_mode int: the mode, as defined in the stat module, to apply to files
:param int dir_mode: the mode, as defined in the stat module, to apply to directories
:param int file_mode: the mode, as defined in the stat module, to apply to files
"""
for dirpath, dirnames, filenames in os.walk(dir_path):
os.chmod(dirpath, dir_mode)
Expand Down

0 comments on commit 320cf31

Please sign in to comment.