Skip to content

Commit

Permalink
Merge branch 'feature/fix-docsstring' into 'develop'
Browse files Browse the repository at this point in the history
GLOB-12189 fix build for readthedocs

See merge request core/sevenbridges-python!109
  • Loading branch information
borislavd88 committed Jan 31, 2024
2 parents dbbc3ed + 5ab0758 commit fb95e49
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 15 deletions.
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.9"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
1 change: 1 addition & 0 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ For user management in divisions and teams, the following are available:
For disabling users:

.. code-block:: python
user = api.users.get('<username>')
user.disable()
Expand Down
14 changes: 11 additions & 3 deletions docs/sevenbridges.models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,18 @@ sevenbridges\.models\.app module
:undoc-members:
:show-inheritance:

sevenbridges\.models\.billing\_breakdown module
-----------------------------------------------
sevenbridges\.models\.billing\_egress\_breakdown module
-------------------------------------------------------

.. automodule:: sevenbridges.models.billing_egress_breakdown
:members:
:undoc-members:
:show-inheritance:

sevenbridges\.models\.billing\_storage\_breakdown module
--------------------------------------------------------

.. automodule:: sevenbridges.models.billing_breakdown
.. automodule:: sevenbridges.models.billing_storage_breakdown
:members:
:undoc-members:
:show-inheritance:
Expand Down
4 changes: 3 additions & 1 deletion sevenbridges/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@


class Api(HttpClient):
"""Api aggregates all resource classes into single place"""
"""
Api aggregates all resource classes into single place
"""

actions = Actions
apps = App
Expand Down
3 changes: 1 addition & 2 deletions sevenbridges/models/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,7 @@ def content(self, path=None, overwrite=True, encoding='utf-8'):
"""
Downloads file to the specified path or as temporary file
and reads the file content in memory.
Should not be used on very large files.
Should not be used on very large files.
:param path: Path for file download If omitted tmp file will be used.
:param overwrite: Overwrite file if exists locally
:param encoding: File encoding, by default it is UTF-8
Expand Down
11 changes: 5 additions & 6 deletions sevenbridges/models/storage_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,13 @@ def submit_import(cls, volume, location, project=None, name=None,
:param overwrite: If true it will overwrite file if exists.
:param properties: Properties dictionary.
:param parent: The ID of the target folder to which the item should be
imported. Should not be used together with project.
imported. Should not be used together with project.
:param preserve_folder_structure: Whether to keep the exact source
folder structure. The default value is true if the item being
imported is a folder. Should not be used if you are importing
a file.
folder structure. The default value is true if the item being imported
is a folder. Should not be used if you are importing a file.
:param autorename: Whether to automatically rename the item
(by prefixing its name with an underscore and number) if
another one with the same name already exists at the destination.
(by prefixing its name with an underscore and number) if
another one with the same name already exists at the destination.
:param api: Api instance.
:return: Import object.
"""
Expand Down
7 changes: 4 additions & 3 deletions sevenbridges/models/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,13 @@ def bulk_get(cls, tasks, api=None):
return TaskBulkRecord.parse_records(response=response, api=api)

def wait(self=None, period=10, callback=None, *args, **kwargs):
"""Wait until task is complete
"""
Wait until task is complete
:param period: Time in seconds between reloads
:param callback: Function to call after the task has finished,
arguments and keyword arguments can be provided for it
arguments and keyword arguments can be provided for it
:return: Return value of provided callback function or None if a
callback function was not provided
callback function was not provided
"""
while self.status not in TaskStatus.terminal_states:
self.reload()
Expand Down

0 comments on commit fb95e49

Please sign in to comment.