Skip to content

Commit

Permalink
Fix the building of documentation
Browse files Browse the repository at this point in the history
Build of some modules was broken due to incorrect indentation in some
method docstrings.
  • Loading branch information
querti committed Oct 23, 2023
1 parent 95c1f9c commit fcbc55c
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 24 deletions.
1 change: 1 addition & 0 deletions docs/source/modules_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ API reference to modules used by pubtools-quay. Isolated usage outside of pubtoo
quay_session
signature_handler
signature_remover
security_manifest_pusher
tag_docker
utilities
exceptions
1 change: 0 additions & 1 deletion docs/source/push_docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ This is the main class for the Push Docker workflow, which is the primary workfl
.. automethod:: verify_target_settings
.. automethod:: get_docker_push_items
.. automethod:: get_operator_push_items
.. automethod:: get_repo_metadata
.. automethod:: check_repos_validity
.. automethod:: generate_backup_mapping
.. automethod:: _poll_tag_inconsistency
Expand Down
2 changes: 1 addition & 1 deletion docs/source/security_manifest_pusher.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Security manifest pusher
======================
========================

.. py:module:: pubtools._quay.security_manifest_pusher
Expand Down
10 changes: 5 additions & 5 deletions pubtools/_quay/operator_pusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,11 @@ def build_index_images(self):
Dictionary containing IIB results and signing keys for all OPM versions. Data will be
used in operator signing. Dictionary structure:
{
<target_tag>: {
"iib_result": (...) (object returned by iiblib)
"signing_keys": [...] (list of signing keys to be used for signing)
"destination_tags": [...] (list of destination tags)
}
<target_tag>: {
"iib_result": (...) (object returned by iiblib)
"signing_keys": [...] (list of signing keys to be used for signing)
"destination_tags": [...] (list of destination tags)
}
}
"""
iib_results = {}
Expand Down
5 changes: 2 additions & 3 deletions pubtools/_quay/push_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ def generate_backup_mapping(self, push_items):
Specifically, create two resources: 'backup_tags' and 'rollback_tags'.
- 'backup_tags' is a mapping of ImageData->manifest, and consists of images which will
be overwritten. During rollback, tag is made to re-reference the old manifest.
be overwritten. During rollback, tag is made to re-reference the old manifest.
- 'rollback_tags' is a list of ImageData which don't yet exist. During rollback, they
will be removed to preserve pre-push state.
will be removed to preserve pre-push state.
ImageData is a namedtuple used to assign and access parts of an image in a formatted way.
Expand Down Expand Up @@ -388,7 +388,6 @@ def _poll_tag_inconsistency(self, full_repo, tag, poll_rate=30, timeout=120):
timeout (int, optional):
How many seconds to poll before giving up and assuming that the image doesn't exist.
Defaults to 120.
Returns (str, None):
Image digest, or None if digest doesn't exist (or timeout is reached).
"""
Expand Down
10 changes: 5 additions & 5 deletions pubtools/_quay/quay_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get(self, endpoint, **kwargs):
Args:
endpoint (str):
Endpoint of the request.
**kwargs:
kwargs:
Additional arguments to add to the requests method.
Returns:
requests.Response: A response object.
Expand All @@ -66,7 +66,7 @@ def post(self, endpoint, **kwargs):
Args:
endpoint (str):
Endpoint of the request.
**kwargs:
kwargs:
Additional arguments to add to the requests method.
Returns:
requests.Response: A response object.
Expand All @@ -82,7 +82,7 @@ def put(self, endpoint, **kwargs):
Args:
endpoint (str):
Endpoint of the request.
**kwargs:
kwargs:
Additional arguments to add to the requests method.
Returns:
requests.Response: A response object.
Expand All @@ -98,7 +98,7 @@ def delete(self, endpoint, **kwargs):
Args:
endpoint (str):
Endpoint of the request.
**kwargs:
kwargs:
Additional arguments to add to the requests method.
Returns:
requests.Response: A response object.
Expand All @@ -116,7 +116,7 @@ def request(self, method, endpoint, **kwargs):
REST API method of the request (GET, POST, PUT, DELETE).
endpoint (str):
Endpoint of the request.
**kwargs:
kwargs:
Additional arguments to add to the requests method.
Returns:
requests.Response: A response object.
Expand Down
17 changes: 8 additions & 9 deletions pubtools/_quay/security_manifest_pusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,20 +232,19 @@ def security_manifest_get_products(self, security_manifest: dict) -> set[str]:
Products are expected to be in format:
"properties":[
{
"name": "product",
"value": "product-1",
},
{
"name": "product",
"value": "product-2",
},
{
"name": "product",
"value": "product-1"
},
{
"name": "product",
"value": "product-2"
}
]
Args:
security_manifest (dict):
Security manifest extracted from an attestation.
Returns (set[str]):
List of products.
"""
Expand Down

0 comments on commit fcbc55c

Please sign in to comment.