Skip to content

Commit

Permalink
Merge pull request #492 from bernt-matthias/quota_source_label
Browse files Browse the repository at this point in the history
Add ``quota_source_label`` parameter to ``QuotaClient.create_quota()``
  • Loading branch information
nsoranzo authored Mar 6, 2025
2 parents 0bf1d42 + 66408c7 commit 85e99b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
* Added ``offset`` parameter to ``InvocationClient.get_invocations()`` and
BioBlend.objects ``ObjInvocationClient.list()`` methods.

* Added ``quota_source_label`` parameter to ``QuotaClient.create_quota()``
(thanks to [Matthias Bernt](https://github.com/bernt-matthias)).

* Added ``style`` parameter to ``WorkflowClient.export_workflow_dict()`` method
(thanks to [Marius van den Beek](https://github.com/mvdbeek)).

Expand Down
6 changes: 6 additions & 0 deletions bioblend/galaxy/quotas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def create_quota(
default: Optional[DefaultQuotaValues] = "no",
in_users: Optional[list[str]] = None,
in_groups: Optional[list[str]] = None,
quota_source_label: Optional[str] = None,
) -> dict[str, Any]:
"""
Create a new quota
Expand Down Expand Up @@ -109,6 +110,10 @@ def create_quota(
:type in_groups: list of str
:param in_groups: A list of group IDs or names.
:type quota_source_label: str
:param quota_source_label: If set, quota source label to apply this
quota operation to. Otherwise, the default quota is used.
:rtype: dict
:return: A description of quota.
For example::
Expand All @@ -125,6 +130,7 @@ def create_quota(
"amount": amount,
"operation": operation,
"default": default,
"quota_source_label": quota_source_label,
}
if in_users:
payload["in_users"] = in_users
Expand Down

0 comments on commit 85e99b5

Please sign in to comment.