Skip to content

Commit 1c024e2

Browse files
committed
Minor fixes to the docstrings to make Sphinx look pretty.
1 parent d4044b9 commit 1c024e2

9 files changed

+22
-25
lines changed

src/pygobbler/allocate_upload_directory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
def allocate_upload_directory(staging: str) -> str:
22
"""
33
Allocate a subdirectory in the staging directory to prepare files for
4-
upload via :py:func:`~upload_directory.upload_directory`.
4+
upload via :py:func:`~.upload_directory`.
55
66
Args:
77
staging:

src/pygobbler/clone_version.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ def clone_version(project: str, asset: str, version: str, destination: str, regi
1111
that has the same structure as that of the specified project-asset-version.
1212
All files in the version are represented as symlinks from ``destination``
1313
to the corresponding file in the ``registry``.The idea is that, when
14-
``destination`` is used in :py:func:`~upload_directory.upload_directory`,
15-
the symlinks are converted into upload links. This allows users to create
16-
new versions very cheaply as duplicate files are not stored in the backend.
14+
``destination`` is used in :py:func:`~.upload_directory`, the symlinks are
15+
converted into upload links. This allows users to create new versions very
16+
cheaply as duplicate files are not stored in the backend.
1717
1818
Users can more-or-less do whatever they want inside the cloned ``destination``,
1919
but the symlink targets should be read-only as they refer to immutable files in

src/pygobbler/create_project.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ def create_project(project: str, staging: str, url: str, owners: Optional[List]
2222
2323
uploaders:
2424
List specifying the authorized uploaders for this project. See the
25-
``uploaders`` field in
26-
:py:func:`~fetch_permissions.fetch_permissions` return value for
27-
the the expected format.
25+
``uploaders`` field in :py:func:`~.fetch_permissions` return value
26+
for the expected format.
2827
2928
Returns:
3029
On success, the requested project is created in the registry.

src/pygobbler/fetch_permissions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ def fetch_permissions(project: str, registry: str, url: str, force_remote: bool
3030
dictionary has the following fields:
3131
3232
- ``id``, string containing a user ID that is authorized to upload.
33-
- (optional) ``asset``, string containing the name of the asset that
33+
- ``asset`` (optional), string containing the name of the asset that
3434
the uploader is allowed to upload to. If not present, there is no
3535
restriction on the uploaded asset name.
36-
- (optional) ``version``, string containing the name of the version
36+
- ``version`` (optional), string containing the name of the version
3737
that the uploader is allowed to upload to. If not present, there is
3838
no restriction on the uploaded version name.
39-
- (optional) ``until``, string containing the expiry date of this
39+
- ``until`` (optional), string containing the expiry date of this
4040
authorization in Internet Date/Time format. If not provided, the
4141
authorization does not expire.
42-
- (optional) ``trusted``, whether the uploader is trusted. If not
42+
- ``trusted`` (optional), whether the uploader is trusted. If not
4343
provided, defaults to false.
4444
"""
4545
if os.path.exists(registry) and not force_remote:

src/pygobbler/fetch_summary.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def fetch_summary(project: str, asset: str, version: str, registry: str, url: st
3939
Returns:
4040
Dictionary containing summary information including:
4141
42-
- `uploader_user_id`, string containing the UID of the uploading user.
43-
- `upload_start_time`, string containing the upload start time in
42+
- ``uploader_user_id``, string containing the UID of the uploading user.
43+
- ``upload_start_time``, string containing the upload start time in
4444
Internet Date/Time format.
45-
- `upload_finish_time`, string containing the upload finish time in
45+
- ``upload_finish_time``, string containing the upload finish time in
4646
Internet Date/Time format.
47-
- `probation` (optional), boolean indicating whether this version of
47+
- ``on_probation`` (optional), boolean indicating whether this version of
4848
the asset is a probational upload.
4949
"""
5050

src/pygobbler/set_permissions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def set_permissions(project: str, registry: str, staging: str, url: str, owners:
2727
uploaders:
2828
List of dictionaries specifying the authorized uploaders for this
2929
project. See the ``uploaders`` field in the return value of
30-
:py:func:`~fetch_permissions.fetch_permissions` for the expected
31-
format. If None, no change is made to the existing uploaders.
30+
:py:func:`~.fetch_permissions` for the expected format. If None,
31+
no change is made to the existing uploaders.
3232
3333
append:
3434
Whether ``owners`` and ``uploaders`` should be appended to the

src/pygobbler/start_gobbler.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ def _initialize_gobbler_process(exe: str, staging: Optional[str], registry: Opti
130130

131131
def stop_gobbler():
132132
"""
133-
Stop any existing gobbler test service. This will also reset any URL that
134-
was modified by :py:func:`~start_gobbler`. If no test service was running,
135-
this function is a no-op.
133+
Stop any gobbler test service started by :py:func:`~.start_gobbler`. If no
134+
test service was running, this function is a no-op.
136135
"""
137136
global test_process
138137
if test_process is not None:

src/pygobbler/upload_directory.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ def upload_directory(project: str, asset: str, version: str, directory: str, sta
1818
The name of a new version of ``asset``.
1919
2020
directory:
21-
Path to a directory to be uploaded. This should be a subdirectory
22-
of ``staging`` for best performance, see
23-
:py:func:`~allocate_upload_directory.allocate_upload_directory` for
24-
details.
21+
Path to a directory to be uploaded. For best performace, this
22+
should be a subdirectory of ``staging``, e.g., as created by
23+
:py:func:`~.allocate_upload_directory`.
2524
2625
staging:
2726
Path to the staging directory.

src/pygobbler/version_path.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def version_path(project, asset, version, **kwargs) -> str:
1616
The name of the version of the ``asset`` to obtain.
1717
1818
kwargs:
19-
Further arguments to :py:func:`~fetch_directory.fetch_directory`.
19+
Further arguments to :py:func:`~.fetch_directory`.
2020
2121
Returns:
2222
The path to the directory containing the desired version.

0 commit comments

Comments
 (0)