repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
schwuk/django-getenv | getenv/env.py | env | def env(key, default=None, required=False):
"""
Retrieves environment variables and returns Python natives. The (optional)
default will be returned if the environment variable does not exist.
"""
try:
value = os.environ[key]
return ast.literal_eval(value)
except (SyntaxError, Val... | python | def env(key, default=None, required=False):
"""
Retrieves environment variables and returns Python natives. The (optional)
default will be returned if the environment variable does not exist.
"""
try:
value = os.environ[key]
return ast.literal_eval(value)
except (SyntaxError, Val... | [
"def",
"env",
"(",
"key",
",",
"default",
"=",
"None",
",",
"required",
"=",
"False",
")",
":",
"try",
":",
"value",
"=",
"os",
".",
"environ",
"[",
"key",
"]",
"return",
"ast",
".",
"literal_eval",
"(",
"value",
")",
"except",
"(",
"SyntaxError",
... | Retrieves environment variables and returns Python natives. The (optional)
default will be returned if the environment variable does not exist. | [
"Retrieves",
"environment",
"variables",
"and",
"returns",
"Python",
"natives",
".",
"The",
"(",
"optional",
")",
"default",
"will",
"be",
"returned",
"if",
"the",
"environment",
"variable",
"does",
"not",
"exist",
"."
] | train | https://github.com/schwuk/django-getenv/blob/c1f412cdf5958ab80a434181ad06bc45ea4bf26c/getenv/env.py#L13-L27 |
planetlabs/es_fluent | es_fluent/filters/geometry.py | prepare_geojson | def prepare_geojson(geojson):
"""
Modifies incoming GeoJSON to make it Elastic friendly. This means:
1. CW orientation of polygons.
2. Re-casting of Features and FeatureCollections to Geometry and
GeometryCollections.
"""
# TODO CW orientation.
geojson = deepcopy(geojson)... | python | def prepare_geojson(geojson):
"""
Modifies incoming GeoJSON to make it Elastic friendly. This means:
1. CW orientation of polygons.
2. Re-casting of Features and FeatureCollections to Geometry and
GeometryCollections.
"""
# TODO CW orientation.
geojson = deepcopy(geojson)... | [
"def",
"prepare_geojson",
"(",
"geojson",
")",
":",
"# TODO CW orientation.",
"geojson",
"=",
"deepcopy",
"(",
"geojson",
")",
"if",
"geojson",
"[",
"\"type\"",
"]",
"==",
"\"Feature\"",
":",
"geojson",
"=",
"geojson",
"[",
"\"geometry\"",
"]",
"if",
"hasattr"... | Modifies incoming GeoJSON to make it Elastic friendly. This means:
1. CW orientation of polygons.
2. Re-casting of Features and FeatureCollections to Geometry and
GeometryCollections. | [
"Modifies",
"incoming",
"GeoJSON",
"to",
"make",
"it",
"Elastic",
"friendly",
".",
"This",
"means",
":"
] | train | https://github.com/planetlabs/es_fluent/blob/74f8db3a1bf9aa1d54512cf2d5e0ec58ee2f4b1c/es_fluent/filters/geometry.py#L9-L32 |
planetlabs/es_fluent | es_fluent/filters/geometry.py | IndexedShape.to_query | def to_query(self):
"""
Returns a json-serializable representation.
"""
return {
"geo_shape": {
self.name: {
"indexed_shape": {
"index": self.index_name,
"type": self.doc_type,
... | python | def to_query(self):
"""
Returns a json-serializable representation.
"""
return {
"geo_shape": {
self.name: {
"indexed_shape": {
"index": self.index_name,
"type": self.doc_type,
... | [
"def",
"to_query",
"(",
"self",
")",
":",
"return",
"{",
"\"geo_shape\"",
":",
"{",
"self",
".",
"name",
":",
"{",
"\"indexed_shape\"",
":",
"{",
"\"index\"",
":",
"self",
".",
"index_name",
",",
"\"type\"",
":",
"self",
".",
"doc_type",
",",
"\"id\"",
... | Returns a json-serializable representation. | [
"Returns",
"a",
"json",
"-",
"serializable",
"representation",
"."
] | train | https://github.com/planetlabs/es_fluent/blob/74f8db3a1bf9aa1d54512cf2d5e0ec58ee2f4b1c/es_fluent/filters/geometry.py#L84-L99 |
mitsei/dlkit | dlkit/json_/cataloging/objects.py | CatalogNode.get_catalog | def get_catalog(self):
"""Gets the ``Catalog`` at this node.
return: (osid.cataloging.Catalog) - the catalog represented by
this node
*compliance: mandatory -- This method must be implemented.*
"""
if self._lookup_session is None:
mgr = get_provider_... | python | def get_catalog(self):
"""Gets the ``Catalog`` at this node.
return: (osid.cataloging.Catalog) - the catalog represented by
this node
*compliance: mandatory -- This method must be implemented.*
"""
if self._lookup_session is None:
mgr = get_provider_... | [
"def",
"get_catalog",
"(",
"self",
")",
":",
"if",
"self",
".",
"_lookup_session",
"is",
"None",
":",
"mgr",
"=",
"get_provider_manager",
"(",
"'CATALOGING'",
",",
"runtime",
"=",
"self",
".",
"_runtime",
",",
"proxy",
"=",
"self",
".",
"_proxy",
")",
"s... | Gets the ``Catalog`` at this node.
return: (osid.cataloging.Catalog) - the catalog represented by
this node
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"Catalog",
"at",
"this",
"node",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/cataloging/objects.py#L191-L202 |
mitsei/dlkit | dlkit/json_/cataloging/objects.py | CatalogNode.get_parent_catalog_nodes | def get_parent_catalog_nodes(self):
"""Gets the parents of this catalog.
return: (osid.cataloging.CatalogNodeList) - the parents of the
``id``
*compliance: mandatory -- This method must be implemented.*
"""
parent_catalog_nodes = []
for node in self._my_... | python | def get_parent_catalog_nodes(self):
"""Gets the parents of this catalog.
return: (osid.cataloging.CatalogNodeList) - the parents of the
``id``
*compliance: mandatory -- This method must be implemented.*
"""
parent_catalog_nodes = []
for node in self._my_... | [
"def",
"get_parent_catalog_nodes",
"(",
"self",
")",
":",
"parent_catalog_nodes",
"=",
"[",
"]",
"for",
"node",
"in",
"self",
".",
"_my_map",
"[",
"'parentNodes'",
"]",
":",
"parent_catalog_nodes",
".",
"append",
"(",
"CatalogNode",
"(",
"node",
".",
"_my_map"... | Gets the parents of this catalog.
return: (osid.cataloging.CatalogNodeList) - the parents of the
``id``
*compliance: mandatory -- This method must be implemented.* | [
"Gets",
"the",
"parents",
"of",
"this",
"catalog",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/cataloging/objects.py#L206-L221 |
mitsei/dlkit | dlkit/runtime/impls/configuration/objects.py | ParameterList.get_next_parameters | def get_next_parameters(self, n=None):
"""Gets the next set of ``Parameters`` in this list which must be less than or equal to the return from ``available()``.
arg: n (cardinal): the number of ``Parameter`` elements
requested which must be less than or equal to
``avai... | python | def get_next_parameters(self, n=None):
"""Gets the next set of ``Parameters`` in this list which must be less than or equal to the return from ``available()``.
arg: n (cardinal): the number of ``Parameter`` elements
requested which must be less than or equal to
``avai... | [
"def",
"get_next_parameters",
"(",
"self",
",",
"n",
"=",
"None",
")",
":",
"# Implemented from template for osid.resource.ResourceList.get_next_resources",
"if",
"n",
">",
"self",
".",
"available",
"(",
")",
":",
"# !!! This is not quite as specified (see method docs) !!!",
... | Gets the next set of ``Parameters`` in this list which must be less than or equal to the return from ``available()``.
arg: n (cardinal): the number of ``Parameter`` elements
requested which must be less than or equal to
``available()``
return: (osid.configuration.Para... | [
"Gets",
"the",
"next",
"set",
"of",
"Parameters",
"in",
"this",
"list",
"which",
"must",
"be",
"less",
"than",
"or",
"equal",
"to",
"the",
"return",
"from",
"available",
"()",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/runtime/impls/configuration/objects.py#L247-L274 |
django-fluent/fluentcms-googlemaps | fluentcms_googlemaps/templatetags/fluentcms_googlemaps_tags.py | data_attrs | def data_attrs(mapitem):
"""
Generate the data-... attributes for a mapitem.
"""
data_attrs = {}
try:
data_attrs['marker-detail-api-url'] = reverse('fluentcms-googlemaps-marker-detail')
except NoReverseMatch:
pass
data_attrs.update(mapitem.get_map_options())
return mark... | python | def data_attrs(mapitem):
"""
Generate the data-... attributes for a mapitem.
"""
data_attrs = {}
try:
data_attrs['marker-detail-api-url'] = reverse('fluentcms-googlemaps-marker-detail')
except NoReverseMatch:
pass
data_attrs.update(mapitem.get_map_options())
return mark... | [
"def",
"data_attrs",
"(",
"mapitem",
")",
":",
"data_attrs",
"=",
"{",
"}",
"try",
":",
"data_attrs",
"[",
"'marker-detail-api-url'",
"]",
"=",
"reverse",
"(",
"'fluentcms-googlemaps-marker-detail'",
")",
"except",
"NoReverseMatch",
":",
"pass",
"data_attrs",
".",... | Generate the data-... attributes for a mapitem. | [
"Generate",
"the",
"data",
"-",
"...",
"attributes",
"for",
"a",
"mapitem",
"."
] | train | https://github.com/django-fluent/fluentcms-googlemaps/blob/e4034b0f1c9896ce355628ed8e0c3532c08214d1/fluentcms_googlemaps/templatetags/fluentcms_googlemaps_tags.py#L41-L56 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingManager.get_grade_system_query_session | def get_grade_system_query_session(self):
"""Gets the ``OsidSession`` associated with the grade system query service.
return: (osid.grading.GradeSystemQuerySession) - a
``GradeSystemQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented... | python | def get_grade_system_query_session(self):
"""Gets the ``OsidSession`` associated with the grade system query service.
return: (osid.grading.GradeSystemQuerySession) - a
``GradeSystemQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented... | [
"def",
"get_grade_system_query_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_system_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"GradeSystemQuerySessio... | Gets the ``OsidSession`` associated with the grade system query service.
return: (osid.grading.GradeSystemQuerySession) - a
``GradeSystemQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_grade_system_query()`` is
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"system",
"query",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L521-L536 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingManager.get_grade_system_query_session_for_gradebook | def get_grade_system_query_session_for_gradebook(self, gradebook_id):
"""Gets the ``OsidSession`` associated with the grade system query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
return: (osid.grading.GradeSystemQuerySession) - ``a
... | python | def get_grade_system_query_session_for_gradebook(self, gradebook_id):
"""Gets the ``OsidSession`` associated with the grade system query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
return: (osid.grading.GradeSystemQuerySession) - ``a
... | [
"def",
"get_grade_system_query_session_for_gradebook",
"(",
"self",
",",
"gradebook_id",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_system_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the catalo... | Gets the ``OsidSession`` associated with the grade system query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
return: (osid.grading.GradeSystemQuerySession) - ``a
GradeSystemQuerySession``
raise: NotFound - ``gradebook_id`` not ... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"system",
"query",
"service",
"for",
"the",
"given",
"gradebook",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L542-L564 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingManager.get_grade_system_admin_session | def get_grade_system_admin_session(self):
"""Gets the ``OsidSession`` associated with the grade system administration service.
return: (osid.grading.GradeSystemAdminSession) - a
``GradeSystemAdminSession``
raise: OperationFailed - unable to complete request
raise: Unim... | python | def get_grade_system_admin_session(self):
"""Gets the ``OsidSession`` associated with the grade system administration service.
return: (osid.grading.GradeSystemAdminSession) - a
``GradeSystemAdminSession``
raise: OperationFailed - unable to complete request
raise: Unim... | [
"def",
"get_grade_system_admin_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_system_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"GradeSystemAdminSessio... | Gets the ``OsidSession`` associated with the grade system administration service.
return: (osid.grading.GradeSystemAdminSession) - a
``GradeSystemAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_grade_system_admin()`` is
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"system",
"administration",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L567-L582 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingManager.get_grade_entry_query_session | def get_grade_entry_query_session(self):
"""Gets the ``OsidSession`` associated with the grade entry query service.
return: (osid.grading.GradeEntryQuerySession) - a
``GradeEntryQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - `... | python | def get_grade_entry_query_session(self):
"""Gets the ``OsidSession`` associated with the grade entry query service.
return: (osid.grading.GradeEntryQuerySession) - a
``GradeEntryQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - `... | [
"def",
"get_grade_entry_query_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_entry_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"GradeEntryQuerySession",... | Gets the ``OsidSession`` associated with the grade entry query service.
return: (osid.grading.GradeEntryQuerySession) - a
``GradeEntryQuerySession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_grade_entry_query()`` is
`... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"entry",
"query",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L700-L715 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingManager.get_grade_entry_query_session_for_gradebook | def get_grade_entry_query_session_for_gradebook(self, gradebook_id):
"""Gets the ``OsidSession`` associated with the grade entry query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
return: (osid.grading.GradeEntryQuerySession) - ``a
... | python | def get_grade_entry_query_session_for_gradebook(self, gradebook_id):
"""Gets the ``OsidSession`` associated with the grade entry query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
return: (osid.grading.GradeEntryQuerySession) - ``a
... | [
"def",
"get_grade_entry_query_session_for_gradebook",
"(",
"self",
",",
"gradebook_id",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_entry_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if the catalog ... | Gets the ``OsidSession`` associated with the grade entry query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
return: (osid.grading.GradeEntryQuerySession) - ``a
GradeEntryQuerySession``
raise: NotFound - ``gradebook_id`` not fou... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"entry",
"query",
"service",
"for",
"the",
"given",
"gradebook",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L721-L743 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingManager.get_grade_entry_admin_session | def get_grade_entry_admin_session(self):
"""Gets the ``OsidSession`` associated with the grade entry administration service.
return: (osid.grading.GradeEntryAdminSession) - a
``GradeEntryAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplem... | python | def get_grade_entry_admin_session(self):
"""Gets the ``OsidSession`` associated with the grade entry administration service.
return: (osid.grading.GradeEntryAdminSession) - a
``GradeEntryAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplem... | [
"def",
"get_grade_entry_admin_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_entry_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"GradeEntryAdminSession",... | Gets the ``OsidSession`` associated with the grade entry administration service.
return: (osid.grading.GradeEntryAdminSession) - a
``GradeEntryAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_grade_entry_admin()`` is
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"entry",
"administration",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L746-L761 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingManager.get_gradebook_column_admin_session | def get_gradebook_column_admin_session(self):
"""Gets the ``OsidSession`` associated with the gradebook column administration service.
return: (osid.grading.GradebookColumnAdminSession) - a
``GradebookColumnAdminSession``
raise: OperationFailed - unable to complete request
... | python | def get_gradebook_column_admin_session(self):
"""Gets the ``OsidSession`` associated with the gradebook column administration service.
return: (osid.grading.GradebookColumnAdminSession) - a
``GradebookColumnAdminSession``
raise: OperationFailed - unable to complete request
... | [
"def",
"get_gradebook_column_admin_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_column_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"GradebookColum... | Gets the ``OsidSession`` associated with the gradebook column administration service.
return: (osid.grading.GradebookColumnAdminSession) - a
``GradebookColumnAdminSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented - ``supports_gradebook_column_a... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"gradebook",
"column",
"administration",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L884-L899 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingManager.get_gradebook_column_admin_session_for_gradebook | def get_gradebook_column_admin_session_for_gradebook(self, gradebook_id):
"""Gets the ``OsidSession`` associated with the gradebook column admin service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
return: (osid.grading.GradebookColumnAdminSession) - `... | python | def get_gradebook_column_admin_session_for_gradebook(self, gradebook_id):
"""Gets the ``OsidSession`` associated with the gradebook column admin service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
return: (osid.grading.GradebookColumnAdminSession) - `... | [
"def",
"get_gradebook_column_admin_session_for_gradebook",
"(",
"self",
",",
"gradebook_id",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_column_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to see if th... | Gets the ``OsidSession`` associated with the gradebook column admin service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
return: (osid.grading.GradebookColumnAdminSession) - ``a
GradebookColumnAdminSession``
raise: NotFound - ``gradebo... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"gradebook",
"column",
"admin",
"service",
"for",
"the",
"given",
"gradebook",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L905-L927 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingManager.get_gradebook_column_gradebook_session | def get_gradebook_column_gradebook_session(self):
"""Gets the session for retrieving gradebook column to gradebook mappings.
return: (osid.grading.GradebookColumnGradebookSession) - a
``GradebookColumnGradebookSession``
raise: OperationFailed - unable to complete request
... | python | def get_gradebook_column_gradebook_session(self):
"""Gets the session for retrieving gradebook column to gradebook mappings.
return: (osid.grading.GradebookColumnGradebookSession) - a
``GradebookColumnGradebookSession``
raise: OperationFailed - unable to complete request
... | [
"def",
"get_gradebook_column_gradebook_session",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_column_gradebook",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Gradeb... | Gets the session for retrieving gradebook column to gradebook mappings.
return: (osid.grading.GradebookColumnGradebookSession) - a
``GradebookColumnGradebookSession``
raise: OperationFailed - unable to complete request
raise: Unimplemented -
``supports_gradeboo... | [
"Gets",
"the",
"session",
"for",
"retrieving",
"gradebook",
"column",
"to",
"gradebook",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L930-L945 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_grade_system_lookup_session | def get_grade_system_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the grade system lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemLookupSession) - a
``GradeSystemLookupSession``
raise: NullArgument ... | python | def get_grade_system_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the grade system lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemLookupSession) - a
``GradeSystemLookupSession``
raise: NullArgument ... | [
"def",
"get_grade_system_lookup_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_system_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Gr... | Gets the ``OsidSession`` associated with the grade system lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemLookupSession) - a
``GradeSystemLookupSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - una... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"system",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1163-L1180 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_grade_system_lookup_session_for_gradebook | def get_grade_system_lookup_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the grade system lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
ret... | python | def get_grade_system_lookup_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the grade system lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
ret... | [
"def",
"get_grade_system_lookup_session_for_gradebook",
"(",
"self",
",",
"gradebook_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_system_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check ... | Gets the ``OsidSession`` associated with the grade system lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemLookupSession) - ``a
GradeSystemLookupSessi... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"system",
"lookup",
"service",
"for",
"the",
"given",
"gradebook",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1183-L1206 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_grade_system_admin_session_for_gradebook | def get_grade_system_admin_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the grade system admin service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
retur... | python | def get_grade_system_admin_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the grade system admin service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
retur... | [
"def",
"get_grade_system_admin_session_for_gradebook",
"(",
"self",
",",
"gradebook_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_system_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to... | Gets the ``OsidSession`` associated with the grade system admin service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemAdminSession) - ``a
GradeSystemAdminSession`... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"system",
"admin",
"service",
"for",
"the",
"given",
"gradebook",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1275-L1298 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_grade_system_gradebook_session | def get_grade_system_gradebook_session(self, proxy):
"""Gets the session for retrieving grade system to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemGradebookSession) - a
``GradeSystemGradebookSession``
raise: NullArgume... | python | def get_grade_system_gradebook_session(self, proxy):
"""Gets the session for retrieving grade system to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemGradebookSession) - a
``GradeSystemGradebookSession``
raise: NullArgume... | [
"def",
"get_grade_system_gradebook_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_system_gradebook",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",... | Gets the session for retrieving grade system to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemGradebookSession) - a
``GradeSystemGradebookSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - una... | [
"Gets",
"the",
"session",
"for",
"retrieving",
"grade",
"system",
"to",
"gradebook",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1301-L1318 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_grade_system_gradebook_assignment_session | def get_grade_system_gradebook_assignment_session(self, proxy):
"""Gets the session for assigning grade system to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemGradebookSession) - a
``GradeSystemGradebookAssignmentSession``
... | python | def get_grade_system_gradebook_assignment_session(self, proxy):
"""Gets the session for assigning grade system to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemGradebookSession) - a
``GradeSystemGradebookAssignmentSession``
... | [
"def",
"get_grade_system_gradebook_assignment_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_system_gradebook_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return"... | Gets the session for assigning grade system to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeSystemGradebookSession) - a
``GradeSystemGradebookAssignmentSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFai... | [
"Gets",
"the",
"session",
"for",
"assigning",
"grade",
"system",
"to",
"gradebook",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1321-L1339 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_grade_entry_lookup_session | def get_grade_entry_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the grade entry lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeEntryLookupSession) - a
``GradeEntryLookupSession``
raise: NullArgument - ``... | python | def get_grade_entry_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the grade entry lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeEntryLookupSession) - a
``GradeEntryLookupSession``
raise: NullArgument - ``... | [
"def",
"get_grade_entry_lookup_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_entry_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Grad... | Gets the ``OsidSession`` associated with the grade entry lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeEntryLookupSession) - a
``GradeEntryLookupSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"entry",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1342-L1359 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_grade_entry_lookup_session_for_gradebook | def get_grade_entry_lookup_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the grade entry lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
retur... | python | def get_grade_entry_lookup_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the grade entry lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
retur... | [
"def",
"get_grade_entry_lookup_session_for_gradebook",
"(",
"self",
",",
"gradebook_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_entry_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to... | Gets the ``OsidSession`` associated with the grade entry lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeEntryLookupSession) - ``a
GradeEntryLookupSession`... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"entry",
"lookup",
"service",
"for",
"the",
"given",
"gradebook",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1362-L1385 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_grade_entry_admin_session_for_gradebook | def get_grade_entry_admin_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the grade entry admin service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
return:... | python | def get_grade_entry_admin_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the grade entry admin service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
return:... | [
"def",
"get_grade_entry_admin_session_for_gradebook",
"(",
"self",
",",
"gradebook_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_grade_entry_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include check to s... | Gets the ``OsidSession`` associated with the grade entry admin service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradeEntryAdminSession) - ``a
GradeEntryAdminSession``
... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"grade",
"entry",
"admin",
"service",
"for",
"the",
"given",
"gradebook",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1454-L1477 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_gradebook_column_lookup_session | def get_gradebook_column_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnLookupSession) - a
``GradebookColumnLookupSession``
raise... | python | def get_gradebook_column_lookup_session(self, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnLookupSession) - a
``GradebookColumnLookupSession``
raise... | [
"def",
"get_gradebook_column_lookup_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_column_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".... | Gets the ``OsidSession`` associated with the gradebook column lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnLookupSession) - a
``GradebookColumnLookupSession``
raise: NullArgument - ``proxy`` is ``null``
raise: Operation... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"gradebook",
"column",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1480-L1497 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_gradebook_column_lookup_session_for_gradebook | def get_gradebook_column_lookup_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
... | python | def get_gradebook_column_lookup_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
... | [
"def",
"get_gradebook_column_lookup_session_for_gradebook",
"(",
"self",
",",
"gradebook_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_column_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also includ... | Gets the ``OsidSession`` associated with the gradebook column lookup service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnLookupSession) - ``a
_gradebook_col... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"gradebook",
"column",
"lookup",
"service",
"for",
"the",
"given",
"gradebook",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1500-L1523 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_gradebook_column_query_session | def get_gradebook_column_query_session(self, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnQuerySession) - a
``GradebookColumnQuerySession``
raise: N... | python | def get_gradebook_column_query_session(self, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnQuerySession) - a
``GradebookColumnQuerySession``
raise: N... | [
"def",
"get_gradebook_column_query_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_column_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",... | Gets the ``OsidSession`` associated with the gradebook column query service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnQuerySession) - a
``GradebookColumnQuerySession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFai... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"gradebook",
"column",
"query",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1526-L1543 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_gradebook_column_query_session_for_gradebook | def get_gradebook_column_query_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
... | python | def get_gradebook_column_query_session_for_gradebook(self, gradebook_id, proxy):
"""Gets the ``OsidSession`` associated with the gradebook column query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
... | [
"def",
"get_gradebook_column_query_session_for_gradebook",
"(",
"self",
",",
"gradebook_id",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_column_query",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"##",
"# Also include ... | Gets the ``OsidSession`` associated with the gradebook column query service for the given gradebook.
arg: gradebook_id (osid.id.Id): the ``Id`` of the gradebook
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnQuerySession) - a
``GradebookColumnQ... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"gradebook",
"column",
"query",
"service",
"for",
"the",
"given",
"gradebook",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1546-L1569 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_gradebook_column_gradebook_assignment_session | def get_gradebook_column_gradebook_assignment_session(self, proxy):
"""Gets the session for assigning gradebook column to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnGradebookAssignmentSession)
- a ``GradebookColumnGradebook... | python | def get_gradebook_column_gradebook_assignment_session(self, proxy):
"""Gets the session for assigning gradebook column to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnGradebookAssignmentSession)
- a ``GradebookColumnGradebook... | [
"def",
"get_gradebook_column_gradebook_assignment_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_column_gradebook_assignment",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
... | Gets the session for assigning gradebook column to gradebook mappings.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookColumnGradebookAssignmentSession)
- a ``GradebookColumnGradebookAssignmentSession``
raise: NullArgument - ``proxy`` is ``null``
... | [
"Gets",
"the",
"session",
"for",
"assigning",
"gradebook",
"column",
"to",
"gradebook",
"mappings",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1638-L1657 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_gradebook_lookup_session | def get_gradebook_lookup_session(self, proxy):
"""Gets the OsidSession associated with the gradebook lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookLookupSession) - a
``GradebookLookupSession``
raise: NullArgument - ``proxy`` is... | python | def get_gradebook_lookup_session(self, proxy):
"""Gets the OsidSession associated with the gradebook lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookLookupSession) - a
``GradebookLookupSession``
raise: NullArgument - ``proxy`` is... | [
"def",
"get_gradebook_lookup_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_lookup",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Gradeboo... | Gets the OsidSession associated with the gradebook lookup service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookLookupSession) - a
``GradebookLookupSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to comp... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"gradebook",
"lookup",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1660-L1676 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_gradebook_admin_session | def get_gradebook_admin_session(self, proxy):
"""Gets the OsidSession associated with the gradebook administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookAdminSession) - a
``GradebookAdminSession``
raise: NullArgument - ``proxy... | python | def get_gradebook_admin_session(self, proxy):
"""Gets the OsidSession associated with the gradebook administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookAdminSession) - a
``GradebookAdminSession``
raise: NullArgument - ``proxy... | [
"def",
"get_gradebook_admin_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_admin",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"GradebookA... | Gets the OsidSession associated with the gradebook administration service.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookAdminSession) - a
``GradebookAdminSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable t... | [
"Gets",
"the",
"OsidSession",
"associated",
"with",
"the",
"gradebook",
"administration",
"service",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1679-L1695 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_gradebook_hierarchy_session | def get_gradebook_hierarchy_session(self, proxy):
"""Gets the session traversing gradebook hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookHierarchySession) - a
``GradebookHierarchySession``
raise: NullArgument - ``proxy`` is ``null... | python | def get_gradebook_hierarchy_session(self, proxy):
"""Gets the session traversing gradebook hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookHierarchySession) - a
``GradebookHierarchySession``
raise: NullArgument - ``proxy`` is ``null... | [
"def",
"get_gradebook_hierarchy_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_hierarchy",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions",
".",
"Gr... | Gets the session traversing gradebook hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookHierarchySession) - a
``GradebookHierarchySession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to complete reque... | [
"Gets",
"the",
"session",
"traversing",
"gradebook",
"hierarchies",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1698-L1715 |
mitsei/dlkit | dlkit/json_/grading/managers.py | GradingProxyManager.get_gradebook_hierarchy_design_session | def get_gradebook_hierarchy_design_session(self, proxy):
"""Gets the session designing gradebook hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookHierarchyDesignSession) - a
``GradebookHierarchyDesignSession``
raise: NullArgument - `... | python | def get_gradebook_hierarchy_design_session(self, proxy):
"""Gets the session designing gradebook hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookHierarchyDesignSession) - a
``GradebookHierarchyDesignSession``
raise: NullArgument - `... | [
"def",
"get_gradebook_hierarchy_design_session",
"(",
"self",
",",
"proxy",
")",
":",
"if",
"not",
"self",
".",
"supports_gradebook_hierarchy_design",
"(",
")",
":",
"raise",
"errors",
".",
"Unimplemented",
"(",
")",
"# pylint: disable=no-member",
"return",
"sessions"... | Gets the session designing gradebook hierarchies.
arg: proxy (osid.proxy.Proxy): a proxy
return: (osid.grading.GradebookHierarchyDesignSession) - a
``GradebookHierarchyDesignSession``
raise: NullArgument - ``proxy`` is ``null``
raise: OperationFailed - unable to com... | [
"Gets",
"the",
"session",
"designing",
"gradebook",
"hierarchies",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/grading/managers.py#L1718-L1735 |
mitsei/dlkit | dlkit/services/hierarchy.py | HierarchyManager._set_hierarchy_view | def _set_hierarchy_view(self, session):
"""Sets the underlying hierarchy view to match current view"""
if self._hierarchy_view == COMPARATIVE:
try:
session.use_comparative_hierarchy_view()
except AttributeError:
pass
else:
try:
... | python | def _set_hierarchy_view(self, session):
"""Sets the underlying hierarchy view to match current view"""
if self._hierarchy_view == COMPARATIVE:
try:
session.use_comparative_hierarchy_view()
except AttributeError:
pass
else:
try:
... | [
"def",
"_set_hierarchy_view",
"(",
"self",
",",
"session",
")",
":",
"if",
"self",
".",
"_hierarchy_view",
"==",
"COMPARATIVE",
":",
"try",
":",
"session",
".",
"use_comparative_hierarchy_view",
"(",
")",
"except",
"AttributeError",
":",
"pass",
"else",
":",
"... | Sets the underlying hierarchy view to match current view | [
"Sets",
"the",
"underlying",
"hierarchy",
"view",
"to",
"match",
"current",
"view"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L94-L105 |
mitsei/dlkit | dlkit/services/hierarchy.py | HierarchyManager._instantiate_session | def _instantiate_session(self, method_name, proxy=None, *args, **kwargs):
"""Instantiates a provider session"""
if 'manager' in kwargs:
session_class = getattr(kwargs['manager'], method_name)
del kwargs['manager']
else:
session_class = getattr(self._provider_m... | python | def _instantiate_session(self, method_name, proxy=None, *args, **kwargs):
"""Instantiates a provider session"""
if 'manager' in kwargs:
session_class = getattr(kwargs['manager'], method_name)
del kwargs['manager']
else:
session_class = getattr(self._provider_m... | [
"def",
"_instantiate_session",
"(",
"self",
",",
"method_name",
",",
"proxy",
"=",
"None",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"'manager'",
"in",
"kwargs",
":",
"session_class",
"=",
"getattr",
"(",
"kwargs",
"[",
"'manager'",
"]",... | Instantiates a provider session | [
"Instantiates",
"a",
"provider",
"session"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L154-L170 |
mitsei/dlkit | dlkit/services/hierarchy.py | HierarchyManager.use_comparative_hierarchy_view | def use_comparative_hierarchy_view(self):
"""Pass through to provider HierarchyLookupSession.use_comparative_hierarchy_view"""
self._hierarchy_view = COMPARATIVE
# self._get_provider_session('hierarchy_lookup_session') # To make sure the session is tracked
for session in self._get_provid... | python | def use_comparative_hierarchy_view(self):
"""Pass through to provider HierarchyLookupSession.use_comparative_hierarchy_view"""
self._hierarchy_view = COMPARATIVE
# self._get_provider_session('hierarchy_lookup_session') # To make sure the session is tracked
for session in self._get_provid... | [
"def",
"use_comparative_hierarchy_view",
"(",
"self",
")",
":",
"self",
".",
"_hierarchy_view",
"=",
"COMPARATIVE",
"# self._get_provider_session('hierarchy_lookup_session') # To make sure the session is tracked",
"for",
"session",
"in",
"self",
".",
"_get_provider_sessions",
"("... | Pass through to provider HierarchyLookupSession.use_comparative_hierarchy_view | [
"Pass",
"through",
"to",
"provider",
"HierarchyLookupSession",
".",
"use_comparative_hierarchy_view"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L334-L342 |
mitsei/dlkit | dlkit/services/hierarchy.py | HierarchyManager.use_plenary_hierarchy_view | def use_plenary_hierarchy_view(self):
"""Pass through to provider HierarchyLookupSession.use_plenary_hierarchy_view"""
self._hierarchy_view = PLENARY
# self._get_provider_session('hierarchy_lookup_session') # To make sure the session is tracked
for session in self._get_provider_sessions(... | python | def use_plenary_hierarchy_view(self):
"""Pass through to provider HierarchyLookupSession.use_plenary_hierarchy_view"""
self._hierarchy_view = PLENARY
# self._get_provider_session('hierarchy_lookup_session') # To make sure the session is tracked
for session in self._get_provider_sessions(... | [
"def",
"use_plenary_hierarchy_view",
"(",
"self",
")",
":",
"self",
".",
"_hierarchy_view",
"=",
"PLENARY",
"# self._get_provider_session('hierarchy_lookup_session') # To make sure the session is tracked",
"for",
"session",
"in",
"self",
".",
"_get_provider_sessions",
"(",
")",... | Pass through to provider HierarchyLookupSession.use_plenary_hierarchy_view | [
"Pass",
"through",
"to",
"provider",
"HierarchyLookupSession",
".",
"use_plenary_hierarchy_view"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L344-L352 |
mitsei/dlkit | dlkit/services/hierarchy.py | HierarchyManager.get_hierarchies_by_ids | def get_hierarchies_by_ids(self, *args, **kwargs):
"""Pass through to provider HierarchyLookupSession.get_hierarchies_by_ids"""
# Implemented from kitosid template for -
# osid.resource.BinLookupSession.get_bins_by_ids
catalogs = self._get_provider_session('hierarchy_lookup_session').get... | python | def get_hierarchies_by_ids(self, *args, **kwargs):
"""Pass through to provider HierarchyLookupSession.get_hierarchies_by_ids"""
# Implemented from kitosid template for -
# osid.resource.BinLookupSession.get_bins_by_ids
catalogs = self._get_provider_session('hierarchy_lookup_session').get... | [
"def",
"get_hierarchies_by_ids",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# Implemented from kitosid template for -",
"# osid.resource.BinLookupSession.get_bins_by_ids",
"catalogs",
"=",
"self",
".",
"_get_provider_session",
"(",
"'hierarchy_lookup... | Pass through to provider HierarchyLookupSession.get_hierarchies_by_ids | [
"Pass",
"through",
"to",
"provider",
"HierarchyLookupSession",
".",
"get_hierarchies_by_ids"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L354-L362 |
mitsei/dlkit | dlkit/services/hierarchy.py | HierarchyManager.get_hierarchies | def get_hierarchies(self):
"""Pass through to provider HierarchyLookupSession.get_hierarchies"""
# Implemented from kitosid template for -
# osid.resource.BinLookupSession.get_bins_template
catalogs = self._get_provider_session('hierarchy_lookup_session').get_hierarchies()
cat_li... | python | def get_hierarchies(self):
"""Pass through to provider HierarchyLookupSession.get_hierarchies"""
# Implemented from kitosid template for -
# osid.resource.BinLookupSession.get_bins_template
catalogs = self._get_provider_session('hierarchy_lookup_session').get_hierarchies()
cat_li... | [
"def",
"get_hierarchies",
"(",
"self",
")",
":",
"# Implemented from kitosid template for -",
"# osid.resource.BinLookupSession.get_bins_template",
"catalogs",
"=",
"self",
".",
"_get_provider_session",
"(",
"'hierarchy_lookup_session'",
")",
".",
"get_hierarchies",
"(",
")",
... | Pass through to provider HierarchyLookupSession.get_hierarchies | [
"Pass",
"through",
"to",
"provider",
"HierarchyLookupSession",
".",
"get_hierarchies"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L404-L412 |
mitsei/dlkit | dlkit/services/hierarchy.py | HierarchyManager.create_hierarchy | def create_hierarchy(self, *args, **kwargs):
"""Pass through to provider HierarchyAdminSession.create_hierarchy"""
# Implemented from kitosid template for -
# osid.resource.BinAdminSession.create_bin
return Hierarchy(
self._provider_manager,
self._get_provider_ses... | python | def create_hierarchy(self, *args, **kwargs):
"""Pass through to provider HierarchyAdminSession.create_hierarchy"""
# Implemented from kitosid template for -
# osid.resource.BinAdminSession.create_bin
return Hierarchy(
self._provider_manager,
self._get_provider_ses... | [
"def",
"create_hierarchy",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# Implemented from kitosid template for -",
"# osid.resource.BinAdminSession.create_bin",
"return",
"Hierarchy",
"(",
"self",
".",
"_provider_manager",
",",
"self",
".",
"_ge... | Pass through to provider HierarchyAdminSession.create_hierarchy | [
"Pass",
"through",
"to",
"provider",
"HierarchyAdminSession",
".",
"create_hierarchy"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L436-L444 |
mitsei/dlkit | dlkit/services/hierarchy.py | HierarchyManager.get_hierarchy_form | def get_hierarchy_form(self, *args, **kwargs):
"""Pass through to provider HierarchyAdminSession.get_hierarchy_form_for_update"""
# Implemented from kitosid template for -
# osid.resource.BinAdminSession.get_bin_form_for_update_template
# This method might be a bit sketchy. Time will tel... | python | def get_hierarchy_form(self, *args, **kwargs):
"""Pass through to provider HierarchyAdminSession.get_hierarchy_form_for_update"""
# Implemented from kitosid template for -
# osid.resource.BinAdminSession.get_bin_form_for_update_template
# This method might be a bit sketchy. Time will tel... | [
"def",
"get_hierarchy_form",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# Implemented from kitosid template for -",
"# osid.resource.BinAdminSession.get_bin_form_for_update_template",
"# This method might be a bit sketchy. Time will tell.",
"if",
"isinstance... | Pass through to provider HierarchyAdminSession.get_hierarchy_form_for_update | [
"Pass",
"through",
"to",
"provider",
"HierarchyAdminSession",
".",
"get_hierarchy_form_for_update"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L458-L466 |
mitsei/dlkit | dlkit/services/hierarchy.py | HierarchyManager.save_hierarchy | def save_hierarchy(self, hierarchy_form, *args, **kwargs):
"""Pass through to provider HierarchyAdminSession.update_hierarchy"""
# Implemented from kitosid template for -
# osid.resource.BinAdminSession.update_bin
if hierarchy_form.is_for_update():
return self.update_hierarch... | python | def save_hierarchy(self, hierarchy_form, *args, **kwargs):
"""Pass through to provider HierarchyAdminSession.update_hierarchy"""
# Implemented from kitosid template for -
# osid.resource.BinAdminSession.update_bin
if hierarchy_form.is_for_update():
return self.update_hierarch... | [
"def",
"save_hierarchy",
"(",
"self",
",",
"hierarchy_form",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# Implemented from kitosid template for -",
"# osid.resource.BinAdminSession.update_bin",
"if",
"hierarchy_form",
".",
"is_for_update",
"(",
")",
":",
"r... | Pass through to provider HierarchyAdminSession.update_hierarchy | [
"Pass",
"through",
"to",
"provider",
"HierarchyAdminSession",
".",
"update_hierarchy"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L479-L486 |
mitsei/dlkit | dlkit/services/hierarchy.py | Hierarchy._set_hierarchy_view | def _set_hierarchy_view(self, session):
"""Sets the underlying hierarchy view to match current view"""
if self._hierarchy_view == FEDERATED:
try:
session.use_federated_hierarchy_view()
except AttributeError:
pass
else:
try:
... | python | def _set_hierarchy_view(self, session):
"""Sets the underlying hierarchy view to match current view"""
if self._hierarchy_view == FEDERATED:
try:
session.use_federated_hierarchy_view()
except AttributeError:
pass
else:
try:
... | [
"def",
"_set_hierarchy_view",
"(",
"self",
",",
"session",
")",
":",
"if",
"self",
".",
"_hierarchy_view",
"==",
"FEDERATED",
":",
"try",
":",
"session",
".",
"use_federated_hierarchy_view",
"(",
")",
"except",
"AttributeError",
":",
"pass",
"else",
":",
"try"... | Sets the underlying hierarchy view to match current view | [
"Sets",
"the",
"underlying",
"hierarchy",
"view",
"to",
"match",
"current",
"view"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L556-L567 |
mitsei/dlkit | dlkit/services/hierarchy.py | Hierarchy._set_object_view | def _set_object_view(self, session):
"""Sets the underlying object views to match current view"""
for obj_name in self._object_views:
if self._object_views[obj_name] == PLENARY:
try:
getattr(session, 'use_plenary_' + obj_name + '_view')()
e... | python | def _set_object_view(self, session):
"""Sets the underlying object views to match current view"""
for obj_name in self._object_views:
if self._object_views[obj_name] == PLENARY:
try:
getattr(session, 'use_plenary_' + obj_name + '_view')()
e... | [
"def",
"_set_object_view",
"(",
"self",
",",
"session",
")",
":",
"for",
"obj_name",
"in",
"self",
".",
"_object_views",
":",
"if",
"self",
".",
"_object_views",
"[",
"obj_name",
"]",
"==",
"PLENARY",
":",
"try",
":",
"getattr",
"(",
"session",
",",
"'us... | Sets the underlying object views to match current view | [
"Sets",
"the",
"underlying",
"object",
"views",
"to",
"match",
"current",
"view"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L569-L581 |
mitsei/dlkit | dlkit/services/hierarchy.py | Hierarchy._set_operable_view | def _set_operable_view(self, session):
"""Sets the underlying operable views to match current view"""
for obj_name in self._operable_views:
if self._operable_views[obj_name] == ACTIVE:
try:
getattr(session, 'use_active_' + obj_name + '_view')()
... | python | def _set_operable_view(self, session):
"""Sets the underlying operable views to match current view"""
for obj_name in self._operable_views:
if self._operable_views[obj_name] == ACTIVE:
try:
getattr(session, 'use_active_' + obj_name + '_view')()
... | [
"def",
"_set_operable_view",
"(",
"self",
",",
"session",
")",
":",
"for",
"obj_name",
"in",
"self",
".",
"_operable_views",
":",
"if",
"self",
".",
"_operable_views",
"[",
"obj_name",
"]",
"==",
"ACTIVE",
":",
"try",
":",
"getattr",
"(",
"session",
",",
... | Sets the underlying operable views to match current view | [
"Sets",
"the",
"underlying",
"operable",
"views",
"to",
"match",
"current",
"view"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L583-L595 |
mitsei/dlkit | dlkit/services/hierarchy.py | Hierarchy._set_containable_view | def _set_containable_view(self, session):
"""Sets the underlying containable views to match current view"""
for obj_name in self._containable_views:
if self._containable_views[obj_name] == SEQUESTERED:
try:
getattr(session, 'use_sequestered_' + obj_name + ... | python | def _set_containable_view(self, session):
"""Sets the underlying containable views to match current view"""
for obj_name in self._containable_views:
if self._containable_views[obj_name] == SEQUESTERED:
try:
getattr(session, 'use_sequestered_' + obj_name + ... | [
"def",
"_set_containable_view",
"(",
"self",
",",
"session",
")",
":",
"for",
"obj_name",
"in",
"self",
".",
"_containable_views",
":",
"if",
"self",
".",
"_containable_views",
"[",
"obj_name",
"]",
"==",
"SEQUESTERED",
":",
"try",
":",
"getattr",
"(",
"sess... | Sets the underlying containable views to match current view | [
"Sets",
"the",
"underlying",
"containable",
"views",
"to",
"match",
"current",
"view"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/services/hierarchy.py#L597-L609 |
chop-dbhi/varify | fabfile.py | host_context | def host_context(func):
"Sets the context of the setting to the current host"
@wraps(func)
def decorator(*args, **kwargs):
hosts = get_hosts_settings()
with settings(**hosts[env.host]):
return func(*args, **kwargs)
return decorator | python | def host_context(func):
"Sets the context of the setting to the current host"
@wraps(func)
def decorator(*args, **kwargs):
hosts = get_hosts_settings()
with settings(**hosts[env.host]):
return func(*args, **kwargs)
return decorator | [
"def",
"host_context",
"(",
"func",
")",
":",
"@",
"wraps",
"(",
"func",
")",
"def",
"decorator",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"hosts",
"=",
"get_hosts_settings",
"(",
")",
"with",
"settings",
"(",
"*",
"*",
"hosts",
"[",
"e... | Sets the context of the setting to the current host | [
"Sets",
"the",
"context",
"of",
"the",
"setting",
"to",
"the",
"current",
"host"
] | train | https://github.com/chop-dbhi/varify/blob/5dc721e49ed9bd3582f4b117785fdd1a8b6ba777/fabfile.py#L94-L101 |
chop-dbhi/varify | fabfile.py | merge_commit | def merge_commit(commit):
"Fetches the latest code and merges up the specified commit."
with cd(env.path):
run('git fetch')
if '@' in commit:
branch, commit = commit.split('@')
run('git checkout {0}'.format(branch))
run('git merge {0}'.format(commit)) | python | def merge_commit(commit):
"Fetches the latest code and merges up the specified commit."
with cd(env.path):
run('git fetch')
if '@' in commit:
branch, commit = commit.split('@')
run('git checkout {0}'.format(branch))
run('git merge {0}'.format(commit)) | [
"def",
"merge_commit",
"(",
"commit",
")",
":",
"with",
"cd",
"(",
"env",
".",
"path",
")",
":",
"run",
"(",
"'git fetch'",
")",
"if",
"'@'",
"in",
"commit",
":",
"branch",
",",
"commit",
"=",
"commit",
".",
"split",
"(",
"'@'",
")",
"run",
"(",
... | Fetches the latest code and merges up the specified commit. | [
"Fetches",
"the",
"latest",
"code",
"and",
"merges",
"up",
"the",
"specified",
"commit",
"."
] | train | https://github.com/chop-dbhi/varify/blob/5dc721e49ed9bd3582f4b117785fdd1a8b6ba777/fabfile.py#L105-L112 |
chop-dbhi/varify | fabfile.py | migrate | def migrate(app_name=None, revision=None):
"Syncs and migrates the database using South."
cmd = ['python bin/manage.py syncdb --migrate']
if app_name:
cmd.append(app_name)
if revision:
cmd.append(revision)
verun(' '.join(cmd)) | python | def migrate(app_name=None, revision=None):
"Syncs and migrates the database using South."
cmd = ['python bin/manage.py syncdb --migrate']
if app_name:
cmd.append(app_name)
if revision:
cmd.append(revision)
verun(' '.join(cmd)) | [
"def",
"migrate",
"(",
"app_name",
"=",
"None",
",",
"revision",
"=",
"None",
")",
":",
"cmd",
"=",
"[",
"'python bin/manage.py syncdb --migrate'",
"]",
"if",
"app_name",
":",
"cmd",
".",
"append",
"(",
"app_name",
")",
"if",
"revision",
":",
"cmd",
".",
... | Syncs and migrates the database using South. | [
"Syncs",
"and",
"migrates",
"the",
"database",
"using",
"South",
"."
] | train | https://github.com/chop-dbhi/varify/blob/5dc721e49ed9bd3582f4b117785fdd1a8b6ba777/fabfile.py#L123-L130 |
chop-dbhi/varify | fabfile.py | reload_wsgi | def reload_wsgi():
"Gets the PID for the wsgi process and sends a HUP signal."
pid = run('supervisorctl pid varify-{host}'.format(host=env.host))
try:
int(pid)
sudo('kill -HUP {0}'.format(pid))
except (TypeError, ValueError):
pass | python | def reload_wsgi():
"Gets the PID for the wsgi process and sends a HUP signal."
pid = run('supervisorctl pid varify-{host}'.format(host=env.host))
try:
int(pid)
sudo('kill -HUP {0}'.format(pid))
except (TypeError, ValueError):
pass | [
"def",
"reload_wsgi",
"(",
")",
":",
"pid",
"=",
"run",
"(",
"'supervisorctl pid varify-{host}'",
".",
"format",
"(",
"host",
"=",
"env",
".",
"host",
")",
")",
"try",
":",
"int",
"(",
"pid",
")",
"sudo",
"(",
"'kill -HUP {0}'",
".",
"format",
"(",
"pi... | Gets the PID for the wsgi process and sends a HUP signal. | [
"Gets",
"the",
"PID",
"for",
"the",
"wsgi",
"process",
"and",
"sends",
"a",
"HUP",
"signal",
"."
] | train | https://github.com/chop-dbhi/varify/blob/5dc721e49ed9bd3582f4b117785fdd1a8b6ba777/fabfile.py#L162-L169 |
chop-dbhi/varify | fabfile.py | setup | def setup():
"Sets up the initial environment."
parent, project = os.path.split(env.path)
if not exists(parent):
run('mkdir -p {0}'.format(parent))
run('virtualenv {0}'.format(parent))
with cd(parent):
if not exists(project):
run('git clone {repo_url} {project}'.for... | python | def setup():
"Sets up the initial environment."
parent, project = os.path.split(env.path)
if not exists(parent):
run('mkdir -p {0}'.format(parent))
run('virtualenv {0}'.format(parent))
with cd(parent):
if not exists(project):
run('git clone {repo_url} {project}'.for... | [
"def",
"setup",
"(",
")",
":",
"parent",
",",
"project",
"=",
"os",
".",
"path",
".",
"split",
"(",
"env",
".",
"path",
")",
"if",
"not",
"exists",
"(",
"parent",
")",
":",
"run",
"(",
"'mkdir -p {0}'",
".",
"format",
"(",
"parent",
")",
")",
"ru... | Sets up the initial environment. | [
"Sets",
"up",
"the",
"initial",
"environment",
"."
] | train | https://github.com/chop-dbhi/varify/blob/5dc721e49ed9bd3582f4b117785fdd1a8b6ba777/fabfile.py#L202-L212 |
chop-dbhi/varify | fabfile.py | upload_settings | def upload_settings():
"Uploads the non-versioned local settings to the server."
local_path = os.path.join(curdir, 'settings/{0}.py'.format(env.host))
if os.path.exists(local_path):
remote_path = os.path.join(env.path, 'varify/conf/local_settings.py')
put(local_path, remote_path)
elif no... | python | def upload_settings():
"Uploads the non-versioned local settings to the server."
local_path = os.path.join(curdir, 'settings/{0}.py'.format(env.host))
if os.path.exists(local_path):
remote_path = os.path.join(env.path, 'varify/conf/local_settings.py')
put(local_path, remote_path)
elif no... | [
"def",
"upload_settings",
"(",
")",
":",
"local_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"curdir",
",",
"'settings/{0}.py'",
".",
"format",
"(",
"env",
".",
"host",
")",
")",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"local_path",
")",
":"... | Uploads the non-versioned local settings to the server. | [
"Uploads",
"the",
"non",
"-",
"versioned",
"local",
"settings",
"to",
"the",
"server",
"."
] | train | https://github.com/chop-dbhi/varify/blob/5dc721e49ed9bd3582f4b117785fdd1a8b6ba777/fabfile.py#L216-L223 |
incuna/incuna-mail | incuna_mail.py | send | def send(template_name, sender=None, to=None, cc=None, bcc=None, subject='mail',
attachments=(), html_template_name=None, context=None, headers=None,
reply_to=None):
"""
Render and send an email. `template_name` is a plaintext template.
If `html_template_name` is passed then a multipart ... | python | def send(template_name, sender=None, to=None, cc=None, bcc=None, subject='mail',
attachments=(), html_template_name=None, context=None, headers=None,
reply_to=None):
"""
Render and send an email. `template_name` is a plaintext template.
If `html_template_name` is passed then a multipart ... | [
"def",
"send",
"(",
"template_name",
",",
"sender",
"=",
"None",
",",
"to",
"=",
"None",
",",
"cc",
"=",
"None",
",",
"bcc",
"=",
"None",
",",
"subject",
"=",
"'mail'",
",",
"attachments",
"=",
"(",
")",
",",
"html_template_name",
"=",
"None",
",",
... | Render and send an email. `template_name` is a plaintext template.
If `html_template_name` is passed then a multipart email will be sent using
`template_name` for the text part and `html_template_name` for the HTML part.
The context will include any `context` specified.
If no `sender` is specified th... | [
"Render",
"and",
"send",
"an",
"email",
".",
"template_name",
"is",
"a",
"plaintext",
"template",
"."
] | train | https://github.com/incuna/incuna-mail/blob/1d0c9daffd748a65f0b336b5482a9c91f90f6f50/incuna_mail.py#L11-L54 |
ilgarm/pyzimbra | pyzimbra/z/admin.py | ZimbraAdmin.get_info | def get_info(self, account, params={}):
"""
Gets account info.
@param account: account to get info for
@param params: parameters to retrieve
@return: AccountInfo
"""
res = self.invoke(zconstant.NS_ZIMBRA_ADMIN_URL,
sconstant.GetInfoReques... | python | def get_info(self, account, params={}):
"""
Gets account info.
@param account: account to get info for
@param params: parameters to retrieve
@return: AccountInfo
"""
res = self.invoke(zconstant.NS_ZIMBRA_ADMIN_URL,
sconstant.GetInfoReques... | [
"def",
"get_info",
"(",
"self",
",",
"account",
",",
"params",
"=",
"{",
"}",
")",
":",
"res",
"=",
"self",
".",
"invoke",
"(",
"zconstant",
".",
"NS_ZIMBRA_ADMIN_URL",
",",
"sconstant",
".",
"GetInfoRequest",
",",
"params",
")",
"return",
"res"
] | Gets account info.
@param account: account to get info for
@param params: parameters to retrieve
@return: AccountInfo | [
"Gets",
"account",
"info",
"."
] | train | https://github.com/ilgarm/pyzimbra/blob/c397bc7497554d260ec6fd1a80405aed872a70cc/pyzimbra/z/admin.py#L66-L77 |
mitsei/dlkit | dlkit/records/assessment/fbw/assessment_records.py | GeneratedAssessmentFormRecord._init_metadata | def _init_metadata(self):
"""stub"""
self._source_assessment_taken_id_metadata = {
'element_id': Id(self.my_osid_object_form._authority,
self.my_osid_object_form._namespace,
'source_assessment_taken_id'),
'element_label': ... | python | def _init_metadata(self):
"""stub"""
self._source_assessment_taken_id_metadata = {
'element_id': Id(self.my_osid_object_form._authority,
self.my_osid_object_form._namespace,
'source_assessment_taken_id'),
'element_label': ... | [
"def",
"_init_metadata",
"(",
"self",
")",
":",
"self",
".",
"_source_assessment_taken_id_metadata",
"=",
"{",
"'element_id'",
":",
"Id",
"(",
"self",
".",
"my_osid_object_form",
".",
"_authority",
",",
"self",
".",
"my_osid_object_form",
".",
"_namespace",
",",
... | stub | [
"stub"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/records/assessment/fbw/assessment_records.py#L106-L121 |
5monkeys/content-io | cio/pipeline/pipes/base.py | BasePipe.materialize_node | def materialize_node(self, node, uri, content, meta=None):
"""
Set node uri and content from backend
"""
node.uri = uri
node.content = content
node.meta = meta if meta is not None else {} | python | def materialize_node(self, node, uri, content, meta=None):
"""
Set node uri and content from backend
"""
node.uri = uri
node.content = content
node.meta = meta if meta is not None else {} | [
"def",
"materialize_node",
"(",
"self",
",",
"node",
",",
"uri",
",",
"content",
",",
"meta",
"=",
"None",
")",
":",
"node",
".",
"uri",
"=",
"uri",
"node",
".",
"content",
"=",
"content",
"node",
".",
"meta",
"=",
"meta",
"if",
"meta",
"is",
"not"... | Set node uri and content from backend | [
"Set",
"node",
"uri",
"and",
"content",
"from",
"backend"
] | train | https://github.com/5monkeys/content-io/blob/8c8519c74cbadab871f7151c0e02252cb5753759/cio/pipeline/pipes/base.py#L34-L40 |
morngrar/betterdialogs | betterdialogs/images.py | load_image | def load_image(canvas, filepath, bounds=None):
"""Takes a tk.Canvas and a filepath, loads image into canvas"""
image_data = Image.open(filepath)
if bounds:
image_data.thumbnail(bounds, PIL.Image.ANTIALIAS)
canvas.image = ImageTk.PhotoImage(image_data)
canvas.create_image(0, 0, image=canvas.... | python | def load_image(canvas, filepath, bounds=None):
"""Takes a tk.Canvas and a filepath, loads image into canvas"""
image_data = Image.open(filepath)
if bounds:
image_data.thumbnail(bounds, PIL.Image.ANTIALIAS)
canvas.image = ImageTk.PhotoImage(image_data)
canvas.create_image(0, 0, image=canvas.... | [
"def",
"load_image",
"(",
"canvas",
",",
"filepath",
",",
"bounds",
"=",
"None",
")",
":",
"image_data",
"=",
"Image",
".",
"open",
"(",
"filepath",
")",
"if",
"bounds",
":",
"image_data",
".",
"thumbnail",
"(",
"bounds",
",",
"PIL",
".",
"Image",
".",... | Takes a tk.Canvas and a filepath, loads image into canvas | [
"Takes",
"a",
"tk",
".",
"Canvas",
"and",
"a",
"filepath",
"loads",
"image",
"into",
"canvas"
] | train | https://github.com/morngrar/betterdialogs/blob/185570c8dd6ea3718fef5e09ac1647e716d8bff5/betterdialogs/images.py#L5-L12 |
morngrar/betterdialogs | betterdialogs/images.py | ImageFrame.load_image | def load_image(self, imagepath, width=None, height=None):
"""Loads new image into canvas, updating size if needed."""
if width:
self.width = width
self.canvas["width"] = width
if height:
self.height = height
self.canvas["height"] = height
... | python | def load_image(self, imagepath, width=None, height=None):
"""Loads new image into canvas, updating size if needed."""
if width:
self.width = width
self.canvas["width"] = width
if height:
self.height = height
self.canvas["height"] = height
... | [
"def",
"load_image",
"(",
"self",
",",
"imagepath",
",",
"width",
"=",
"None",
",",
"height",
"=",
"None",
")",
":",
"if",
"width",
":",
"self",
".",
"width",
"=",
"width",
"self",
".",
"canvas",
"[",
"\"width\"",
"]",
"=",
"width",
"if",
"height",
... | Loads new image into canvas, updating size if needed. | [
"Loads",
"new",
"image",
"into",
"canvas",
"updating",
"size",
"if",
"needed",
"."
] | train | https://github.com/morngrar/betterdialogs/blob/185570c8dd6ea3718fef5e09ac1647e716d8bff5/betterdialogs/images.py#L43-L56 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationSession._get_hierarchy_session | def _get_hierarchy_session(self, hierarchy_id):
"""Returns a hierarchy traversal session for the hierarchy"""
hierarchy_mgr = self._get_provider_manager('HIERARCHY', local=True)
return hierarchy_mgr.get_hierarchy_traversal_session_for_hierarchy(
hierarchy_id,
proxy=self._... | python | def _get_hierarchy_session(self, hierarchy_id):
"""Returns a hierarchy traversal session for the hierarchy"""
hierarchy_mgr = self._get_provider_manager('HIERARCHY', local=True)
return hierarchy_mgr.get_hierarchy_traversal_session_for_hierarchy(
hierarchy_id,
proxy=self._... | [
"def",
"_get_hierarchy_session",
"(",
"self",
",",
"hierarchy_id",
")",
":",
"hierarchy_mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'HIERARCHY'",
",",
"local",
"=",
"True",
")",
"return",
"hierarchy_mgr",
".",
"get_hierarchy_traversal_session_for_hierarchy",
... | Returns a hierarchy traversal session for the hierarchy | [
"Returns",
"a",
"hierarchy",
"traversal",
"session",
"for",
"the",
"hierarchy"
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L142-L147 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationSession._caching_enabled | def _caching_enabled(self):
"""Returns True if caching is enabled per configuration, false otherwise."""
try:
config = self._runtime.get_configuration()
parameter_id = Id('parameter:useCachingForQualifierIds@json')
if config.get_value_by_parameter(parameter_id).get_bo... | python | def _caching_enabled(self):
"""Returns True if caching is enabled per configuration, false otherwise."""
try:
config = self._runtime.get_configuration()
parameter_id = Id('parameter:useCachingForQualifierIds@json')
if config.get_value_by_parameter(parameter_id).get_bo... | [
"def",
"_caching_enabled",
"(",
"self",
")",
":",
"try",
":",
"config",
"=",
"self",
".",
"_runtime",
".",
"get_configuration",
"(",
")",
"parameter_id",
"=",
"Id",
"(",
"'parameter:useCachingForQualifierIds@json'",
")",
"if",
"config",
".",
"get_value_by_paramete... | Returns True if caching is enabled per configuration, false otherwise. | [
"Returns",
"True",
"if",
"caching",
"is",
"enabled",
"per",
"configuration",
"false",
"otherwise",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L149-L159 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationSession._get_parent_id_list | def _get_parent_id_list(self, qualifier_id, hierarchy_id):
"""Returns list of parent id strings for qualifier_id in hierarchy.
Uses memcache if caching is enabled.
"""
if self._caching_enabled():
key = 'parent_id_list_{0}'.format(str(qualifier_id))
# If configu... | python | def _get_parent_id_list(self, qualifier_id, hierarchy_id):
"""Returns list of parent id strings for qualifier_id in hierarchy.
Uses memcache if caching is enabled.
"""
if self._caching_enabled():
key = 'parent_id_list_{0}'.format(str(qualifier_id))
# If configu... | [
"def",
"_get_parent_id_list",
"(",
"self",
",",
"qualifier_id",
",",
"hierarchy_id",
")",
":",
"if",
"self",
".",
"_caching_enabled",
"(",
")",
":",
"key",
"=",
"'parent_id_list_{0}'",
".",
"format",
"(",
"str",
"(",
"qualifier_id",
")",
")",
"# If configured ... | Returns list of parent id strings for qualifier_id in hierarchy.
Uses memcache if caching is enabled. | [
"Returns",
"list",
"of",
"parent",
"id",
"strings",
"for",
"qualifier_id",
"in",
"hierarchy",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L161-L214 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationSession.is_authorized | def is_authorized(self, agent_id, function_id, qualifier_id):
"""Determines if the given agent is authorized.
An agent is authorized if an active authorization exists whose
``Agent,`` ``Function`` and ``Qualifier`` matches the supplied
parameters. Authorizations may be defined using gro... | python | def is_authorized(self, agent_id, function_id, qualifier_id):
"""Determines if the given agent is authorized.
An agent is authorized if an active authorization exists whose
``Agent,`` ``Function`` and ``Qualifier`` matches the supplied
parameters. Authorizations may be defined using gro... | [
"def",
"is_authorized",
"(",
"self",
",",
"agent_id",
",",
"function_id",
",",
"qualifier_id",
")",
":",
"collection",
"=",
"JSONClientValidated",
"(",
"'authorization'",
",",
"collection",
"=",
"'Authorization'",
",",
"runtime",
"=",
"self",
".",
"_runtime",
")... | Determines if the given agent is authorized.
An agent is authorized if an active authorization exists whose
``Agent,`` ``Function`` and ``Qualifier`` matches the supplied
parameters. Authorizations may be defined using groupings or
hieratchical structures for both the ``Agent`` and the
... | [
"Determines",
"if",
"the",
"given",
"agent",
"is",
"authorized",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L261-L355 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationLookupSession.get_authorization | def get_authorization(self, authorization_id):
"""Gets the ``Authorization`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Authorization`` may have a
different ``Id`` than requested, such as the case where a
... | python | def get_authorization(self, authorization_id):
"""Gets the ``Authorization`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Authorization`` may have a
different ``Id`` than requested, such as the case where a
... | [
"def",
"get_authorization",
"(",
"self",
",",
"authorization_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resource",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"'authorizat... | Gets the ``Authorization`` specified by its ``Id``.
In plenary mode, the exact ``Id`` is found or a ``NotFound``
results. Otherwise, the returned ``Authorization`` may have a
different ``Id`` than requested, such as the case where a
duplicate ``Id`` was assigned to an ``Authorization`` ... | [
"Gets",
"the",
"Authorization",
"specified",
"by",
"its",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L580-L610 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationLookupSession.get_authorizations_by_ids | def get_authorizations_by_ids(self, authorization_ids):
"""Gets an ``AuthorizationList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
authorizations specified in the ``Id`` list, in the order of the
list, including duplicates, or an error... | python | def get_authorizations_by_ids(self, authorization_ids):
"""Gets an ``AuthorizationList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
authorizations specified in the ``Id`` list, in the order of the
list, including duplicates, or an error... | [
"def",
"get_authorizations_by_ids",
"(",
"self",
",",
"authorization_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources_by_ids",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(... | Gets an ``AuthorizationList`` corresponding to the given ``IdList``.
In plenary mode, the returned list contains all of the
authorizations specified in the ``Id`` list, in the order of the
list, including duplicates, or an error results if an ``Id`` in
the supplied list is not found or ... | [
"Gets",
"an",
"AuthorizationList",
"corresponding",
"to",
"the",
"given",
"IdList",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L613-L654 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationLookupSession.get_authorizations_by_genus_type | def get_authorizations_by_genus_type(self, authorization_genus_type):
"""Gets an ``AuthorizationList`` corresponding to the given authorization genus ``Type`` which does not include authorizations of genus types derived from the specified ``Type``.
In plenary mode, the returned list contains all known
... | python | def get_authorizations_by_genus_type(self, authorization_genus_type):
"""Gets an ``AuthorizationList`` corresponding to the given authorization genus ``Type`` which does not include authorizations of genus types derived from the specified ``Type``.
In plenary mode, the returned list contains all known
... | [
"def",
"get_authorizations_by_genus_type",
"(",
"self",
",",
"authorization_genus_type",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources_by_genus_type",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONC... | Gets an ``AuthorizationList`` corresponding to the given authorization genus ``Type`` which does not include authorizations of genus types derived from the specified ``Type``.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list
... | [
"Gets",
"an",
"AuthorizationList",
"corresponding",
"to",
"the",
"given",
"authorization",
"genus",
"Type",
"which",
"does",
"not",
"include",
"authorizations",
"of",
"genus",
"types",
"derived",
"from",
"the",
"specified",
"Type",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L657-L684 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationLookupSession.get_authorizations_on_date | def get_authorizations_on_date(self, from_, to):
"""Gets an ``AuthorizationList`` effective during the entire given date range inclusive but not confined to the date range.
arg: from (osid.calendaring.DateTime): starting date
arg: to (osid.calendaring.DateTime): ending date
return... | python | def get_authorizations_on_date(self, from_, to):
"""Gets an ``AuthorizationList`` effective during the entire given date range inclusive but not confined to the date range.
arg: from (osid.calendaring.DateTime): starting date
arg: to (osid.calendaring.DateTime): ending date
return... | [
"def",
"get_authorizations_on_date",
"(",
"self",
",",
"from_",
",",
"to",
")",
":",
"# Implemented from template for",
"# osid.relationship.RelationshipLookupSession.get_relationships_on_date",
"authorization_list",
"=",
"[",
"]",
"for",
"authorization",
"in",
"self",
".",
... | Gets an ``AuthorizationList`` effective during the entire given date range inclusive but not confined to the date range.
arg: from (osid.calendaring.DateTime): starting date
arg: to (osid.calendaring.DateTime): ending date
return: (osid.authorization.AuthorizationList) - the returned
... | [
"Gets",
"an",
"AuthorizationList",
"effective",
"during",
"the",
"entire",
"given",
"date",
"range",
"inclusive",
"but",
"not",
"confined",
"to",
"the",
"date",
"range",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L735-L755 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationLookupSession.get_authorizations_for_function | def get_authorizations_for_function(self, function_id):
"""Gets a list of ``Authorizations`` associated with a given function.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list
may contain only those authorizations tha... | python | def get_authorizations_for_function(self, function_id):
"""Gets a list of ``Authorizations`` associated with a given function.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list
may contain only those authorizations tha... | [
"def",
"get_authorizations_for_function",
"(",
"self",
",",
"function_id",
")",
":",
"# Implemented from template for",
"# osid.learning.ActivityLookupSession.get_activities_for_objective_template",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClien... | Gets a list of ``Authorizations`` associated with a given function.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list
may contain only those authorizations that are accessible
through this session.
arg: fun... | [
"Gets",
"a",
"list",
"of",
"Authorizations",
"associated",
"with",
"a",
"given",
"function",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L848-L874 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationLookupSession.get_authorizations_for_resource_and_function | def get_authorizations_for_resource_and_function(self, resource_id, function_id):
"""Gets a list of ``Authorizations`` associated with a given resource.
Authorizations related to the given resource, including those
related through an ``Agent,`` are returned. In plenary mode, the
returne... | python | def get_authorizations_for_resource_and_function(self, resource_id, function_id):
"""Gets a list of ``Authorizations`` associated with a given resource.
Authorizations related to the given resource, including those
related through an ``Agent,`` are returned. In plenary mode, the
returne... | [
"def",
"get_authorizations_for_resource_and_function",
"(",
"self",
",",
"resource_id",
",",
"function_id",
")",
":",
"# Implemented from template for",
"# osid.relationship.RelationshipLookupSession.get_relationships_for_peers",
"# NOTE: This implementation currently ignores plenary and eff... | Gets a list of ``Authorizations`` associated with a given resource.
Authorizations related to the given resource, including those
related through an ``Agent,`` are returned. In plenary mode, the
returned list contains all known authorizations or an error
results. Otherwise, the returned... | [
"Gets",
"a",
"list",
"of",
"Authorizations",
"associated",
"with",
"a",
"given",
"resource",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L896-L926 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationLookupSession.get_authorizations_for_agent_and_function | def get_authorizations_for_agent_and_function(self, agent_id, function_id):
"""Gets a list of ``Authorizations`` associated with a given agent.
Authorizations related to the given resource, including those
related through an ``Agent,`` are returned. In plenary mode, the
returned list co... | python | def get_authorizations_for_agent_and_function(self, agent_id, function_id):
"""Gets a list of ``Authorizations`` associated with a given agent.
Authorizations related to the given resource, including those
related through an ``Agent,`` are returned. In plenary mode, the
returned list co... | [
"def",
"get_authorizations_for_agent_and_function",
"(",
"self",
",",
"agent_id",
",",
"function_id",
")",
":",
"collection",
"=",
"JSONClientValidated",
"(",
"'authorization'",
",",
"collection",
"=",
"'Authorization'",
",",
"runtime",
"=",
"self",
".",
"_runtime",
... | Gets a list of ``Authorizations`` associated with a given agent.
Authorizations related to the given resource, including those
related through an ``Agent,`` are returned. In plenary mode, the
returned list contains all known authorizations or an error
results. Otherwise, the returned li... | [
"Gets",
"a",
"list",
"of",
"Authorizations",
"associated",
"with",
"a",
"given",
"agent",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L961-L988 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationLookupSession.get_authorizations | def get_authorizations(self):
"""Geta all ``Authorizations``.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list
may contain only those authorizations that are accessible
through this session.
return: (... | python | def get_authorizations(self):
"""Geta all ``Authorizations``.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list
may contain only those authorizations that are accessible
through this session.
return: (... | [
"def",
"get_authorizations",
"(",
"self",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceLookupSession.get_resources",
"# NOTE: This implementation currently ignores plenary view",
"collection",
"=",
"JSONClientValidated",
"(",
"'authorization'",
",",
"collection... | Geta all ``Authorizations``.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list
may contain only those authorizations that are accessible
through this session.
return: (osid.authorization.AuthorizationList) - a... | [
"Geta",
"all",
"Authorizations",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1049-L1071 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationQuerySession.get_authorizations_by_query | def get_authorizations_by_query(self, authorization_query):
"""Gets a list of ``Authorizations`` matching the given query.
arg: authorization_query
(osid.authorization.AuthorizationQuery): the
authorization query
return: (osid.authorization.AuthorizationList) ... | python | def get_authorizations_by_query(self, authorization_query):
"""Gets a list of ``Authorizations`` matching the given query.
arg: authorization_query
(osid.authorization.AuthorizationQuery): the
authorization query
return: (osid.authorization.AuthorizationList) ... | [
"def",
"get_authorizations_by_query",
"(",
"self",
",",
"authorization_query",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceQuerySession.get_resources_by_query",
"and_list",
"=",
"list",
"(",
")",
"or_list",
"=",
"list",
"(",
")",
"for",
"term",
"... | Gets a list of ``Authorizations`` matching the given query.
arg: authorization_query
(osid.authorization.AuthorizationQuery): the
authorization query
return: (osid.authorization.AuthorizationList) - the returned
``AuthorizationList``
raise: Nu... | [
"Gets",
"a",
"list",
"of",
"Authorizations",
"matching",
"the",
"given",
"query",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1221-L1263 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationAdminSession.get_authorization_form_for_create_for_agent | def get_authorization_form_for_create_for_agent(self, agent_id, function_id, qualifier_id, authorization_record_types):
"""Gets the authorization form for creating new authorizations.
A new form should be requested for each create transaction.
arg: agent_id (osid.id.Id): the agent ``Id``
... | python | def get_authorization_form_for_create_for_agent(self, agent_id, function_id, qualifier_id, authorization_record_types):
"""Gets the authorization form for creating new authorizations.
A new form should be requested for each create transaction.
arg: agent_id (osid.id.Id): the agent ``Id``
... | [
"def",
"get_authorization_form_for_create_for_agent",
"(",
"self",
",",
"agent_id",
",",
"function_id",
",",
"qualifier_id",
",",
"authorization_record_types",
")",
":",
"if",
"not",
"isinstance",
"(",
"agent_id",
",",
"ABCId",
")",
":",
"raise",
"errors",
".",
"I... | Gets the authorization form for creating new authorizations.
A new form should be requested for each create transaction.
arg: agent_id (osid.id.Id): the agent ``Id``
arg: function_id (osid.id.Id): the function ``Id``
arg: qualifier_id (osid.id.Id): the qualifier ``Id``
... | [
"Gets",
"the",
"authorization",
"form",
"for",
"creating",
"new",
"authorizations",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1393-L1448 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationAdminSession.create_authorization | def create_authorization(self, authorization_form):
"""Creates a new explicit ``Authorization``.
arg: authorization_form
(osid.authorization.AuthorizationForm): the
authorization form
return: (osid.authorization.Authorization) - ``t`` he new
``... | python | def create_authorization(self, authorization_form):
"""Creates a new explicit ``Authorization``.
arg: authorization_form
(osid.authorization.AuthorizationForm): the
authorization form
return: (osid.authorization.Authorization) - ``t`` he new
``... | [
"def",
"create_authorization",
"(",
"self",
",",
"authorization_form",
")",
":",
"# TODO: not using the create_resource template",
"# because want to prevent duplicate authorizations",
"collection",
"=",
"JSONClientValidated",
"(",
"'authorization'",
",",
"collection",
"=",
"'Aut... | Creates a new explicit ``Authorization``.
arg: authorization_form
(osid.authorization.AuthorizationForm): the
authorization form
return: (osid.authorization.Authorization) - ``t`` he new
``Authorization``
raise: IllegalState - ``authorization_... | [
"Creates",
"a",
"new",
"explicit",
"Authorization",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1537-L1593 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationAdminSession.update_authorization | def update_authorization(self, authorization_form):
"""Updates an existing authorization.
arg: authorization_form
(osid.authorization.AuthorizationForm): the
authorization ``Id``
raise: IllegalState - ``authorization_form`` already used in an
... | python | def update_authorization(self, authorization_form):
"""Updates an existing authorization.
arg: authorization_form
(osid.authorization.AuthorizationForm): the
authorization ``Id``
raise: IllegalState - ``authorization_form`` already used in an
... | [
"def",
"update_authorization",
"(",
"self",
",",
"authorization_form",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.update_resource_template",
"collection",
"=",
"JSONClientValidated",
"(",
"'authorization'",
",",
"collection",
"=",
"'Authori... | Updates an existing authorization.
arg: authorization_form
(osid.authorization.AuthorizationForm): the
authorization ``Id``
raise: IllegalState - ``authorization_form`` already used in an
update transaction
raise: InvalidArgument - one or mor... | [
"Updates",
"an",
"existing",
"authorization",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1651-L1693 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationAdminSession.delete_authorization | def delete_authorization(self, authorization_id):
"""Deletes the ``Authorization`` identified by the given ``Id``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization`` to delete
raise: NotFound - an ``Authorization`` was not found identified
... | python | def delete_authorization(self, authorization_id):
"""Deletes the ``Authorization`` identified by the given ``Id``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization`` to delete
raise: NotFound - an ``Authorization`` was not found identified
... | [
"def",
"delete_authorization",
"(",
"self",
",",
"authorization_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.delete_resource_template",
"collection",
"=",
"JSONClientValidated",
"(",
"'authorization'",
",",
"collection",
"=",
"'Authoriza... | Deletes the ``Authorization`` identified by the given ``Id``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization`` to delete
raise: NotFound - an ``Authorization`` was not found identified
by the given ``Id``
raise: NullArgument - ``author... | [
"Deletes",
"the",
"Authorization",
"identified",
"by",
"the",
"given",
"Id",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1716-L1741 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationAdminSession.alias_authorization | def alias_authorization(self, authorization_id, alias_id):
"""Adds an ``Id`` to an ``Authorization`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Authorization`` is determined by the
provider. The new ``Id`` performs as an alias to the primary
``Id``. If the al... | python | def alias_authorization(self, authorization_id, alias_id):
"""Adds an ``Id`` to an ``Authorization`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Authorization`` is determined by the
provider. The new ``Id`` performs as an alias to the primary
``Id``. If the al... | [
"def",
"alias_authorization",
"(",
"self",
",",
"authorization_id",
",",
"alias_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceAdminSession.alias_resources_template",
"self",
".",
"_alias_id",
"(",
"primary_id",
"=",
"authorization_id",
",",
"equiv... | Adds an ``Id`` to an ``Authorization`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Authorization`` is determined by the
provider. The new ``Id`` performs as an alias to the primary
``Id``. If the alias is a pointer to another authorization. it
is reassigned to... | [
"Adds",
"an",
"Id",
"to",
"an",
"Authorization",
"for",
"the",
"purpose",
"of",
"creating",
"compatibility",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1762-L1784 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultSession.use_comparative_vault_view | def use_comparative_vault_view(self):
"""The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at
the expense of precision.
*compliance: man... | python | def use_comparative_vault_view(self):
"""The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at
the expense of precision.
*compliance: man... | [
"def",
"use_comparative_vault_view",
"(",
"self",
")",
":",
"# Implemented from template for",
"# osid.resource.BinLookupSession.use_comparative_bin_view",
"self",
".",
"_catalog_view",
"=",
"COMPARATIVE",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"se... | The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.
This view is used when greater interoperability is desired at
the expense of precision.
*compliance: mandatory -- This method is must be implemented.* | [
"The",
"returns",
"from",
"the",
"lookup",
"methods",
"may",
"omit",
"or",
"translate",
"elements",
"based",
"on",
"this",
"session",
"such",
"as",
"authorization",
"and",
"not",
"result",
"in",
"an",
"error",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1808-L1821 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultSession.use_plenary_vault_view | def use_plenary_vault_view(self):
"""A complete view of the ``Authorization`` and ``Vault`` returns is desired.
Methods will return what is requested or result in an error.
This view is used when greater precision is desired at the
expense of interoperability.
*compliance: mand... | python | def use_plenary_vault_view(self):
"""A complete view of the ``Authorization`` and ``Vault`` returns is desired.
Methods will return what is requested or result in an error.
This view is used when greater precision is desired at the
expense of interoperability.
*compliance: mand... | [
"def",
"use_plenary_vault_view",
"(",
"self",
")",
":",
"# Implemented from template for",
"# osid.resource.BinLookupSession.use_plenary_bin_view",
"self",
".",
"_catalog_view",
"=",
"PLENARY",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"self",
".",
... | A complete view of the ``Authorization`` and ``Vault`` returns is desired.
Methods will return what is requested or result in an error.
This view is used when greater precision is desired at the
expense of interoperability.
*compliance: mandatory -- This method is must be implemented.* | [
"A",
"complete",
"view",
"of",
"the",
"Authorization",
"and",
"Vault",
"returns",
"is",
"desired",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1823-L1837 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultSession.get_authorization_ids_by_vault | def get_authorization_ids_by_vault(self, vault_id):
"""Gets the list of ``Authorization`` ``Ids`` associated with a ``Vault``.
arg: vault_id (osid.id.Id): ``Id`` of a ``Vault``
return: (osid.id.IdList) - list of related authorization ``Ids``
raise: NotFound - ``vault_id`` is not fo... | python | def get_authorization_ids_by_vault(self, vault_id):
"""Gets the list of ``Authorization`` ``Ids`` associated with a ``Vault``.
arg: vault_id (osid.id.Id): ``Id`` of a ``Vault``
return: (osid.id.IdList) - list of related authorization ``Ids``
raise: NotFound - ``vault_id`` is not fo... | [
"def",
"get_authorization_ids_by_vault",
"(",
"self",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resource_ids_by_bin",
"id_list",
"=",
"[",
"]",
"for",
"authorization",
"in",
"self",
".",
"get_authorizations_by_vault",
... | Gets the list of ``Authorization`` ``Ids`` associated with a ``Vault``.
arg: vault_id (osid.id.Id): ``Id`` of a ``Vault``
return: (osid.id.IdList) - list of related authorization ``Ids``
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``vault_id`` is ``null``
... | [
"Gets",
"the",
"list",
"of",
"Authorization",
"Ids",
"associated",
"with",
"a",
"Vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1860-L1877 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultSession.get_authorizations_by_vault | def get_authorizations_by_vault(self, vault_id):
"""Gets the list of ``Authorizations`` associated with a ``Vault``.
arg: vault_id (osid.id.Id): ``Id`` of a ``Vault``
return: (osid.authorization.AuthorizationList) - list of related
authorization
raise: NotFound - ``v... | python | def get_authorizations_by_vault(self, vault_id):
"""Gets the list of ``Authorizations`` associated with a ``Vault``.
arg: vault_id (osid.id.Id): ``Id`` of a ``Vault``
return: (osid.authorization.AuthorizationList) - list of related
authorization
raise: NotFound - ``v... | [
"def",
"get_authorizations_by_vault",
"(",
"self",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resources_by_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'AUTHORIZATION'",
",",
"local",
"=",
"True",
"... | Gets the list of ``Authorizations`` associated with a ``Vault``.
arg: vault_id (osid.id.Id): ``Id`` of a ``Vault``
return: (osid.authorization.AuthorizationList) - list of related
authorization
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``vaul... | [
"Gets",
"the",
"list",
"of",
"Authorizations",
"associated",
"with",
"a",
"Vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1880-L1898 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultSession.get_authorizations_ids_by_vault | def get_authorizations_ids_by_vault(self, vault_ids):
"""Gets the list of ``Authorization Ids`` corresponding to a list of ``Vault`` objects.
arg: vault_ids (osid.id.IdList): list of vault ``Ids``
return: (osid.id.IdList) - list of authorization ``Ids``
raise: NullArgument - ``vault... | python | def get_authorizations_ids_by_vault(self, vault_ids):
"""Gets the list of ``Authorization Ids`` corresponding to a list of ``Vault`` objects.
arg: vault_ids (osid.id.IdList): list of vault ``Ids``
return: (osid.id.IdList) - list of authorization ``Ids``
raise: NullArgument - ``vault... | [
"def",
"get_authorizations_ids_by_vault",
"(",
"self",
",",
"vault_ids",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_resource_ids_by_bin",
"id_list",
"=",
"[",
"]",
"for",
"authorization",
"in",
"self",
".",
"get_authorizations_by_vault"... | Gets the list of ``Authorization Ids`` corresponding to a list of ``Vault`` objects.
arg: vault_ids (osid.id.IdList): list of vault ``Ids``
return: (osid.id.IdList) - list of authorization ``Ids``
raise: NullArgument - ``vault_ids`` is ``null``
raise: OperationFailed - unable to co... | [
"Gets",
"the",
"list",
"of",
"Authorization",
"Ids",
"corresponding",
"to",
"a",
"list",
"of",
"Vault",
"objects",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1901-L1917 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultSession.get_vault_ids_by_authorization | def get_vault_ids_by_authorization(self, authorization_id):
"""Gets the list of ``Vault`` ``Ids`` mapped to an ``Authorization``.
arg: authorization_id (osid.id.Id): ``Id`` of an
``Authorization``
return: (osid.id.IdList) - list of vault ``Ids``
raise: NotFound - ``... | python | def get_vault_ids_by_authorization(self, authorization_id):
"""Gets the list of ``Vault`` ``Ids`` mapped to an ``Authorization``.
arg: authorization_id (osid.id.Id): ``Id`` of an
``Authorization``
return: (osid.id.IdList) - list of vault ``Ids``
raise: NotFound - ``... | [
"def",
"get_vault_ids_by_authorization",
"(",
"self",
",",
"authorization_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinSession.get_bin_ids_by_resource",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'AUTHORIZATION'",
",",
"local",
"=",... | Gets the list of ``Vault`` ``Ids`` mapped to an ``Authorization``.
arg: authorization_id (osid.id.Id): ``Id`` of an
``Authorization``
return: (osid.id.IdList) - list of vault ``Ids``
raise: NotFound - ``authorization_id`` is not found
raise: NullArgument - ``author... | [
"Gets",
"the",
"list",
"of",
"Vault",
"Ids",
"mapped",
"to",
"an",
"Authorization",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L1940-L1962 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultAssignmentSession.get_assignable_vault_ids | def get_assignable_vault_ids(self, vault_id):
"""Gets a list of vault including and under the given vault node in which any authorization can be assigned.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
return: (osid.id.IdList) - list of assignable vault ``Ids``
raise: NullA... | python | def get_assignable_vault_ids(self, vault_id):
"""Gets a list of vault including and under the given vault node in which any authorization can be assigned.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
return: (osid.id.IdList) - list of assignable vault ``Ids``
raise: NullA... | [
"def",
"get_assignable_vault_ids",
"(",
"self",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinAssignmentSession.get_assignable_bin_ids",
"# This will likely be overridden by an authorization adapter",
"mgr",
"=",
"self",
".",
"_get_provider_m... | Gets a list of vault including and under the given vault node in which any authorization can be assigned.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
return: (osid.id.IdList) - list of assignable vault ``Ids``
raise: NullArgument - ``vault_id`` is ``null``
raise: Operat... | [
"Gets",
"a",
"list",
"of",
"vault",
"including",
"and",
"under",
"the",
"given",
"vault",
"node",
"in",
"which",
"any",
"authorization",
"can",
"be",
"assigned",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2047-L2066 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultAssignmentSession.assign_authorization_to_vault | def assign_authorization_to_vault(self, authorization_id, vault_id):
"""Adds an existing ``Authorization`` to a ``Vault``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
raise: Alread... | python | def assign_authorization_to_vault(self, authorization_id, vault_id):
"""Adds an existing ``Authorization`` to a ``Vault``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
raise: Alread... | [
"def",
"assign_authorization_to_vault",
"(",
"self",
",",
"authorization_id",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinAssignmentSession.assign_resource_to_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'AUTHORIZATIO... | Adds an existing ``Authorization`` to a ``Vault``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
raise: AlreadyExists - ``authorization_id`` is already assigned
to ``vault_id... | [
"Adds",
"an",
"existing",
"Authorization",
"to",
"a",
"Vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2088-L2110 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultAssignmentSession.unassign_authorization_from_vault | def unassign_authorization_from_vault(self, authorization_id, vault_id):
"""Removes an ``Authorization`` from a ``Vault``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
raise: NotFou... | python | def unassign_authorization_from_vault(self, authorization_id, vault_id):
"""Removes an ``Authorization`` from a ``Vault``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
raise: NotFou... | [
"def",
"unassign_authorization_from_vault",
"(",
"self",
",",
"authorization_id",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinAssignmentSession.unassign_resource_from_bin",
"mgr",
"=",
"self",
".",
"_get_provider_manager",
"(",
"'AUTH... | Removes an ``Authorization`` from a ``Vault``.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
raise: NotFound - ``authorization_id`` or ``vault_id`` not
found or ``authorizati... | [
"Removes",
"an",
"Authorization",
"from",
"a",
"Vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2113-L2134 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | AuthorizationVaultAssignmentSession.reassign_authorization_to_vault | def reassign_authorization_to_vault(self, authorization_id, from_vault_id, to_vault_id):
"""Moves an ``Authorization`` from one ``Vault`` to another.
Mappings to other ``Vaults`` are unaffected.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
... | python | def reassign_authorization_to_vault(self, authorization_id, from_vault_id, to_vault_id):
"""Moves an ``Authorization`` from one ``Vault`` to another.
Mappings to other ``Vaults`` are unaffected.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
... | [
"def",
"reassign_authorization_to_vault",
"(",
"self",
",",
"authorization_id",
",",
"from_vault_id",
",",
"to_vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.ResourceBinAssignmentSession.reassign_resource_to_bin",
"self",
".",
"assign_authorization_to_vault"... | Moves an ``Authorization`` from one ``Vault`` to another.
Mappings to other ``Vaults`` are unaffected.
arg: authorization_id (osid.id.Id): the ``Id`` of the
``Authorization``
arg: from_vault_id (osid.id.Id): the ``Id`` of the current
``Vault``
arg:... | [
"Moves",
"an",
"Authorization",
"from",
"one",
"Vault",
"to",
"another",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2137-L2165 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultLookupSession.get_vaults_by_genus_type | def get_vaults_by_genus_type(self, vault_genus_type):
"""Gets a ``VaultList`` corresponding to the given vault genus ``Type`` which does not include vaults of types derived from the specified ``Type``.
In plenary mode, the returned list contains all known vaults or
an error results. Otherwise, ... | python | def get_vaults_by_genus_type(self, vault_genus_type):
"""Gets a ``VaultList`` corresponding to the given vault genus ``Type`` which does not include vaults of types derived from the specified ``Type``.
In plenary mode, the returned list contains all known vaults or
an error results. Otherwise, ... | [
"def",
"get_vaults_by_genus_type",
"(",
"self",
",",
"vault_genus_type",
")",
":",
"collection",
"=",
"JSONClientValidated",
"(",
"'authorization'",
",",
"collection",
"=",
"'Vault'",
",",
"runtime",
"=",
"self",
".",
"_runtime",
")",
"result",
"=",
"collection",
... | Gets a ``VaultList`` corresponding to the given vault genus ``Type`` which does not include vaults of types derived from the specified ``Type``.
In plenary mode, the returned list contains all known vaults or
an error results. Otherwise, the returned list may contain only
those vaults that are ... | [
"Gets",
"a",
"VaultList",
"corresponding",
"to",
"the",
"given",
"vault",
"genus",
"Type",
"which",
"does",
"not",
"include",
"vaults",
"of",
"types",
"derived",
"from",
"the",
"specified",
"Type",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2333-L2354 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultQuerySession.get_vaults_by_query | def get_vaults_by_query(self, vault_query):
"""Gets a list of ``Vault`` objects matching the given search.
arg: vault_query (osid.authorization.VaultQuery): the vault
query
return: (osid.authorization.VaultList) - the returned
``VaultList``
raise: Nul... | python | def get_vaults_by_query(self, vault_query):
"""Gets a list of ``Vault`` objects matching the given search.
arg: vault_query (osid.authorization.VaultQuery): the vault
query
return: (osid.authorization.VaultList) - the returned
``VaultList``
raise: Nul... | [
"def",
"get_vaults_by_query",
"(",
"self",
",",
"vault_query",
")",
":",
"# Implemented from template for",
"# osid.resource.BinQuerySession.get_bins_by_query_template",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_sessio... | Gets a list of ``Vault`` objects matching the given search.
arg: vault_query (osid.authorization.VaultQuery): the vault
query
return: (osid.authorization.VaultList) - the returned
``VaultList``
raise: NullArgument - ``vault_query`` is ``null``
raise: ... | [
"Gets",
"a",
"list",
"of",
"Vault",
"objects",
"matching",
"the",
"given",
"search",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2494-L2518 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultAdminSession.can_create_vault_with_record_types | def can_create_vault_with_record_types(self, vault_record_types):
"""Tests if this user can create a single ``Vault`` using the desired record types.
While ``AuthorizationManager.getVaultRecordTypes()`` can be used
to examine which records are supported, this method tests which
record(s... | python | def can_create_vault_with_record_types(self, vault_record_types):
"""Tests if this user can create a single ``Vault`` using the desired record types.
While ``AuthorizationManager.getVaultRecordTypes()`` can be used
to examine which records are supported, this method tests which
record(s... | [
"def",
"can_create_vault_with_record_types",
"(",
"self",
",",
"vault_record_types",
")",
":",
"# Implemented from template for",
"# osid.resource.BinAdminSession.can_create_bin_with_record_types",
"# NOTE: It is expected that real authentication hints will be",
"# handled in a service adapter... | Tests if this user can create a single ``Vault`` using the desired record types.
While ``AuthorizationManager.getVaultRecordTypes()`` can be used
to examine which records are supported, this method tests which
record(s) are required for creating a specific ``Vault``.
Providing an empty ... | [
"Tests",
"if",
"this",
"user",
"can",
"create",
"a",
"single",
"Vault",
"using",
"the",
"desired",
"record",
"types",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2586-L2609 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultAdminSession.get_vault_form_for_create | def get_vault_form_for_create(self, vault_record_types):
"""Gets the vault form for creating new vaults.
A new form should be requested for each create transaction.
arg: vault_record_types (osid.type.Type[]): array of vault
record types
return: (osid.authorization.Va... | python | def get_vault_form_for_create(self, vault_record_types):
"""Gets the vault form for creating new vaults.
A new form should be requested for each create transaction.
arg: vault_record_types (osid.type.Type[]): array of vault
record types
return: (osid.authorization.Va... | [
"def",
"get_vault_form_for_create",
"(",
"self",
",",
"vault_record_types",
")",
":",
"# Implemented from template for",
"# osid.resource.BinAdminSession.get_bin_form_for_create_template",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",... | Gets the vault form for creating new vaults.
A new form should be requested for each create transaction.
arg: vault_record_types (osid.type.Type[]): array of vault
record types
return: (osid.authorization.VaultForm) - the vault form
raise: NullArgument - ``vault_rec... | [
"Gets",
"the",
"vault",
"form",
"for",
"creating",
"new",
"vaults",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2612-L2647 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultAdminSession.create_vault | def create_vault(self, vault_form):
"""Creates a new ``Vault``.
arg: vault_form (osid.authorization.VaultForm): the form for
this ``Vault``
return: (osid.authorization.Vault) - the new ``Vault``
raise: IllegalState - ``vault_form`` already used in a create
... | python | def create_vault(self, vault_form):
"""Creates a new ``Vault``.
arg: vault_form (osid.authorization.VaultForm): the form for
this ``Vault``
return: (osid.authorization.Vault) - the new ``Vault``
raise: IllegalState - ``vault_form`` already used in a create
... | [
"def",
"create_vault",
"(",
"self",
",",
"vault_form",
")",
":",
"# Implemented from template for",
"# osid.resource.BinAdminSession.create_bin_template",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_session",
".",
"c... | Creates a new ``Vault``.
arg: vault_form (osid.authorization.VaultForm): the form for
this ``Vault``
return: (osid.authorization.Vault) - the new ``Vault``
raise: IllegalState - ``vault_form`` already used in a create
transaction
raise: InvalidArgume... | [
"Creates",
"a",
"new",
"Vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2650-L2694 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultAdminSession.get_vault_form_for_update | def get_vault_form_for_update(self, vault_id):
"""Gets the vault form for updating an existing vault.
A new vault form should be requested for each update
transaction.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
return: (osid.authorization.VaultForm) - the vault ... | python | def get_vault_form_for_update(self, vault_id):
"""Gets the vault form for updating an existing vault.
A new vault form should be requested for each update
transaction.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
return: (osid.authorization.VaultForm) - the vault ... | [
"def",
"get_vault_form_for_update",
"(",
"self",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.BinAdminSession.get_bin_form_for_update_template",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catal... | Gets the vault form for updating an existing vault.
A new vault form should be requested for each update
transaction.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault``
return: (osid.authorization.VaultForm) - the vault form
raise: NotFound - ``vault_id`` is not found
... | [
"Gets",
"the",
"vault",
"form",
"for",
"updating",
"an",
"existing",
"vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2719-L2748 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultAdminSession.update_vault | def update_vault(self, vault_form):
"""Updates an existing vault.
arg: vault_form (osid.authorization.VaultForm): the form
containing the elements to be updated
raise: IllegalState - ``vault_form`` already used in an update
transaction
raise: Invalid... | python | def update_vault(self, vault_form):
"""Updates an existing vault.
arg: vault_form (osid.authorization.VaultForm): the form
containing the elements to be updated
raise: IllegalState - ``vault_form`` already used in an update
transaction
raise: Invalid... | [
"def",
"update_vault",
"(",
"self",
",",
"vault_form",
")",
":",
"# Implemented from template for",
"# osid.resource.BinAdminSession.update_bin_template",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_session",
".",
"u... | Updates an existing vault.
arg: vault_form (osid.authorization.VaultForm): the form
containing the elements to be updated
raise: IllegalState - ``vault_form`` already used in an update
transaction
raise: InvalidArgument - the form contains an invalid value
... | [
"Updates",
"an",
"existing",
"vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2751-L2790 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultAdminSession.delete_vault | def delete_vault(self, vault_id):
"""Deletes a ``Vault``.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault`` to
remove
raise: NotFound - ``vault_id`` not found
raise: NullArgument - ``vault_id`` is ``null``
raise: OperationFailed - unable to complete r... | python | def delete_vault(self, vault_id):
"""Deletes a ``Vault``.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault`` to
remove
raise: NotFound - ``vault_id`` not found
raise: NullArgument - ``vault_id`` is ``null``
raise: OperationFailed - unable to complete r... | [
"def",
"delete_vault",
"(",
"self",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.BinAdminSession.delete_bin_template",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_session",
".",
"del... | Deletes a ``Vault``.
arg: vault_id (osid.id.Id): the ``Id`` of the ``Vault`` to
remove
raise: NotFound - ``vault_id`` not found
raise: NullArgument - ``vault_id`` is ``null``
raise: OperationFailed - unable to complete request
raise: PermissionDenied - aut... | [
"Deletes",
"a",
"Vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2815-L2842 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultAdminSession.alias_vault | def alias_vault(self, vault_id, alias_id):
"""Adds an ``Id`` to a ``Vault`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Vault`` is determined by the
provider. The new ``Id`` performs as an alias to the primary
``Id``. If the alias is a pointer to another vault... | python | def alias_vault(self, vault_id, alias_id):
"""Adds an ``Id`` to a ``Vault`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Vault`` is determined by the
provider. The new ``Id`` performs as an alias to the primary
``Id``. If the alias is a pointer to another vault... | [
"def",
"alias_vault",
"(",
"self",
",",
"vault_id",
",",
"alias_id",
")",
":",
"# Implemented from template for",
"# osid.resource.BinLookupSession.alias_bin_template",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_ses... | Adds an ``Id`` to a ``Vault`` for the purpose of creating compatibility.
The primary ``Id`` of the ``Vault`` is determined by the
provider. The new ``Id`` performs as an alias to the primary
``Id``. If the alias is a pointer to another vault it is
reassigned to the given vault ``Id``.
... | [
"Adds",
"an",
"Id",
"to",
"a",
"Vault",
"for",
"the",
"purpose",
"of",
"creating",
"compatibility",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L2863-L2885 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultHierarchySession.get_root_vaults | def get_root_vaults(self):
"""Gets the root vaults in this vault hierarchy.
return: (osid.authorization.VaultList) - the root vaults
raise: OperationFailed - unable to complete request
raise: PermissionDenied - authorization failure
*compliance: mandatory -- This method is mus... | python | def get_root_vaults(self):
"""Gets the root vaults in this vault hierarchy.
return: (osid.authorization.VaultList) - the root vaults
raise: OperationFailed - unable to complete request
raise: PermissionDenied - authorization failure
*compliance: mandatory -- This method is mus... | [
"def",
"get_root_vaults",
"(",
"self",
")",
":",
"# Implemented from template for",
"# osid.resource.BinHierarchySession.get_root_bins",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_session",
".",
"get_root_catalogs",
"... | Gets the root vaults in this vault hierarchy.
return: (osid.authorization.VaultList) - the root vaults
raise: OperationFailed - unable to complete request
raise: PermissionDenied - authorization failure
*compliance: mandatory -- This method is must be implemented.* | [
"Gets",
"the",
"root",
"vaults",
"in",
"this",
"vault",
"hierarchy",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L3037-L3052 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultHierarchySession.has_parent_vaults | def has_parent_vaults(self, vault_id):
"""Tests if the ``Vault`` has any parents.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (boolean) - ``true`` if the vault has parents, ``false``
otherwise
raise: NotFound - ``vault_id`` is not found
raise: NullArg... | python | def has_parent_vaults(self, vault_id):
"""Tests if the ``Vault`` has any parents.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (boolean) - ``true`` if the vault has parents, ``false``
otherwise
raise: NotFound - ``vault_id`` is not found
raise: NullArg... | [
"def",
"has_parent_vaults",
"(",
"self",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.BinHierarchySession.has_parent_bins",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_session",
".",
... | Tests if the ``Vault`` has any parents.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (boolean) - ``true`` if the vault has parents, ``false``
otherwise
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``vault_id`` is ``null``
raise: O... | [
"Tests",
"if",
"the",
"Vault",
"has",
"any",
"parents",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L3057-L3074 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultHierarchySession.is_parent_of_vault | def is_parent_of_vault(self, id_, vault_id):
"""Tests if an ``Id`` is a direct parent of a vault.
arg: id (osid.id.Id): an ``Id``
arg: vault_id (osid.id.Id): the ``Id`` of a vault
return: (boolean) - ``true`` if this ``id`` is a parent of
``vault_id,`` ``false`` o... | python | def is_parent_of_vault(self, id_, vault_id):
"""Tests if an ``Id`` is a direct parent of a vault.
arg: id (osid.id.Id): an ``Id``
arg: vault_id (osid.id.Id): the ``Id`` of a vault
return: (boolean) - ``true`` if this ``id`` is a parent of
``vault_id,`` ``false`` o... | [
"def",
"is_parent_of_vault",
"(",
"self",
",",
"id_",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.BinHierarchySession.is_parent_of_bin",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_... | Tests if an ``Id`` is a direct parent of a vault.
arg: id (osid.id.Id): an ``Id``
arg: vault_id (osid.id.Id): the ``Id`` of a vault
return: (boolean) - ``true`` if this ``id`` is a parent of
``vault_id,`` ``false`` otherwise
raise: NotFound - ``vault_id`` is not ... | [
"Tests",
"if",
"an",
"Id",
"is",
"a",
"direct",
"parent",
"of",
"a",
"vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L3077-L3096 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultHierarchySession.get_parent_vault_ids | def get_parent_vault_ids(self, vault_id):
"""Gets the parent ``Ids`` of the given vault.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (osid.id.IdList) - the parent ``Ids`` of the vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``vault_id`` is `... | python | def get_parent_vault_ids(self, vault_id):
"""Gets the parent ``Ids`` of the given vault.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (osid.id.IdList) - the parent ``Ids`` of the vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``vault_id`` is `... | [
"def",
"get_parent_vault_ids",
"(",
"self",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.BinHierarchySession.get_parent_bin_ids",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_session",
... | Gets the parent ``Ids`` of the given vault.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (osid.id.IdList) - the parent ``Ids`` of the vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``vault_id`` is ``null``
raise: OperationFailed - unable to c... | [
"Gets",
"the",
"parent",
"Ids",
"of",
"the",
"given",
"vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L3099-L3115 |
mitsei/dlkit | dlkit/json_/authorization/sessions.py | VaultHierarchySession.get_parent_vaults | def get_parent_vaults(self, vault_id):
"""Gets the parents of the given vault.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (osid.authorization.VaultList) - the parents of the
vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``va... | python | def get_parent_vaults(self, vault_id):
"""Gets the parents of the given vault.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (osid.authorization.VaultList) - the parents of the
vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``va... | [
"def",
"get_parent_vaults",
"(",
"self",
",",
"vault_id",
")",
":",
"# Implemented from template for",
"# osid.resource.BinHierarchySession.get_parent_bins",
"if",
"self",
".",
"_catalog_session",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_catalog_session",
".",
... | Gets the parents of the given vault.
arg: vault_id (osid.id.Id): a vault ``Id``
return: (osid.authorization.VaultList) - the parents of the
vault
raise: NotFound - ``vault_id`` is not found
raise: NullArgument - ``vault_id`` is ``null``
raise: OperationFail... | [
"Gets",
"the",
"parents",
"of",
"the",
"given",
"vault",
"."
] | train | https://github.com/mitsei/dlkit/blob/445f968a175d61c8d92c0f617a3c17dc1dc7c584/dlkit/json_/authorization/sessions.py#L3118-L3138 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.