repository_name stringlengths 7 55 | func_path_in_repository stringlengths 4 223 | func_name stringlengths 1 134 | whole_func_string stringlengths 75 104k | language stringclasses 1
value | func_code_string stringlengths 75 104k | func_code_tokens listlengths 19 28.4k | func_documentation_string stringlengths 1 46.9k | func_documentation_tokens listlengths 1 1.97k | split_name stringclasses 1
value | func_code_url stringlengths 87 315 |
|---|---|---|---|---|---|---|---|---|---|---|
genialis/resolwe | resolwe/flow/utils/stats.py | SimpleLoadAvg.add | def add(self, count, timestamp=None):
"""Add a value at the specified time to the series.
:param count: The number of work items ready at the specified
time.
:param timestamp: The timestamp to add. Defaults to None,
meaning current time. It should be strictly greater (ne... | python | def add(self, count, timestamp=None):
"""Add a value at the specified time to the series.
:param count: The number of work items ready at the specified
time.
:param timestamp: The timestamp to add. Defaults to None,
meaning current time. It should be strictly greater (ne... | [
"def",
"add",
"(",
"self",
",",
"count",
",",
"timestamp",
"=",
"None",
")",
":",
"if",
"timestamp",
"is",
"None",
":",
"timestamp",
"=",
"time",
".",
"time",
"(",
")",
"if",
"self",
".",
"last_data",
">=",
"timestamp",
":",
"raise",
"ValueError",
"(... | Add a value at the specified time to the series.
:param count: The number of work items ready at the specified
time.
:param timestamp: The timestamp to add. Defaults to None,
meaning current time. It should be strictly greater (newer)
than the last added timestamp. | [
"Add",
"a",
"value",
"at",
"the",
"specified",
"time",
"to",
"the",
"series",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/utils/stats.py#L146-L162 |
genialis/resolwe | resolwe/flow/utils/stats.py | SimpleLoadAvg.to_dict | def to_dict(self):
"""Pack the load averages into a nicely-keyed dictionary."""
result = {}
for meta in self.intervals.values():
result[meta.display] = meta.value
return result | python | def to_dict(self):
"""Pack the load averages into a nicely-keyed dictionary."""
result = {}
for meta in self.intervals.values():
result[meta.display] = meta.value
return result | [
"def",
"to_dict",
"(",
"self",
")",
":",
"result",
"=",
"{",
"}",
"for",
"meta",
"in",
"self",
".",
"intervals",
".",
"values",
"(",
")",
":",
"result",
"[",
"meta",
".",
"display",
"]",
"=",
"meta",
".",
"value",
"return",
"result"
] | Pack the load averages into a nicely-keyed dictionary. | [
"Pack",
"the",
"load",
"averages",
"into",
"a",
"nicely",
"-",
"keyed",
"dictionary",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/utils/stats.py#L164-L169 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.listFormats | def listFormats(self, vendorSpecific=None):
"""See Also: listFormatsResponse()
Args:
vendorSpecific:
Returns:
"""
response = self.listFormatsResponse(vendorSpecific)
return self._read_dataone_type_response(response, 'ObjectFormatList') | python | def listFormats(self, vendorSpecific=None):
"""See Also: listFormatsResponse()
Args:
vendorSpecific:
Returns:
"""
response = self.listFormatsResponse(vendorSpecific)
return self._read_dataone_type_response(response, 'ObjectFormatList') | [
"def",
"listFormats",
"(",
"self",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"listFormatsResponse",
"(",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_dataone_type_response",
"(",
"response",
",",
"'ObjectFormatList'",
")"
... | See Also: listFormatsResponse()
Args:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"listFormatsResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L74-L84 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.getFormat | def getFormat(self, formatId, vendorSpecific=None):
"""See Also: getFormatResponse()
Args:
formatId:
vendorSpecific:
Returns:
"""
response = self.getFormatResponse(formatId, vendorSpecific)
return self._read_dataone_type_response(response, 'ObjectFo... | python | def getFormat(self, formatId, vendorSpecific=None):
"""See Also: getFormatResponse()
Args:
formatId:
vendorSpecific:
Returns:
"""
response = self.getFormatResponse(formatId, vendorSpecific)
return self._read_dataone_type_response(response, 'ObjectFo... | [
"def",
"getFormat",
"(",
"self",
",",
"formatId",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"getFormatResponse",
"(",
"formatId",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_dataone_type_response",
"(",
"response",... | See Also: getFormatResponse()
Args:
formatId:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"getFormatResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L100-L111 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.reserveIdentifierResponse | def reserveIdentifierResponse(self, pid, vendorSpecific=None):
"""CNCore.getLogRecords(session[, fromDate][, toDate][, event][, start][,
count]) β Log https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNCore.getLogRecords Implemented in
d1_client.baseclient.... | python | def reserveIdentifierResponse(self, pid, vendorSpecific=None):
"""CNCore.getLogRecords(session[, fromDate][, toDate][, event][, start][,
count]) β Log https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNCore.getLogRecords Implemented in
d1_client.baseclient.... | [
"def",
"reserveIdentifierResponse",
"(",
"self",
",",
"pid",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'pid'",
":",
"pid",
"}",
"return",
"self",
".",
"POST",
"(",
"[",
"'reserve'",
",",
"pid",
"]",
",",
"fields",
"=",
"mmp_d... | CNCore.getLogRecords(session[, fromDate][, toDate][, event][, start][,
count]) β Log https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNCore.getLogRecords Implemented in
d1_client.baseclient.py.
CNCore.reserveIdentifier(session, pid) β Identifier
h... | [
"CNCore",
".",
"getLogRecords",
"(",
"session",
"[",
"fromDate",
"]",
"[",
"toDate",
"]",
"[",
"event",
"]",
"[",
"start",
"]",
"[",
"count",
"]",
")",
"β",
"Log",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L113-L130 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.reserveIdentifier | def reserveIdentifier(self, pid, vendorSpecific=None):
"""See Also: reserveIdentifierResponse()
Args:
pid:
vendorSpecific:
Returns:
"""
response = self.reserveIdentifierResponse(pid, vendorSpecific)
return self._read_dataone_type_response(response, ... | python | def reserveIdentifier(self, pid, vendorSpecific=None):
"""See Also: reserveIdentifierResponse()
Args:
pid:
vendorSpecific:
Returns:
"""
response = self.reserveIdentifierResponse(pid, vendorSpecific)
return self._read_dataone_type_response(response, ... | [
"def",
"reserveIdentifier",
"(",
"self",
",",
"pid",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"reserveIdentifierResponse",
"(",
"pid",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_dataone_type_response",
"(",
"resp... | See Also: reserveIdentifierResponse()
Args:
pid:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"reserveIdentifierResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L132-L143 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.listChecksumAlgorithms | def listChecksumAlgorithms(self, vendorSpecific=None):
"""See Also: listChecksumAlgorithmsResponse()
Args:
vendorSpecific:
Returns:
"""
response = self.listChecksumAlgorithmsResponse(vendorSpecific)
return self._read_dataone_type_response(response, 'ChecksumA... | python | def listChecksumAlgorithms(self, vendorSpecific=None):
"""See Also: listChecksumAlgorithmsResponse()
Args:
vendorSpecific:
Returns:
"""
response = self.listChecksumAlgorithmsResponse(vendorSpecific)
return self._read_dataone_type_response(response, 'ChecksumA... | [
"def",
"listChecksumAlgorithms",
"(",
"self",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"listChecksumAlgorithmsResponse",
"(",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_dataone_type_response",
"(",
"response",
",",
"'Chec... | See Also: listChecksumAlgorithmsResponse()
Args:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"listChecksumAlgorithmsResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L158-L168 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setObsoletedByResponse | def setObsoletedByResponse(
self, pid, obsoletedByPid, serialVersion, vendorSpecific=None
):
"""CNCore.setObsoletedBy(session, pid, obsoletedByPid, serialVersion) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNCore.setObsoletedBy.
... | python | def setObsoletedByResponse(
self, pid, obsoletedByPid, serialVersion, vendorSpecific=None
):
"""CNCore.setObsoletedBy(session, pid, obsoletedByPid, serialVersion) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNCore.setObsoletedBy.
... | [
"def",
"setObsoletedByResponse",
"(",
"self",
",",
"pid",
",",
"obsoletedByPid",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'obsoletedByPid'",
":",
"obsoletedByPid",
",",
"'serialVersion'",
":",
"str",
"(",
"serial... | CNCore.setObsoletedBy(session, pid, obsoletedByPid, serialVersion) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNCore.setObsoletedBy.
Args:
pid:
obsoletedByPid:
serialVersion:
vendorSpecific:
Returns: | [
"CNCore",
".",
"setObsoletedBy",
"(",
"session",
"pid",
"obsoletedByPid",
"serialVersion",
")",
"β",
"boolean",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L170-L190 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setObsoletedBy | def setObsoletedBy(self, pid, obsoletedByPid, serialVersion, vendorSpecific=None):
"""See Also: setObsoletedByResponse()
Args:
pid:
obsoletedByPid:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.setObsoletedByResponse(
... | python | def setObsoletedBy(self, pid, obsoletedByPid, serialVersion, vendorSpecific=None):
"""See Also: setObsoletedByResponse()
Args:
pid:
obsoletedByPid:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.setObsoletedByResponse(
... | [
"def",
"setObsoletedBy",
"(",
"self",
",",
"pid",
",",
"obsoletedByPid",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"setObsoletedByResponse",
"(",
"pid",
",",
"obsoletedByPid",
",",
"serialVersion",
",",
"... | See Also: setObsoletedByResponse()
Args:
pid:
obsoletedByPid:
serialVersion:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"setObsoletedByResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L192-L207 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.listNodes | def listNodes(self, vendorSpecific=None):
"""See Also: listNodesResponse()
Args:
vendorSpecific:
Returns:
"""
response = self.listNodesResponse(vendorSpecific)
return self._read_dataone_type_response(response, 'NodeList') | python | def listNodes(self, vendorSpecific=None):
"""See Also: listNodesResponse()
Args:
vendorSpecific:
Returns:
"""
response = self.listNodesResponse(vendorSpecific)
return self._read_dataone_type_response(response, 'NodeList') | [
"def",
"listNodes",
"(",
"self",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"listNodesResponse",
"(",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_dataone_type_response",
"(",
"response",
",",
"'NodeList'",
")"
] | See Also: listNodesResponse()
Args:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"listNodesResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L221-L231 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.hasReservationResponse | def hasReservationResponse(self, pid, subject, vendorSpecific=None):
"""CNCore.registerSystemMetadata(session, pid, sysmeta) β Identifier CN
INTERNAL.
CNCore.hasReservation(session, pid) β boolean
https://releases.dataone.org/online/api-documentation-v2.0.1/apis/CN_APIs.html#CNCore.hasR... | python | def hasReservationResponse(self, pid, subject, vendorSpecific=None):
"""CNCore.registerSystemMetadata(session, pid, sysmeta) β Identifier CN
INTERNAL.
CNCore.hasReservation(session, pid) β boolean
https://releases.dataone.org/online/api-documentation-v2.0.1/apis/CN_APIs.html#CNCore.hasR... | [
"def",
"hasReservationResponse",
"(",
"self",
",",
"pid",
",",
"subject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"return",
"self",
".",
"GET",
"(",
"[",
"'reserve'",
",",
"pid",
",",
"subject",
"]",
",",
"headers",
"=",
"vendorSpecific",
")"
] | CNCore.registerSystemMetadata(session, pid, sysmeta) β Identifier CN
INTERNAL.
CNCore.hasReservation(session, pid) β boolean
https://releases.dataone.org/online/api-documentation-v2.0.1/apis/CN_APIs.html#CNCore.hasReservation
Args:
pid:
subject:
vendorSpec... | [
"CNCore",
".",
"registerSystemMetadata",
"(",
"session",
"pid",
"sysmeta",
")",
"β",
"Identifier",
"CN",
"INTERNAL",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L233-L248 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.hasReservation | def hasReservation(self, pid, subject, vendorSpecific=None):
"""See Also: hasReservationResponse()
Args:
pid:
subject:
vendorSpecific:
Returns:
"""
response = self.hasReservationResponse(pid, subject, vendorSpecific)
return self._read_bool... | python | def hasReservation(self, pid, subject, vendorSpecific=None):
"""See Also: hasReservationResponse()
Args:
pid:
subject:
vendorSpecific:
Returns:
"""
response = self.hasReservationResponse(pid, subject, vendorSpecific)
return self._read_bool... | [
"def",
"hasReservation",
"(",
"self",
",",
"pid",
",",
"subject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"hasReservationResponse",
"(",
"pid",
",",
"subject",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_bool... | See Also: hasReservationResponse()
Args:
pid:
subject:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"hasReservationResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L250-L262 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.resolve | def resolve(self, pid, vendorSpecific=None):
"""See Also: resolveResponse()
Args:
pid:
vendorSpecific:
Returns:
"""
response = self.resolveResponse(pid, vendorSpecific)
return self._read_dataone_type_response(
response, 'ObjectLocationLi... | python | def resolve(self, pid, vendorSpecific=None):
"""See Also: resolveResponse()
Args:
pid:
vendorSpecific:
Returns:
"""
response = self.resolveResponse(pid, vendorSpecific)
return self._read_dataone_type_response(
response, 'ObjectLocationLi... | [
"def",
"resolve",
"(",
"self",
",",
"pid",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"resolveResponse",
"(",
"pid",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_dataone_type_response",
"(",
"response",
",",
"'Ob... | See Also: resolveResponse()
Args:
pid:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"resolveResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L287-L300 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.searchResponse | def searchResponse(self, queryType, query, vendorSpecific=None, **kwargs):
"""CNRead.search(session, queryType, query) β ObjectList
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNRead.search.
Args:
queryType:
query:
vendor... | python | def searchResponse(self, queryType, query, vendorSpecific=None, **kwargs):
"""CNRead.search(session, queryType, query) β ObjectList
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNRead.search.
Args:
queryType:
query:
vendor... | [
"def",
"searchResponse",
"(",
"self",
",",
"queryType",
",",
"query",
",",
"vendorSpecific",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"GET",
"(",
"[",
"'search'",
",",
"queryType",
",",
"query",
"]",
",",
"headers",
"=",
... | CNRead.search(session, queryType, query) β ObjectList
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNRead.search.
Args:
queryType:
query:
vendorSpecific:
**kwargs:
Returns: | [
"CNRead",
".",
"search",
"(",
"session",
"queryType",
"query",
")",
"β",
"ObjectList",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
"/",
"CN_A... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L329-L345 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.search | def search(self, queryType, query=None, vendorSpecific=None, **kwargs):
"""See Also: searchResponse()
Args:
queryType:
query:
vendorSpecific:
**kwargs:
Returns:
"""
response = self.searchResponse(queryType, query, vendorSpecific, **kwarg... | python | def search(self, queryType, query=None, vendorSpecific=None, **kwargs):
"""See Also: searchResponse()
Args:
queryType:
query:
vendorSpecific:
**kwargs:
Returns:
"""
response = self.searchResponse(queryType, query, vendorSpecific, **kwarg... | [
"def",
"search",
"(",
"self",
",",
"queryType",
",",
"query",
"=",
"None",
",",
"vendorSpecific",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"response",
"=",
"self",
".",
"searchResponse",
"(",
"queryType",
",",
"query",
",",
"vendorSpecific",
",",
... | See Also: searchResponse()
Args:
queryType:
query:
vendorSpecific:
**kwargs:
Returns: | [
"See",
"Also",
":",
"searchResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L347-L360 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.queryResponse | def queryResponse(self, queryEngine, query=None, vendorSpecific=None, **kwargs):
"""CNRead.query(session, queryEngine, query) β OctetStream
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNRead.query.
Args:
queryEngine:
query:
... | python | def queryResponse(self, queryEngine, query=None, vendorSpecific=None, **kwargs):
"""CNRead.query(session, queryEngine, query) β OctetStream
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNRead.query.
Args:
queryEngine:
query:
... | [
"def",
"queryResponse",
"(",
"self",
",",
"queryEngine",
",",
"query",
"=",
"None",
",",
"vendorSpecific",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"self",
".",
"GET",
"(",
"[",
"'query'",
",",
"queryEngine",
",",
"query",
"]",
",",
... | CNRead.query(session, queryEngine, query) β OctetStream
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNRead.query.
Args:
queryEngine:
query:
vendorSpecific:
**kwargs:
Returns: | [
"CNRead",
".",
"query",
"(",
"session",
"queryEngine",
"query",
")",
"β",
"OctetStream",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
"/",
"CN... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L362-L378 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.query | def query(self, queryEngine, query=None, vendorSpecific=None, **kwargs):
"""See Also: queryResponse()
Args:
queryEngine:
query:
vendorSpecific:
**kwargs:
Returns:
"""
response = self.queryResponse(queryEngine, query, vendorSpecific, **kw... | python | def query(self, queryEngine, query=None, vendorSpecific=None, **kwargs):
"""See Also: queryResponse()
Args:
queryEngine:
query:
vendorSpecific:
**kwargs:
Returns:
"""
response = self.queryResponse(queryEngine, query, vendorSpecific, **kw... | [
"def",
"query",
"(",
"self",
",",
"queryEngine",
",",
"query",
"=",
"None",
",",
"vendorSpecific",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"response",
"=",
"self",
".",
"queryResponse",
"(",
"queryEngine",
",",
"query",
",",
"vendorSpecific",
","... | See Also: queryResponse()
Args:
queryEngine:
query:
vendorSpecific:
**kwargs:
Returns: | [
"See",
"Also",
":",
"queryResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L380-L393 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setRightsHolderResponse | def setRightsHolderResponse(self, pid, userId, serialVersion, vendorSpecific=None):
"""CNAuthorization.setRightsHolder(session, pid, userId, serialVersion)
β Identifier https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNAuthorization.setRightsHolder.
Args... | python | def setRightsHolderResponse(self, pid, userId, serialVersion, vendorSpecific=None):
"""CNAuthorization.setRightsHolder(session, pid, userId, serialVersion)
β Identifier https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNAuthorization.setRightsHolder.
Args... | [
"def",
"setRightsHolderResponse",
"(",
"self",
",",
"pid",
",",
"userId",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'userId'",
":",
"userId",
",",
"'serialVersion'",
":",
"str",
"(",
"serialVersion",
")",
"}",... | CNAuthorization.setRightsHolder(session, pid, userId, serialVersion)
β Identifier https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNAuthorization.setRightsHolder.
Args:
pid:
userId:
serialVersion:
vendorSpecific:
... | [
"CNAuthorization",
".",
"setRightsHolder",
"(",
"session",
"pid",
"userId",
"serialVersion",
")"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L432-L448 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setRightsHolder | def setRightsHolder(self, pid, userId, serialVersion, vendorSpecific=None):
"""See Also: setRightsHolderResponse()
Args:
pid:
userId:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.setRightsHolderResponse(
pid, u... | python | def setRightsHolder(self, pid, userId, serialVersion, vendorSpecific=None):
"""See Also: setRightsHolderResponse()
Args:
pid:
userId:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.setRightsHolderResponse(
pid, u... | [
"def",
"setRightsHolder",
"(",
"self",
",",
"pid",
",",
"userId",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"setRightsHolderResponse",
"(",
"pid",
",",
"userId",
",",
"serialVersion",
",",
"vendorSpecific... | See Also: setRightsHolderResponse()
Args:
pid:
userId:
serialVersion:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"setRightsHolderResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L450-L465 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setAccessPolicyResponse | def setAccessPolicyResponse(
self, pid, accessPolicy, serialVersion, vendorSpecific=None
):
"""CNAuthorization.setAccessPolicy(session, pid, accessPolicy, serialVersion) β
boolean https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNAuthorization.setAcces... | python | def setAccessPolicyResponse(
self, pid, accessPolicy, serialVersion, vendorSpecific=None
):
"""CNAuthorization.setAccessPolicy(session, pid, accessPolicy, serialVersion) β
boolean https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNAuthorization.setAcces... | [
"def",
"setAccessPolicyResponse",
"(",
"self",
",",
"pid",
",",
"accessPolicy",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'serialVersion'",
":",
"str",
"(",
"serialVersion",
")",
",",
"'accessPolicy'",
":",
"(",... | CNAuthorization.setAccessPolicy(session, pid, accessPolicy, serialVersion) β
boolean https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNAuthorization.setAccessPolicy.
Args:
pid:
accessPolicy:
serialVersion:
vendorSpecific:
... | [
"CNAuthorization",
".",
"setAccessPolicy",
"(",
"session",
"pid",
"accessPolicy",
"serialVersion",
")",
"β",
"boolean",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L467-L487 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setAccessPolicy | def setAccessPolicy(self, pid, accessPolicy, serialVersion, vendorSpecific=None):
"""See Also: setAccessPolicyResponse()
Args:
pid:
accessPolicy:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.setAccessPolicyResponse(
... | python | def setAccessPolicy(self, pid, accessPolicy, serialVersion, vendorSpecific=None):
"""See Also: setAccessPolicyResponse()
Args:
pid:
accessPolicy:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.setAccessPolicyResponse(
... | [
"def",
"setAccessPolicy",
"(",
"self",
",",
"pid",
",",
"accessPolicy",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"setAccessPolicyResponse",
"(",
"pid",
",",
"accessPolicy",
",",
"serialVersion",
",",
"ve... | See Also: setAccessPolicyResponse()
Args:
pid:
accessPolicy:
serialVersion:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"setAccessPolicyResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L489-L504 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.registerAccountResponse | def registerAccountResponse(self, person, vendorSpecific=None):
"""CNIdentity.registerAccount(session, person) β Subject
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.registerAccount.
Args:
person:
vendorSpecific:
... | python | def registerAccountResponse(self, person, vendorSpecific=None):
"""CNIdentity.registerAccount(session, person) β Subject
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.registerAccount.
Args:
person:
vendorSpecific:
... | [
"def",
"registerAccountResponse",
"(",
"self",
",",
"person",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'person'",
":",
"(",
"'person.xml'",
",",
"person",
".",
"toxml",
"(",
"'utf-8'",
")",
")",
"}",
"return",
"self",
".",
"PO... | CNIdentity.registerAccount(session, person) β Subject
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.registerAccount.
Args:
person:
vendorSpecific:
Returns: | [
"CNIdentity",
".",
"registerAccount",
"(",
"session",
"person",
")",
"β",
"Subject",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
"/",
"CN_APIs"... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L510-L523 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.registerAccount | def registerAccount(self, person, vendorSpecific=None):
"""See Also: registerAccountResponse()
Args:
person:
vendorSpecific:
Returns:
"""
response = self.registerAccountResponse(person, vendorSpecific)
return self._read_boolean_response(response) | python | def registerAccount(self, person, vendorSpecific=None):
"""See Also: registerAccountResponse()
Args:
person:
vendorSpecific:
Returns:
"""
response = self.registerAccountResponse(person, vendorSpecific)
return self._read_boolean_response(response) | [
"def",
"registerAccount",
"(",
"self",
",",
"person",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"registerAccountResponse",
"(",
"person",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_boolean_response",
"(",
"respons... | See Also: registerAccountResponse()
Args:
person:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"registerAccountResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L525-L536 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.updateAccountResponse | def updateAccountResponse(self, subject, person, vendorSpecific=None):
"""CNIdentity.updateAccount(session, person) β Subject
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.updateAccount.
Args:
subject:
person:
ve... | python | def updateAccountResponse(self, subject, person, vendorSpecific=None):
"""CNIdentity.updateAccount(session, person) β Subject
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.updateAccount.
Args:
subject:
person:
ve... | [
"def",
"updateAccountResponse",
"(",
"self",
",",
"subject",
",",
"person",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'person'",
":",
"(",
"'person.xml'",
",",
"person",
".",
"toxml",
"(",
"'utf-8'",
")",
")",
"}",
"return",
"s... | CNIdentity.updateAccount(session, person) β Subject
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.updateAccount.
Args:
subject:
person:
vendorSpecific:
Returns: | [
"CNIdentity",
".",
"updateAccount",
"(",
"session",
"person",
")",
"β",
"Subject",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
"/",
"CN_APIs",
... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L538-L552 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.updateAccount | def updateAccount(self, subject, person, vendorSpecific=None):
"""See Also: updateAccountResponse()
Args:
subject:
person:
vendorSpecific:
Returns:
"""
response = self.updateAccountResponse(subject, person, vendorSpecific)
return self._rea... | python | def updateAccount(self, subject, person, vendorSpecific=None):
"""See Also: updateAccountResponse()
Args:
subject:
person:
vendorSpecific:
Returns:
"""
response = self.updateAccountResponse(subject, person, vendorSpecific)
return self._rea... | [
"def",
"updateAccount",
"(",
"self",
",",
"subject",
",",
"person",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"updateAccountResponse",
"(",
"subject",
",",
"person",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_... | See Also: updateAccountResponse()
Args:
subject:
person:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"updateAccountResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L554-L566 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.verifyAccount | def verifyAccount(self, subject, vendorSpecific=None):
"""See Also: verifyAccountResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.verifyAccountResponse(subject, vendorSpecific)
return self._read_boolean_response(response) | python | def verifyAccount(self, subject, vendorSpecific=None):
"""See Also: verifyAccountResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.verifyAccountResponse(subject, vendorSpecific)
return self._read_boolean_response(response) | [
"def",
"verifyAccount",
"(",
"self",
",",
"subject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"verifyAccountResponse",
"(",
"subject",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_boolean_response",
"(",
"response"... | See Also: verifyAccountResponse()
Args:
subject:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"verifyAccountResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L582-L593 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.getSubjectInfo | def getSubjectInfo(self, subject, vendorSpecific=None):
"""See Also: getSubjectInfoResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.getSubjectInfoResponse(subject, vendorSpecific)
return self._read_dataone_type_response(respons... | python | def getSubjectInfo(self, subject, vendorSpecific=None):
"""See Also: getSubjectInfoResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.getSubjectInfoResponse(subject, vendorSpecific)
return self._read_dataone_type_response(respons... | [
"def",
"getSubjectInfo",
"(",
"self",
",",
"subject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"getSubjectInfoResponse",
"(",
"subject",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_dataone_type_response",
"(",
"re... | See Also: getSubjectInfoResponse()
Args:
subject:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"getSubjectInfoResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L609-L620 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.listSubjectsResponse | def listSubjectsResponse(
self, query, status=None, start=None, count=None, vendorSpecific=None
):
"""CNIdentity.listSubjects(session, query, status, start, count) β SubjectList
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.listSubjects.
... | python | def listSubjectsResponse(
self, query, status=None, start=None, count=None, vendorSpecific=None
):
"""CNIdentity.listSubjects(session, query, status, start, count) β SubjectList
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.listSubjects.
... | [
"def",
"listSubjectsResponse",
"(",
"self",
",",
"query",
",",
"status",
"=",
"None",
",",
"start",
"=",
"None",
",",
"count",
"=",
"None",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"url_query",
"=",
"{",
"'status'",
":",
"status",
",",
"'start'",
... | CNIdentity.listSubjects(session, query, status, start, count) β SubjectList
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.listSubjects.
Args:
query:
status:
start:
count:
vendorSpecific:
Retu... | [
"CNIdentity",
".",
"listSubjects",
"(",
"session",
"query",
"status",
"start",
"count",
")",
"β",
"SubjectList",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L622-L640 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.listSubjects | def listSubjects(
self, query, status=None, start=None, count=None, vendorSpecific=None
):
"""See Also: listSubjectsResponse()
Args:
query:
status:
start:
count:
vendorSpecific:
Returns:
"""
response = self.listSubj... | python | def listSubjects(
self, query, status=None, start=None, count=None, vendorSpecific=None
):
"""See Also: listSubjectsResponse()
Args:
query:
status:
start:
count:
vendorSpecific:
Returns:
"""
response = self.listSubj... | [
"def",
"listSubjects",
"(",
"self",
",",
"query",
",",
"status",
"=",
"None",
",",
"start",
"=",
"None",
",",
"count",
"=",
"None",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"listSubjectsResponse",
"(",
"query",
",",
"... | See Also: listSubjectsResponse()
Args:
query:
status:
start:
count:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"listSubjectsResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L642-L660 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.mapIdentityResponse | def mapIdentityResponse(
self, primarySubject, secondarySubject, vendorSpecific=None
):
"""CNIdentity.mapIdentity(session, subject) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.mapIdentity.
Args:
primarySubjec... | python | def mapIdentityResponse(
self, primarySubject, secondarySubject, vendorSpecific=None
):
"""CNIdentity.mapIdentity(session, subject) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.mapIdentity.
Args:
primarySubjec... | [
"def",
"mapIdentityResponse",
"(",
"self",
",",
"primarySubject",
",",
"secondarySubject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'primarySubject'",
":",
"primarySubject",
".",
"toxml",
"(",
"'utf-8'",
")",
",",
"'secondarySubject'",
... | CNIdentity.mapIdentity(session, subject) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.mapIdentity.
Args:
primarySubject:
secondarySubject:
vendorSpecific:
Returns: | [
"CNIdentity",
".",
"mapIdentity",
"(",
"session",
"subject",
")",
"β",
"boolean",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
"/",
"CN_APIs",
... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L662-L681 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.mapIdentity | def mapIdentity(self, primarySubject, secondarySubject, vendorSpecific=None):
"""See Also: mapIdentityResponse()
Args:
primarySubject:
secondarySubject:
vendorSpecific:
Returns:
"""
response = self.mapIdentityResponse(
primarySubject, ... | python | def mapIdentity(self, primarySubject, secondarySubject, vendorSpecific=None):
"""See Also: mapIdentityResponse()
Args:
primarySubject:
secondarySubject:
vendorSpecific:
Returns:
"""
response = self.mapIdentityResponse(
primarySubject, ... | [
"def",
"mapIdentity",
"(",
"self",
",",
"primarySubject",
",",
"secondarySubject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"mapIdentityResponse",
"(",
"primarySubject",
",",
"secondarySubject",
",",
"vendorSpecific",
")",
"retur... | See Also: mapIdentityResponse()
Args:
primarySubject:
secondarySubject:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"mapIdentityResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L683-L697 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.removeMapIdentity | def removeMapIdentity(self, subject, vendorSpecific=None):
"""See Also: removeMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.removeMapIdentityResponse(subject, vendorSpecific)
return self._read_boolean_response(res... | python | def removeMapIdentity(self, subject, vendorSpecific=None):
"""See Also: removeMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.removeMapIdentityResponse(subject, vendorSpecific)
return self._read_boolean_response(res... | [
"def",
"removeMapIdentity",
"(",
"self",
",",
"subject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"removeMapIdentityResponse",
"(",
"subject",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_boolean_response",
"(",
"r... | See Also: removeMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"removeMapIdentityResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L713-L724 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.denyMapIdentity | def denyMapIdentity(self, subject, vendorSpecific=None):
"""See Also: denyMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.denyMapIdentityResponse(subject, vendorSpecific)
return self._read_boolean_response(response) | python | def denyMapIdentity(self, subject, vendorSpecific=None):
"""See Also: denyMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.denyMapIdentityResponse(subject, vendorSpecific)
return self._read_boolean_response(response) | [
"def",
"denyMapIdentity",
"(",
"self",
",",
"subject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"denyMapIdentityResponse",
"(",
"subject",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_boolean_response",
"(",
"respo... | See Also: denyMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"denyMapIdentityResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L740-L751 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.requestMapIdentityResponse | def requestMapIdentityResponse(self, subject, vendorSpecific=None):
"""CNIdentity.requestMapIdentity(session, subject) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.requestMapIdentity.
Args:
subject:
vendorSpecif... | python | def requestMapIdentityResponse(self, subject, vendorSpecific=None):
"""CNIdentity.requestMapIdentity(session, subject) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.requestMapIdentity.
Args:
subject:
vendorSpecif... | [
"def",
"requestMapIdentityResponse",
"(",
"self",
",",
"subject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'subject'",
":",
"subject",
".",
"toxml",
"(",
"'utf-8'",
")",
"}",
"return",
"self",
".",
"POST",
"(",
"'accounts'",
","... | CNIdentity.requestMapIdentity(session, subject) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.requestMapIdentity.
Args:
subject:
vendorSpecific:
Returns: | [
"CNIdentity",
".",
"requestMapIdentity",
"(",
"session",
"subject",
")",
"β",
"boolean",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
"/",
"CN_A... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L753-L766 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.requestMapIdentity | def requestMapIdentity(self, subject, vendorSpecific=None):
"""See Also: requestMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.requestMapIdentityResponse(subject, vendorSpecific)
return self._read_boolean_response(... | python | def requestMapIdentity(self, subject, vendorSpecific=None):
"""See Also: requestMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.requestMapIdentityResponse(subject, vendorSpecific)
return self._read_boolean_response(... | [
"def",
"requestMapIdentity",
"(",
"self",
",",
"subject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"requestMapIdentityResponse",
"(",
"subject",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_boolean_response",
"(",
... | See Also: requestMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"requestMapIdentityResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L768-L779 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.confirmMapIdentity | def confirmMapIdentity(self, subject, vendorSpecific=None):
"""See Also: confirmMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.confirmMapIdentityResponse(subject, vendorSpecific)
return self._read_boolean_response(... | python | def confirmMapIdentity(self, subject, vendorSpecific=None):
"""See Also: confirmMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns:
"""
response = self.confirmMapIdentityResponse(subject, vendorSpecific)
return self._read_boolean_response(... | [
"def",
"confirmMapIdentity",
"(",
"self",
",",
"subject",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"confirmMapIdentityResponse",
"(",
"subject",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_boolean_response",
"(",
... | See Also: confirmMapIdentityResponse()
Args:
subject:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"confirmMapIdentityResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L795-L806 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.createGroupResponse | def createGroupResponse(self, group, vendorSpecific=None):
"""CNIdentity.createGroup(session, groupName) β Subject
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.createGroup.
Args:
group:
vendorSpecific:
Returns:
... | python | def createGroupResponse(self, group, vendorSpecific=None):
"""CNIdentity.createGroup(session, groupName) β Subject
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.createGroup.
Args:
group:
vendorSpecific:
Returns:
... | [
"def",
"createGroupResponse",
"(",
"self",
",",
"group",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'group'",
":",
"(",
"'group.xml'",
",",
"group",
".",
"toxml",
"(",
"'utf-8'",
")",
")",
"}",
"return",
"self",
".",
"POST",
"... | CNIdentity.createGroup(session, groupName) β Subject
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.createGroup.
Args:
group:
vendorSpecific:
Returns: | [
"CNIdentity",
".",
"createGroup",
"(",
"session",
"groupName",
")",
"β",
"Subject",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
"/",
"CN_APIs",... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L808-L821 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.createGroup | def createGroup(self, group, vendorSpecific=None):
"""See Also: createGroupResponse()
Args:
group:
vendorSpecific:
Returns:
"""
response = self.createGroupResponse(group, vendorSpecific)
return self._read_boolean_response(response) | python | def createGroup(self, group, vendorSpecific=None):
"""See Also: createGroupResponse()
Args:
group:
vendorSpecific:
Returns:
"""
response = self.createGroupResponse(group, vendorSpecific)
return self._read_boolean_response(response) | [
"def",
"createGroup",
"(",
"self",
",",
"group",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"createGroupResponse",
"(",
"group",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_boolean_response",
"(",
"response",
")"
... | See Also: createGroupResponse()
Args:
group:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"createGroupResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L823-L834 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.updateGroupResponse | def updateGroupResponse(self, group, vendorSpecific=None):
"""CNIdentity.addGroupMembers(session, groupName, members) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.addGroupMembers.
Args:
group:
vendorSpecific:
... | python | def updateGroupResponse(self, group, vendorSpecific=None):
"""CNIdentity.addGroupMembers(session, groupName, members) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.addGroupMembers.
Args:
group:
vendorSpecific:
... | [
"def",
"updateGroupResponse",
"(",
"self",
",",
"group",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'group'",
":",
"(",
"'group.xml'",
",",
"group",
".",
"toxml",
"(",
"'utf-8'",
")",
")",
"}",
"return",
"self",
".",
"PUT",
"(... | CNIdentity.addGroupMembers(session, groupName, members) β boolean
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNIdentity.addGroupMembers.
Args:
group:
vendorSpecific:
Returns: | [
"CNIdentity",
".",
"addGroupMembers",
"(",
"session",
"groupName",
"members",
")",
"β",
"boolean",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L836-L849 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.updateGroup | def updateGroup(self, group, vendorSpecific=None):
"""See Also: updateGroupResponse()
Args:
group:
vendorSpecific:
Returns:
"""
response = self.updateGroupResponse(group, vendorSpecific)
return self._read_boolean_response(response) | python | def updateGroup(self, group, vendorSpecific=None):
"""See Also: updateGroupResponse()
Args:
group:
vendorSpecific:
Returns:
"""
response = self.updateGroupResponse(group, vendorSpecific)
return self._read_boolean_response(response) | [
"def",
"updateGroup",
"(",
"self",
",",
"group",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"updateGroupResponse",
"(",
"group",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_boolean_response",
"(",
"response",
")"
... | See Also: updateGroupResponse()
Args:
group:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"updateGroupResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L851-L862 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setReplicationStatusResponse | def setReplicationStatusResponse(
self, pid, nodeRef, status, dataoneError=None, vendorSpecific=None
):
"""CNReplication.setReplicationStatus(session, pid, nodeRef, status, failure) β
boolean https://releases.dataone.org/online/api-documentatio
n-v2.0.1/apis/CN_APIs.html#CNReplicatio... | python | def setReplicationStatusResponse(
self, pid, nodeRef, status, dataoneError=None, vendorSpecific=None
):
"""CNReplication.setReplicationStatus(session, pid, nodeRef, status, failure) β
boolean https://releases.dataone.org/online/api-documentatio
n-v2.0.1/apis/CN_APIs.html#CNReplicatio... | [
"def",
"setReplicationStatusResponse",
"(",
"self",
",",
"pid",
",",
"nodeRef",
",",
"status",
",",
"dataoneError",
"=",
"None",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'nodeRef'",
":",
"nodeRef",
",",
"'status'",
":",
"status",
... | CNReplication.setReplicationStatus(session, pid, nodeRef, status, failure) β
boolean https://releases.dataone.org/online/api-documentatio
n-v2.0.1/apis/CN_APIs.html#CNReplication.setReplicationStatus.
Args:
pid:
nodeRef:
status:
dataoneError:
ve... | [
"CNReplication",
".",
"setReplicationStatus",
"(",
"session",
"pid",
"nodeRef",
"status",
"failure",
")",
"β",
"boolean",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentatio",
"n",
"-",
"v2",
".",
"0",
... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L868-L890 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setReplicationStatus | def setReplicationStatus(
self, pid, nodeRef, status, dataoneError=None, vendorSpecific=None
):
"""See Also: setReplicationStatusResponse()
Args:
pid:
nodeRef:
status:
dataoneError:
vendorSpecific:
Returns:
"""
resp... | python | def setReplicationStatus(
self, pid, nodeRef, status, dataoneError=None, vendorSpecific=None
):
"""See Also: setReplicationStatusResponse()
Args:
pid:
nodeRef:
status:
dataoneError:
vendorSpecific:
Returns:
"""
resp... | [
"def",
"setReplicationStatus",
"(",
"self",
",",
"pid",
",",
"nodeRef",
",",
"status",
",",
"dataoneError",
"=",
"None",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"setReplicationStatusResponse",
"(",
"pid",
",",
"nodeRef",
"... | See Also: setReplicationStatusResponse()
Args:
pid:
nodeRef:
status:
dataoneError:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"setReplicationStatusResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L892-L910 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.updateReplicationMetadataResponse | def updateReplicationMetadataResponse(
self, pid, replicaMetadata, serialVersion, vendorSpecific=None
):
"""CNReplication.updateReplicationMetadata(session, pid, replicaMetadata,
serialVersion) β boolean https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_AP Is.html... | python | def updateReplicationMetadataResponse(
self, pid, replicaMetadata, serialVersion, vendorSpecific=None
):
"""CNReplication.updateReplicationMetadata(session, pid, replicaMetadata,
serialVersion) β boolean https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_AP Is.html... | [
"def",
"updateReplicationMetadataResponse",
"(",
"self",
",",
"pid",
",",
"replicaMetadata",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'replicaMetadata'",
":",
"(",
"'replicaMetadata.xml'",
",",
"replicaMetadata",
"."... | CNReplication.updateReplicationMetadata(session, pid, replicaMetadata,
serialVersion) β boolean https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_AP Is.html#CNReplication.updateReplicationMetadata
Not implemented.
Args:
pid:
replicaMetadata:
... | [
"CNReplication",
".",
"updateReplicationMetadata",
"(",
"session",
"pid",
"replicaMetadata",
"serialVersion",
")",
"β",
"boolean",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L912-L935 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.updateReplicationMetadata | def updateReplicationMetadata(
self, pid, replicaMetadata, serialVersion, vendorSpecific=None
):
"""See Also: updateReplicationMetadataResponse()
Args:
pid:
replicaMetadata:
serialVersion:
vendorSpecific:
Returns:
"""
respons... | python | def updateReplicationMetadata(
self, pid, replicaMetadata, serialVersion, vendorSpecific=None
):
"""See Also: updateReplicationMetadataResponse()
Args:
pid:
replicaMetadata:
serialVersion:
vendorSpecific:
Returns:
"""
respons... | [
"def",
"updateReplicationMetadata",
"(",
"self",
",",
"pid",
",",
"replicaMetadata",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"updateReplicationMetadataResponse",
"(",
"pid",
",",
"replicaMetadata",
",",
"se... | See Also: updateReplicationMetadataResponse()
Args:
pid:
replicaMetadata:
serialVersion:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"updateReplicationMetadataResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L937-L954 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setReplicationPolicyResponse | def setReplicationPolicyResponse(
self, pid, policy, serialVersion, vendorSpecific=None
):
"""CNReplication.setReplicationPolicy(session, pid, policy, serialVersion) β
boolean https://releases.dataone.org/online/api-docume
ntation-v2.0.1/apis/CN_APIs.html#CNReplication.setReplication... | python | def setReplicationPolicyResponse(
self, pid, policy, serialVersion, vendorSpecific=None
):
"""CNReplication.setReplicationPolicy(session, pid, policy, serialVersion) β
boolean https://releases.dataone.org/online/api-docume
ntation-v2.0.1/apis/CN_APIs.html#CNReplication.setReplication... | [
"def",
"setReplicationPolicyResponse",
"(",
"self",
",",
"pid",
",",
"policy",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'policy'",
":",
"(",
"'policy.xml'",
",",
"policy",
".",
"toxml",
"(",
"'utf-8'",
")",
... | CNReplication.setReplicationPolicy(session, pid, policy, serialVersion) β
boolean https://releases.dataone.org/online/api-docume
ntation-v2.0.1/apis/CN_APIs.html#CNReplication.setReplicationPolicy.
Args:
pid:
policy:
serialVersion:
vendorSpecific:
... | [
"CNReplication",
".",
"setReplicationPolicy",
"(",
"session",
"pid",
"policy",
"serialVersion",
")",
"β",
"boolean",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"docume",
"ntation",
"-",
"v2",
".",
"0",
".",
... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L956-L978 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.setReplicationPolicy | def setReplicationPolicy(self, pid, policy, serialVersion, vendorSpecific=None):
"""See Also: setReplicationPolicyResponse()
Args:
pid:
policy:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.setReplicationPolicyResponse(
... | python | def setReplicationPolicy(self, pid, policy, serialVersion, vendorSpecific=None):
"""See Also: setReplicationPolicyResponse()
Args:
pid:
policy:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.setReplicationPolicyResponse(
... | [
"def",
"setReplicationPolicy",
"(",
"self",
",",
"pid",
",",
"policy",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"setReplicationPolicyResponse",
"(",
"pid",
",",
"policy",
",",
"serialVersion",
",",
"vend... | See Also: setReplicationPolicyResponse()
Args:
pid:
policy:
serialVersion:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"setReplicationPolicyResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L980-L995 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.isNodeAuthorizedResponse | def isNodeAuthorizedResponse(self, targetNodeSubject, pid, vendorSpecific=None):
"""CNReplication.isNodeAuthorized(session, targetNodeSubject, pid,
replicatePermission) β boolean() https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNReplication.isNodeAuthorized.
... | python | def isNodeAuthorizedResponse(self, targetNodeSubject, pid, vendorSpecific=None):
"""CNReplication.isNodeAuthorized(session, targetNodeSubject, pid,
replicatePermission) β boolean() https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNReplication.isNodeAuthorized.
... | [
"def",
"isNodeAuthorizedResponse",
"(",
"self",
",",
"targetNodeSubject",
",",
"pid",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"query_dict",
"=",
"{",
"'targetNodeSubject'",
":",
"targetNodeSubject",
"}",
"return",
"self",
".",
"GET",
"(",
"[",
"'replicaAut... | CNReplication.isNodeAuthorized(session, targetNodeSubject, pid,
replicatePermission) β boolean() https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNReplication.isNodeAuthorized.
Args:
targetNodeSubject:
pid:
vendorSpecific:
R... | [
"CNReplication",
".",
"isNodeAuthorized",
"(",
"session",
"targetNodeSubject",
"pid",
"replicatePermission",
")",
"β",
"boolean",
"()",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L999-L1015 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.isNodeAuthorized | def isNodeAuthorized(self, targetNodeSubject, pid, vendorSpecific=None):
"""See Also: isNodeAuthorizedResponse()
Args:
targetNodeSubject:
pid:
vendorSpecific:
Returns:
"""
response = self.isNodeAuthorizedResponse(targetNodeSubject, pid, vendorSpec... | python | def isNodeAuthorized(self, targetNodeSubject, pid, vendorSpecific=None):
"""See Also: isNodeAuthorizedResponse()
Args:
targetNodeSubject:
pid:
vendorSpecific:
Returns:
"""
response = self.isNodeAuthorizedResponse(targetNodeSubject, pid, vendorSpec... | [
"def",
"isNodeAuthorized",
"(",
"self",
",",
"targetNodeSubject",
",",
"pid",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"isNodeAuthorizedResponse",
"(",
"targetNodeSubject",
",",
"pid",
",",
"vendorSpecific",
")",
"return",
"sel... | See Also: isNodeAuthorizedResponse()
Args:
targetNodeSubject:
pid:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"isNodeAuthorizedResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L1017-L1029 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.deleteReplicationMetadataResponse | def deleteReplicationMetadataResponse(
self, pid, nodeId, serialVersion, vendorSpecific=None
):
"""CNReplication.deleteReplicationMetadata(session, pid, policy, serialVersion)
β boolean https://releases.dataone.org/online/api-docume
ntation-v2.0.1/apis/CN_APIs.html#CNReplication.del... | python | def deleteReplicationMetadataResponse(
self, pid, nodeId, serialVersion, vendorSpecific=None
):
"""CNReplication.deleteReplicationMetadata(session, pid, policy, serialVersion)
β boolean https://releases.dataone.org/online/api-docume
ntation-v2.0.1/apis/CN_APIs.html#CNReplication.del... | [
"def",
"deleteReplicationMetadataResponse",
"(",
"self",
",",
"pid",
",",
"nodeId",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'nodeId'",
":",
"nodeId",
",",
"'serialVersion'",
":",
"str",
"(",
"serialVersion",
"... | CNReplication.deleteReplicationMetadata(session, pid, policy, serialVersion)
β boolean https://releases.dataone.org/online/api-docume
ntation-v2.0.1/apis/CN_APIs.html#CNReplication.deleteReplicationMetadat a.
Args:
pid:
nodeId:
serialVersion:
vendorSpeci... | [
"CNReplication",
".",
"deleteReplicationMetadata",
"(",
"session",
"pid",
"policy",
"serialVersion",
")"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L1031-L1051 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.deleteReplicationMetadata | def deleteReplicationMetadata(
self, pid, nodeId, serialVersion, vendorSpecific=None
):
"""See Also: deleteReplicationMetadataResponse()
Args:
pid:
nodeId:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.deleteRep... | python | def deleteReplicationMetadata(
self, pid, nodeId, serialVersion, vendorSpecific=None
):
"""See Also: deleteReplicationMetadataResponse()
Args:
pid:
nodeId:
serialVersion:
vendorSpecific:
Returns:
"""
response = self.deleteRep... | [
"def",
"deleteReplicationMetadata",
"(",
"self",
",",
"pid",
",",
"nodeId",
",",
"serialVersion",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"deleteReplicationMetadataResponse",
"(",
"pid",
",",
"nodeId",
",",
"serialVersion",
",... | See Also: deleteReplicationMetadataResponse()
Args:
pid:
nodeId:
serialVersion:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"deleteReplicationMetadataResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L1053-L1070 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.updateNodeCapabilitiesResponse | def updateNodeCapabilitiesResponse(self, nodeId, node, vendorSpecific=None):
"""CNRegister.updateNodeCapabilities(session, nodeId, node) β boolean
https://releases.dataone.org/online/api-documentation-v2.0.1/apis/CN_AP
Is.html#CNRegister.updateNodeCapabilities.
Args:
nodeId:
... | python | def updateNodeCapabilitiesResponse(self, nodeId, node, vendorSpecific=None):
"""CNRegister.updateNodeCapabilities(session, nodeId, node) β boolean
https://releases.dataone.org/online/api-documentation-v2.0.1/apis/CN_AP
Is.html#CNRegister.updateNodeCapabilities.
Args:
nodeId:
... | [
"def",
"updateNodeCapabilitiesResponse",
"(",
"self",
",",
"nodeId",
",",
"node",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'node'",
":",
"(",
"'node.xml'",
",",
"node",
".",
"toxml",
"(",
"'utf-8'",
")",
")",
"}",
"return",
"s... | CNRegister.updateNodeCapabilities(session, nodeId, node) β boolean
https://releases.dataone.org/online/api-documentation-v2.0.1/apis/CN_AP
Is.html#CNRegister.updateNodeCapabilities.
Args:
nodeId:
node:
vendorSpecific:
Returns: | [
"CNRegister",
".",
"updateNodeCapabilities",
"(",
"session",
"nodeId",
"node",
")",
"β",
"boolean",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L1076-L1090 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.updateNodeCapabilities | def updateNodeCapabilities(self, nodeId, node, vendorSpecific=None):
"""See Also: updateNodeCapabilitiesResponse()
Args:
nodeId:
node:
vendorSpecific:
Returns:
"""
response = self.updateNodeCapabilitiesResponse(nodeId, node, vendorSpecific)
... | python | def updateNodeCapabilities(self, nodeId, node, vendorSpecific=None):
"""See Also: updateNodeCapabilitiesResponse()
Args:
nodeId:
node:
vendorSpecific:
Returns:
"""
response = self.updateNodeCapabilitiesResponse(nodeId, node, vendorSpecific)
... | [
"def",
"updateNodeCapabilities",
"(",
"self",
",",
"nodeId",
",",
"node",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"updateNodeCapabilitiesResponse",
"(",
"nodeId",
",",
"node",
",",
"vendorSpecific",
")",
"return",
"self",
".... | See Also: updateNodeCapabilitiesResponse()
Args:
nodeId:
node:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"updateNodeCapabilitiesResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L1092-L1104 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.registerResponse | def registerResponse(self, node, vendorSpecific=None):
"""CNRegister.register(session, node) β NodeReference
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNRegister.register.
Args:
node:
vendorSpecific:
Returns:
""... | python | def registerResponse(self, node, vendorSpecific=None):
"""CNRegister.register(session, node) β NodeReference
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNRegister.register.
Args:
node:
vendorSpecific:
Returns:
""... | [
"def",
"registerResponse",
"(",
"self",
",",
"node",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"mmp_dict",
"=",
"{",
"'node'",
":",
"(",
"'node.xml'",
",",
"node",
".",
"toxml",
"(",
"'utf-8'",
")",
")",
"}",
"return",
"self",
".",
"POST",
"(",
"... | CNRegister.register(session, node) β NodeReference
https://releases.dataone.org/online/api-
documentation-v2.0.1/apis/CN_APIs.html#CNRegister.register.
Args:
node:
vendorSpecific:
Returns: | [
"CNRegister",
".",
"register",
"(",
"session",
"node",
")",
"β",
"NodeReference",
"https",
":",
"//",
"releases",
".",
"dataone",
".",
"org",
"/",
"online",
"/",
"api",
"-",
"documentation",
"-",
"v2",
".",
"0",
".",
"1",
"/",
"apis",
"/",
"CN_APIs",
... | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L1106-L1119 |
DataONEorg/d1_python | lib_client/src/d1_client/cnclient.py | CoordinatingNodeClient.register | def register(self, node, vendorSpecific=None):
"""See Also: registerResponse()
Args:
node:
vendorSpecific:
Returns:
"""
response = self.registerResponse(node, vendorSpecific)
return self._read_boolean_response(response) | python | def register(self, node, vendorSpecific=None):
"""See Also: registerResponse()
Args:
node:
vendorSpecific:
Returns:
"""
response = self.registerResponse(node, vendorSpecific)
return self._read_boolean_response(response) | [
"def",
"register",
"(",
"self",
",",
"node",
",",
"vendorSpecific",
"=",
"None",
")",
":",
"response",
"=",
"self",
".",
"registerResponse",
"(",
"node",
",",
"vendorSpecific",
")",
"return",
"self",
".",
"_read_boolean_response",
"(",
"response",
")"
] | See Also: registerResponse()
Args:
node:
vendorSpecific:
Returns: | [
"See",
"Also",
":",
"registerResponse",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/lib_client/src/d1_client/cnclient.py#L1121-L1132 |
genialis/resolwe | resolwe/flow/management/commands/register.py | Command.valid | def valid(self, instance, schema):
"""Validate schema."""
try:
jsonschema.validate(instance, schema)
except jsonschema.exceptions.ValidationError as ex:
self.stderr.write(" VALIDATION ERROR: {}".format(instance['name'] if 'name' in instance else ''))
self.s... | python | def valid(self, instance, schema):
"""Validate schema."""
try:
jsonschema.validate(instance, schema)
except jsonschema.exceptions.ValidationError as ex:
self.stderr.write(" VALIDATION ERROR: {}".format(instance['name'] if 'name' in instance else ''))
self.s... | [
"def",
"valid",
"(",
"self",
",",
"instance",
",",
"schema",
")",
":",
"try",
":",
"jsonschema",
".",
"validate",
"(",
"instance",
",",
"schema",
")",
"except",
"jsonschema",
".",
"exceptions",
".",
"ValidationError",
"as",
"ex",
":",
"self",
".",
"stder... | Validate schema. | [
"Validate",
"schema",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/management/commands/register.py#L47-L70 |
genialis/resolwe | resolwe/flow/management/commands/register.py | Command.find_descriptor_schemas | def find_descriptor_schemas(self, schema_file):
"""Find descriptor schemas in given path."""
if not schema_file.lower().endswith(('.yml', '.yaml')):
return []
with open(schema_file) as fn:
schemas = yaml.load(fn, Loader=yaml.FullLoader)
if not schemas:
... | python | def find_descriptor_schemas(self, schema_file):
"""Find descriptor schemas in given path."""
if not schema_file.lower().endswith(('.yml', '.yaml')):
return []
with open(schema_file) as fn:
schemas = yaml.load(fn, Loader=yaml.FullLoader)
if not schemas:
... | [
"def",
"find_descriptor_schemas",
"(",
"self",
",",
"schema_file",
")",
":",
"if",
"not",
"schema_file",
".",
"lower",
"(",
")",
".",
"endswith",
"(",
"(",
"'.yml'",
",",
"'.yaml'",
")",
")",
":",
"return",
"[",
"]",
"with",
"open",
"(",
"schema_file",
... | Find descriptor schemas in given path. | [
"Find",
"descriptor",
"schemas",
"in",
"given",
"path",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/management/commands/register.py#L72-L90 |
genialis/resolwe | resolwe/flow/management/commands/register.py | Command.find_schemas | def find_schemas(self, schema_path, schema_type=SCHEMA_TYPE_PROCESS, verbosity=1):
"""Find schemas in packages that match filters."""
schema_matches = []
if not os.path.isdir(schema_path):
if verbosity > 0:
self.stdout.write("Invalid path {}".format(schema_path))
... | python | def find_schemas(self, schema_path, schema_type=SCHEMA_TYPE_PROCESS, verbosity=1):
"""Find schemas in packages that match filters."""
schema_matches = []
if not os.path.isdir(schema_path):
if verbosity > 0:
self.stdout.write("Invalid path {}".format(schema_path))
... | [
"def",
"find_schemas",
"(",
"self",
",",
"schema_path",
",",
"schema_type",
"=",
"SCHEMA_TYPE_PROCESS",
",",
"verbosity",
"=",
"1",
")",
":",
"schema_matches",
"=",
"[",
"]",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"schema_path",
")",
":",
"if... | Find schemas in packages that match filters. | [
"Find",
"schemas",
"in",
"packages",
"that",
"match",
"filters",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/management/commands/register.py#L92-L119 |
genialis/resolwe | resolwe/flow/management/commands/register.py | Command.register_processes | def register_processes(self, process_schemas, user, force=False, verbosity=1):
"""Read and register processors."""
log_processors = []
log_templates = []
for p in process_schemas:
# TODO: Remove this when all processes are migrated to the
# new syntax.
... | python | def register_processes(self, process_schemas, user, force=False, verbosity=1):
"""Read and register processors."""
log_processors = []
log_templates = []
for p in process_schemas:
# TODO: Remove this when all processes are migrated to the
# new syntax.
... | [
"def",
"register_processes",
"(",
"self",
",",
"process_schemas",
",",
"user",
",",
"force",
"=",
"False",
",",
"verbosity",
"=",
"1",
")",
":",
"log_processors",
"=",
"[",
"]",
"log_templates",
"=",
"[",
"]",
"for",
"p",
"in",
"process_schemas",
":",
"#... | Read and register processors. | [
"Read",
"and",
"register",
"processors",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/management/commands/register.py#L121-L269 |
genialis/resolwe | resolwe/flow/management/commands/register.py | Command.register_descriptors | def register_descriptors(self, descriptor_schemas, user, force=False, verbosity=1):
"""Read and register descriptors."""
log_descriptors = []
for descriptor_schema in descriptor_schemas:
for schema, _, _ in iterate_schema({}, descriptor_schema.get('schema', {})):
if ... | python | def register_descriptors(self, descriptor_schemas, user, force=False, verbosity=1):
"""Read and register descriptors."""
log_descriptors = []
for descriptor_schema in descriptor_schemas:
for schema, _, _ in iterate_schema({}, descriptor_schema.get('schema', {})):
if ... | [
"def",
"register_descriptors",
"(",
"self",
",",
"descriptor_schemas",
",",
"user",
",",
"force",
"=",
"False",
",",
"verbosity",
"=",
"1",
")",
":",
"log_descriptors",
"=",
"[",
"]",
"for",
"descriptor_schema",
"in",
"descriptor_schemas",
":",
"for",
"schema"... | Read and register descriptors. | [
"Read",
"and",
"register",
"descriptors",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/management/commands/register.py#L271-L321 |
genialis/resolwe | resolwe/flow/management/commands/register.py | Command.retire | def retire(self, process_schemas):
"""Retire obsolete processes.
Remove old process versions without data. Find processes that have been
registered but do not exist in the code anymore, then:
- If they do not have data: remove them
- If they have data: flag them not active (``i... | python | def retire(self, process_schemas):
"""Retire obsolete processes.
Remove old process versions without data. Find processes that have been
registered but do not exist in the code anymore, then:
- If they do not have data: remove them
- If they have data: flag them not active (``i... | [
"def",
"retire",
"(",
"self",
",",
"process_schemas",
")",
":",
"process_slugs",
"=",
"set",
"(",
"ps",
"[",
"'slug'",
"]",
"for",
"ps",
"in",
"process_schemas",
")",
"# Processes that are in DB but not in the code",
"retired_processes",
"=",
"Process",
".",
"obje... | Retire obsolete processes.
Remove old process versions without data. Find processes that have been
registered but do not exist in the code anymore, then:
- If they do not have data: remove them
- If they have data: flag them not active (``is_active=False``) | [
"Retire",
"obsolete",
"processes",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/management/commands/register.py#L323-L346 |
genialis/resolwe | resolwe/flow/management/commands/register.py | Command.handle | def handle(self, *args, **options):
"""Register processes."""
force = options.get('force')
retire = options.get('retire')
verbosity = int(options.get('verbosity'))
users = get_user_model().objects.filter(is_superuser=True).order_by('date_joined')
if not users.exists():
... | python | def handle(self, *args, **options):
"""Register processes."""
force = options.get('force')
retire = options.get('retire')
verbosity = int(options.get('verbosity'))
users = get_user_model().objects.filter(is_superuser=True).order_by('date_joined')
if not users.exists():
... | [
"def",
"handle",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"options",
")",
":",
"force",
"=",
"options",
".",
"get",
"(",
"'force'",
")",
"retire",
"=",
"options",
".",
"get",
"(",
"'retire'",
")",
"verbosity",
"=",
"int",
"(",
"options",
".",
... | Register processes. | [
"Register",
"processes",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/management/commands/register.py#L348-L386 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/did.py | is_valid_pid_for_create | def is_valid_pid_for_create(did):
"""Return True if ``did`` is the PID of an object that can be created with
MNStorage.create() or MNStorage.update().
To be valid for create() and update(), the DID:
- Must not be the PID of an object that exists on this MN
- Must not be a known SID known to this M... | python | def is_valid_pid_for_create(did):
"""Return True if ``did`` is the PID of an object that can be created with
MNStorage.create() or MNStorage.update().
To be valid for create() and update(), the DID:
- Must not be the PID of an object that exists on this MN
- Must not be a known SID known to this M... | [
"def",
"is_valid_pid_for_create",
"(",
"did",
")",
":",
"# logger.debug('existing: {}'.format(is_existing_object(did)))",
"# logger.debug('sid: {}'.format(is_sid(did)))",
"# logger.debug('local_replica: {}'.format(is_local_replica(did)))",
"# logger.debug('revision: {}'.format(d1_gmn.app.revision.... | Return True if ``did`` is the PID of an object that can be created with
MNStorage.create() or MNStorage.update().
To be valid for create() and update(), the DID:
- Must not be the PID of an object that exists on this MN
- Must not be a known SID known to this MN
- Must not have been accepted for r... | [
"Return",
"True",
"if",
"did",
"is",
"the",
"PID",
"of",
"an",
"object",
"that",
"can",
"be",
"created",
"with",
"MNStorage",
".",
"create",
"()",
"or",
"MNStorage",
".",
"update",
"()",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/did.py#L31-L61 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/did.py | is_valid_pid_to_be_updated | def is_valid_pid_to_be_updated(did):
"""Return True if ``did`` is the PID of an object that can be updated (obsoleted)
with MNStorage.update()"""
return (
is_existing_object(did)
and not is_local_replica(did)
and not is_archived(did)
and not is_obsoleted(did)
) | python | def is_valid_pid_to_be_updated(did):
"""Return True if ``did`` is the PID of an object that can be updated (obsoleted)
with MNStorage.update()"""
return (
is_existing_object(did)
and not is_local_replica(did)
and not is_archived(did)
and not is_obsoleted(did)
) | [
"def",
"is_valid_pid_to_be_updated",
"(",
"did",
")",
":",
"return",
"(",
"is_existing_object",
"(",
"did",
")",
"and",
"not",
"is_local_replica",
"(",
"did",
")",
"and",
"not",
"is_archived",
"(",
"did",
")",
"and",
"not",
"is_obsoleted",
"(",
"did",
")",
... | Return True if ``did`` is the PID of an object that can be updated (obsoleted)
with MNStorage.update() | [
"Return",
"True",
"if",
"did",
"is",
"the",
"PID",
"of",
"an",
"object",
"that",
"can",
"be",
"updated",
"(",
"obsoleted",
")",
"with",
"MNStorage",
".",
"update",
"()"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/did.py#L69-L77 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/did.py | is_valid_sid_for_chain | def is_valid_sid_for_chain(pid, sid):
"""Return True if ``sid`` can be assigned to the single object ``pid`` or to the
chain to which ``pid`` belongs.
- If the chain does not have a SID, the new SID must be previously unused.
- If the chain already has a SID, the new SID must match the existing SID.
... | python | def is_valid_sid_for_chain(pid, sid):
"""Return True if ``sid`` can be assigned to the single object ``pid`` or to the
chain to which ``pid`` belongs.
- If the chain does not have a SID, the new SID must be previously unused.
- If the chain already has a SID, the new SID must match the existing SID.
... | [
"def",
"is_valid_sid_for_chain",
"(",
"pid",
",",
"sid",
")",
":",
"if",
"_is_unused_did",
"(",
"sid",
")",
":",
"return",
"True",
"existing_sid",
"=",
"d1_gmn",
".",
"app",
".",
"revision",
".",
"get_sid_by_pid",
"(",
"pid",
")",
"if",
"existing_sid",
"is... | Return True if ``sid`` can be assigned to the single object ``pid`` or to the
chain to which ``pid`` belongs.
- If the chain does not have a SID, the new SID must be previously unused.
- If the chain already has a SID, the new SID must match the existing SID.
All known PIDs are associated with a chain... | [
"Return",
"True",
"if",
"sid",
"can",
"be",
"assigned",
"to",
"the",
"single",
"object",
"pid",
"or",
"to",
"the",
"chain",
"to",
"which",
"pid",
"belongs",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/did.py#L80-L100 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/did.py | is_existing_object | def is_existing_object(did):
"""Return True if PID is for an object for which science bytes are stored locally.
This excludes SIDs and PIDs for unprocessed replica requests, remote or non-existing
revisions of local replicas and objects aggregated in Resource Maps.
"""
return d1_gmn.app.models.Sci... | python | def is_existing_object(did):
"""Return True if PID is for an object for which science bytes are stored locally.
This excludes SIDs and PIDs for unprocessed replica requests, remote or non-existing
revisions of local replicas and objects aggregated in Resource Maps.
"""
return d1_gmn.app.models.Sci... | [
"def",
"is_existing_object",
"(",
"did",
")",
":",
"return",
"d1_gmn",
".",
"app",
".",
"models",
".",
"ScienceObject",
".",
"objects",
".",
"filter",
"(",
"pid__did",
"=",
"did",
")",
".",
"exists",
"(",
")"
] | Return True if PID is for an object for which science bytes are stored locally.
This excludes SIDs and PIDs for unprocessed replica requests, remote or non-existing
revisions of local replicas and objects aggregated in Resource Maps. | [
"Return",
"True",
"if",
"PID",
"is",
"for",
"an",
"object",
"for",
"which",
"science",
"bytes",
"are",
"stored",
"locally",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/did.py#L115-L122 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/did.py | classify_identifier | def classify_identifier(did):
"""Return a text fragment classifying the ``did``
Return <UNKNOWN> if the DID could not be classified. This should not normally happen
and may indicate that the DID was orphaned in the database.
"""
if _is_unused_did(did):
return 'unused on this Member Node'
... | python | def classify_identifier(did):
"""Return a text fragment classifying the ``did``
Return <UNKNOWN> if the DID could not be classified. This should not normally happen
and may indicate that the DID was orphaned in the database.
"""
if _is_unused_did(did):
return 'unused on this Member Node'
... | [
"def",
"classify_identifier",
"(",
"did",
")",
":",
"if",
"_is_unused_did",
"(",
"did",
")",
":",
"return",
"'unused on this Member Node'",
"elif",
"is_sid",
"(",
"did",
")",
":",
"return",
"'a Series ID (SID) of a revision chain'",
"elif",
"is_local_replica",
"(",
... | Return a text fragment classifying the ``did``
Return <UNKNOWN> if the DID could not be classified. This should not normally happen
and may indicate that the DID was orphaned in the database. | [
"Return",
"a",
"text",
"fragment",
"classifying",
"the",
"did"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/did.py#L142-L178 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/did.py | is_local_replica | def is_local_replica(pid):
"""Includes unprocessed replication requests."""
return d1_gmn.app.models.LocalReplica.objects.filter(pid__did=pid).exists() | python | def is_local_replica(pid):
"""Includes unprocessed replication requests."""
return d1_gmn.app.models.LocalReplica.objects.filter(pid__did=pid).exists() | [
"def",
"is_local_replica",
"(",
"pid",
")",
":",
"return",
"d1_gmn",
".",
"app",
".",
"models",
".",
"LocalReplica",
".",
"objects",
".",
"filter",
"(",
"pid__did",
"=",
"pid",
")",
".",
"exists",
"(",
")"
] | Includes unprocessed replication requests. | [
"Includes",
"unprocessed",
"replication",
"requests",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/did.py#L195-L197 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/did.py | is_unprocessed_local_replica | def is_unprocessed_local_replica(pid):
"""Is local replica with status "queued"."""
return d1_gmn.app.models.LocalReplica.objects.filter(
pid__did=pid, info__status__status='queued'
).exists() | python | def is_unprocessed_local_replica(pid):
"""Is local replica with status "queued"."""
return d1_gmn.app.models.LocalReplica.objects.filter(
pid__did=pid, info__status__status='queued'
).exists() | [
"def",
"is_unprocessed_local_replica",
"(",
"pid",
")",
":",
"return",
"d1_gmn",
".",
"app",
".",
"models",
".",
"LocalReplica",
".",
"objects",
".",
"filter",
"(",
"pid__did",
"=",
"pid",
",",
"info__status__status",
"=",
"'queued'",
")",
".",
"exists",
"("... | Is local replica with status "queued". | [
"Is",
"local",
"replica",
"with",
"status",
"queued",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/did.py#L200-L204 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/did.py | is_revision_chain_placeholder | def is_revision_chain_placeholder(pid):
"""For replicas, the PIDs referenced in revision chains are reserved for use by
other replicas."""
return d1_gmn.app.models.ReplicaRevisionChainReference.objects.filter(
pid__did=pid
).exists() | python | def is_revision_chain_placeholder(pid):
"""For replicas, the PIDs referenced in revision chains are reserved for use by
other replicas."""
return d1_gmn.app.models.ReplicaRevisionChainReference.objects.filter(
pid__did=pid
).exists() | [
"def",
"is_revision_chain_placeholder",
"(",
"pid",
")",
":",
"return",
"d1_gmn",
".",
"app",
".",
"models",
".",
"ReplicaRevisionChainReference",
".",
"objects",
".",
"filter",
"(",
"pid__did",
"=",
"pid",
")",
".",
"exists",
"(",
")"
] | For replicas, the PIDs referenced in revision chains are reserved for use by
other replicas. | [
"For",
"replicas",
"the",
"PIDs",
"referenced",
"in",
"revision",
"chains",
"are",
"reserved",
"for",
"use",
"by",
"other",
"replicas",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/did.py#L207-L212 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/did.py | _is_did | def _is_did(did):
"""Return True if ``did`` is recorded in a local context.
``did``=None is supported and returns False.
A DID can be classified with classify_identifier().
"""
return d1_gmn.app.models.IdNamespace.objects.filter(did=did).exists() | python | def _is_did(did):
"""Return True if ``did`` is recorded in a local context.
``did``=None is supported and returns False.
A DID can be classified with classify_identifier().
"""
return d1_gmn.app.models.IdNamespace.objects.filter(did=did).exists() | [
"def",
"_is_did",
"(",
"did",
")",
":",
"return",
"d1_gmn",
".",
"app",
".",
"models",
".",
"IdNamespace",
".",
"objects",
".",
"filter",
"(",
"did",
"=",
"did",
")",
".",
"exists",
"(",
")"
] | Return True if ``did`` is recorded in a local context.
``did``=None is supported and returns False.
A DID can be classified with classify_identifier(). | [
"Return",
"True",
"if",
"did",
"is",
"recorded",
"in",
"a",
"local",
"context",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/did.py#L231-L239 |
genialis/resolwe | resolwe/elastic/utils/__init__.py | prepare_connection | def prepare_connection():
"""Set dafault connection for ElasticSearch.
.. warning::
In case of using multiprocessing/multithreading, connection will
be probably initialized in the main process/thread and the same
connection (socket) will be used in all processes/threads. This
w... | python | def prepare_connection():
"""Set dafault connection for ElasticSearch.
.. warning::
In case of using multiprocessing/multithreading, connection will
be probably initialized in the main process/thread and the same
connection (socket) will be used in all processes/threads. This
w... | [
"def",
"prepare_connection",
"(",
")",
":",
"elasticsearch_host",
"=",
"getattr",
"(",
"settings",
",",
"'ELASTICSEARCH_HOST'",
",",
"'localhost'",
")",
"elasticsearch_port",
"=",
"getattr",
"(",
"settings",
",",
"'ELASTICSEARCH_PORT'",
",",
"9200",
")",
"connection... | Set dafault connection for ElasticSearch.
.. warning::
In case of using multiprocessing/multithreading, connection will
be probably initialized in the main process/thread and the same
connection (socket) will be used in all processes/threads. This
will cause some unexpected timeout... | [
"Set",
"dafault",
"connection",
"for",
"ElasticSearch",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/elastic/utils/__init__.py#L35-L49 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/event_log.py | _log | def _log(pid, request, event, timestamp=None):
"""Log an operation that was performed on a sciobj."""
# Support logging events that are not associated with an object.
sciobj_model = None
if pid is not None:
try:
sciobj_model = d1_gmn.app.models.ScienceObject.objects.filter(pid__did=p... | python | def _log(pid, request, event, timestamp=None):
"""Log an operation that was performed on a sciobj."""
# Support logging events that are not associated with an object.
sciobj_model = None
if pid is not None:
try:
sciobj_model = d1_gmn.app.models.ScienceObject.objects.filter(pid__did=p... | [
"def",
"_log",
"(",
"pid",
",",
"request",
",",
"event",
",",
"timestamp",
"=",
"None",
")",
":",
"# Support logging events that are not associated with an object.",
"sciobj_model",
"=",
"None",
"if",
"pid",
"is",
"not",
"None",
":",
"try",
":",
"sciobj_model",
... | Log an operation that was performed on a sciobj. | [
"Log",
"an",
"operation",
"that",
"was",
"performed",
"on",
"a",
"sciobj",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/event_log.py#L78-L109 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/event_log.py | _is_ignored_read_event | def _is_ignored_read_event(request):
"""Return True if this read event was generated by an automated process, as
indicated by the user configurable LOG_IGNORE* settings.
See settings_site.py for description and rationale for the settings.
"""
if (
django.conf.settings.LOG_IGNORE_TRUSTED_SU... | python | def _is_ignored_read_event(request):
"""Return True if this read event was generated by an automated process, as
indicated by the user configurable LOG_IGNORE* settings.
See settings_site.py for description and rationale for the settings.
"""
if (
django.conf.settings.LOG_IGNORE_TRUSTED_SU... | [
"def",
"_is_ignored_read_event",
"(",
"request",
")",
":",
"if",
"(",
"django",
".",
"conf",
".",
"settings",
".",
"LOG_IGNORE_TRUSTED_SUBJECT",
"and",
"d1_gmn",
".",
"app",
".",
"auth",
".",
"is_trusted_subject",
"(",
"request",
")",
")",
":",
"return",
"Tr... | Return True if this read event was generated by an automated process, as
indicated by the user configurable LOG_IGNORE* settings.
See settings_site.py for description and rationale for the settings. | [
"Return",
"True",
"if",
"this",
"read",
"event",
"was",
"generated",
"by",
"an",
"automated",
"process",
"as",
"indicated",
"by",
"the",
"user",
"configurable",
"LOG_IGNORE",
"*",
"settings",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/event_log.py#L112-L142 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/auth.py | action_to_level | def action_to_level(action):
"""Map action name to action level."""
try:
return ACTION_LEVEL_MAP[action]
except LookupError:
raise d1_common.types.exceptions.InvalidRequest(
0, 'Unknown action. action="{}"'.format(action)
) | python | def action_to_level(action):
"""Map action name to action level."""
try:
return ACTION_LEVEL_MAP[action]
except LookupError:
raise d1_common.types.exceptions.InvalidRequest(
0, 'Unknown action. action="{}"'.format(action)
) | [
"def",
"action_to_level",
"(",
"action",
")",
":",
"try",
":",
"return",
"ACTION_LEVEL_MAP",
"[",
"action",
"]",
"except",
"LookupError",
":",
"raise",
"d1_common",
".",
"types",
".",
"exceptions",
".",
"InvalidRequest",
"(",
"0",
",",
"'Unknown action. action=\... | Map action name to action level. | [
"Map",
"action",
"name",
"to",
"action",
"level",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/auth.py#L65-L72 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/auth.py | level_to_action | def level_to_action(level):
"""Map action level to action name."""
try:
return LEVEL_ACTION_MAP[level]
except LookupError:
raise d1_common.types.exceptions.InvalidRequest(
0, 'Unknown action level. level="{}"'.format(level)
) | python | def level_to_action(level):
"""Map action level to action name."""
try:
return LEVEL_ACTION_MAP[level]
except LookupError:
raise d1_common.types.exceptions.InvalidRequest(
0, 'Unknown action level. level="{}"'.format(level)
) | [
"def",
"level_to_action",
"(",
"level",
")",
":",
"try",
":",
"return",
"LEVEL_ACTION_MAP",
"[",
"level",
"]",
"except",
"LookupError",
":",
"raise",
"d1_common",
".",
"types",
".",
"exceptions",
".",
"InvalidRequest",
"(",
"0",
",",
"'Unknown action level. leve... | Map action level to action name. | [
"Map",
"action",
"level",
"to",
"action",
"name",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/auth.py#L75-L82 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/auth.py | get_trusted_subjects | def get_trusted_subjects():
"""Get set of subjects that have unlimited access to all SciObj and APIs on this
node."""
cert_subj = _get_client_side_certificate_subject()
return (
d1_gmn.app.node_registry.get_cn_subjects()
| django.conf.settings.DATAONE_TRUSTED_SUBJECTS
| {cert_sub... | python | def get_trusted_subjects():
"""Get set of subjects that have unlimited access to all SciObj and APIs on this
node."""
cert_subj = _get_client_side_certificate_subject()
return (
d1_gmn.app.node_registry.get_cn_subjects()
| django.conf.settings.DATAONE_TRUSTED_SUBJECTS
| {cert_sub... | [
"def",
"get_trusted_subjects",
"(",
")",
":",
"cert_subj",
"=",
"_get_client_side_certificate_subject",
"(",
")",
"return",
"(",
"d1_gmn",
".",
"app",
".",
"node_registry",
".",
"get_cn_subjects",
"(",
")",
"|",
"django",
".",
"conf",
".",
"settings",
".",
"DA... | Get set of subjects that have unlimited access to all SciObj and APIs on this
node. | [
"Get",
"set",
"of",
"subjects",
"that",
"have",
"unlimited",
"access",
"to",
"all",
"SciObj",
"and",
"APIs",
"on",
"this",
"node",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/auth.py#L85-L95 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/auth.py | is_trusted_subject | def is_trusted_subject(request):
"""Determine if calling subject is fully trusted."""
logging.debug('Active subjects: {}'.format(', '.join(request.all_subjects_set)))
logging.debug('Trusted subjects: {}'.format(', '.join(get_trusted_subjects())))
return not request.all_subjects_set.isdisjoint(get_truste... | python | def is_trusted_subject(request):
"""Determine if calling subject is fully trusted."""
logging.debug('Active subjects: {}'.format(', '.join(request.all_subjects_set)))
logging.debug('Trusted subjects: {}'.format(', '.join(get_trusted_subjects())))
return not request.all_subjects_set.isdisjoint(get_truste... | [
"def",
"is_trusted_subject",
"(",
"request",
")",
":",
"logging",
".",
"debug",
"(",
"'Active subjects: {}'",
".",
"format",
"(",
"', '",
".",
"join",
"(",
"request",
".",
"all_subjects_set",
")",
")",
")",
"logging",
".",
"debug",
"(",
"'Trusted subjects: {}'... | Determine if calling subject is fully trusted. | [
"Determine",
"if",
"calling",
"subject",
"is",
"fully",
"trusted",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/auth.py#L109-L113 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/auth.py | _get_client_side_certificate_subject | def _get_client_side_certificate_subject():
"""Return the DN from the client side certificate as a D1 subject if a client side
cert has been configured.
Else return None.
"""
subject = django.core.cache.cache.get('client_side_certificate_subject')
if subject is not None:
return subject... | python | def _get_client_side_certificate_subject():
"""Return the DN from the client side certificate as a D1 subject if a client side
cert has been configured.
Else return None.
"""
subject = django.core.cache.cache.get('client_side_certificate_subject')
if subject is not None:
return subject... | [
"def",
"_get_client_side_certificate_subject",
"(",
")",
":",
"subject",
"=",
"django",
".",
"core",
".",
"cache",
".",
"cache",
".",
"get",
"(",
"'client_side_certificate_subject'",
")",
"if",
"subject",
"is",
"not",
"None",
":",
"return",
"subject",
"cert_pem"... | Return the DN from the client side certificate as a D1 subject if a client side
cert has been configured.
Else return None. | [
"Return",
"the",
"DN",
"from",
"the",
"client",
"side",
"certificate",
"as",
"a",
"D1",
"subject",
"if",
"a",
"client",
"side",
"cert",
"has",
"been",
"configured",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/auth.py#L122-L137 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/auth.py | is_allowed | def is_allowed(request, level, pid):
"""Check if one or more subjects are allowed to perform action level on object.
If a subject holds permissions for one action level on object, all lower action
levels are also allowed. Any included subject that is unknown to this MN is treated
as a subject without p... | python | def is_allowed(request, level, pid):
"""Check if one or more subjects are allowed to perform action level on object.
If a subject holds permissions for one action level on object, all lower action
levels are also allowed. Any included subject that is unknown to this MN is treated
as a subject without p... | [
"def",
"is_allowed",
"(",
"request",
",",
"level",
",",
"pid",
")",
":",
"if",
"is_trusted_subject",
"(",
"request",
")",
":",
"return",
"True",
"return",
"d1_gmn",
".",
"app",
".",
"models",
".",
"Permission",
".",
"objects",
".",
"filter",
"(",
"sciobj... | Check if one or more subjects are allowed to perform action level on object.
If a subject holds permissions for one action level on object, all lower action
levels are also allowed. Any included subject that is unknown to this MN is treated
as a subject without permissions.
Returns:
bool
... | [
"Check",
"if",
"one",
"or",
"more",
"subjects",
"are",
"allowed",
"to",
"perform",
"action",
"level",
"on",
"object",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/auth.py#L164-L195 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/auth.py | assert_create_update_delete_permission | def assert_create_update_delete_permission(request):
"""Access only by subjects with Create/Update/Delete permission and by trusted
infrastructure (CNs)."""
if not has_create_update_delete_permission(request):
raise d1_common.types.exceptions.NotAuthorized(
0,
'Access allowed... | python | def assert_create_update_delete_permission(request):
"""Access only by subjects with Create/Update/Delete permission and by trusted
infrastructure (CNs)."""
if not has_create_update_delete_permission(request):
raise d1_common.types.exceptions.NotAuthorized(
0,
'Access allowed... | [
"def",
"assert_create_update_delete_permission",
"(",
"request",
")",
":",
"if",
"not",
"has_create_update_delete_permission",
"(",
"request",
")",
":",
"raise",
"d1_common",
".",
"types",
".",
"exceptions",
".",
"NotAuthorized",
"(",
"0",
",",
"'Access allowed only f... | Access only by subjects with Create/Update/Delete permission and by trusted
infrastructure (CNs). | [
"Access",
"only",
"by",
"subjects",
"with",
"Create",
"/",
"Update",
"/",
"Delete",
"permission",
"and",
"by",
"trusted",
"infrastructure",
"(",
"CNs",
")",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/auth.py#L214-L222 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/auth.py | assert_allowed | def assert_allowed(request, level, pid):
"""Assert that one or more subjects are allowed to perform action on object.
Raise NotAuthorized if object exists and subject is not allowed. Raise NotFound if
object does not exist.
"""
if not d1_gmn.app.models.ScienceObject.objects.filter(pid__did=pid).ex... | python | def assert_allowed(request, level, pid):
"""Assert that one or more subjects are allowed to perform action on object.
Raise NotAuthorized if object exists and subject is not allowed. Raise NotFound if
object does not exist.
"""
if not d1_gmn.app.models.ScienceObject.objects.filter(pid__did=pid).ex... | [
"def",
"assert_allowed",
"(",
"request",
",",
"level",
",",
"pid",
")",
":",
"if",
"not",
"d1_gmn",
".",
"app",
".",
"models",
".",
"ScienceObject",
".",
"objects",
".",
"filter",
"(",
"pid__did",
"=",
"pid",
")",
".",
"exists",
"(",
")",
":",
"raise... | Assert that one or more subjects are allowed to perform action on object.
Raise NotAuthorized if object exists and subject is not allowed. Raise NotFound if
object does not exist. | [
"Assert",
"that",
"one",
"or",
"more",
"subjects",
"are",
"allowed",
"to",
"perform",
"action",
"on",
"object",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/auth.py#L225-L245 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/auth.py | format_active_subjects | def format_active_subjects(request):
"""Create a string listing active subjects for this connection, suitable for
appending to authentication error messages."""
decorated_subject_list = [request.primary_subject_str + ' (primary)']
for subject in request.all_subjects_set:
if subject != request.pr... | python | def format_active_subjects(request):
"""Create a string listing active subjects for this connection, suitable for
appending to authentication error messages."""
decorated_subject_list = [request.primary_subject_str + ' (primary)']
for subject in request.all_subjects_set:
if subject != request.pr... | [
"def",
"format_active_subjects",
"(",
"request",
")",
":",
"decorated_subject_list",
"=",
"[",
"request",
".",
"primary_subject_str",
"+",
"' (primary)'",
"]",
"for",
"subject",
"in",
"request",
".",
"all_subjects_set",
":",
"if",
"subject",
"!=",
"request",
".",
... | Create a string listing active subjects for this connection, suitable for
appending to authentication error messages. | [
"Create",
"a",
"string",
"listing",
"active",
"subjects",
"for",
"this",
"connection",
"suitable",
"for",
"appending",
"to",
"authentication",
"error",
"messages",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/auth.py#L248-L255 |
DataONEorg/d1_python | dev_tools/src/d1_dev/src-remove-unused-imports.py | main | def main():
"""Remove unused imports Unsafe!
Only tested on our codebase, which uses simple absolute imports on the form, "import
a.b.c".
"""
parser = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter
)
parser.add_argument("path", na... | python | def main():
"""Remove unused imports Unsafe!
Only tested on our codebase, which uses simple absolute imports on the form, "import
a.b.c".
"""
parser = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter
)
parser.add_argument("path", na... | [
"def",
"main",
"(",
")",
":",
"parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
"description",
"=",
"__doc__",
",",
"formatter_class",
"=",
"argparse",
".",
"RawDescriptionHelpFormatter",
")",
"parser",
".",
"add_argument",
"(",
"\"path\"",
",",
"nargs",
... | Remove unused imports Unsafe!
Only tested on our codebase, which uses simple absolute imports on the form, "import
a.b.c". | [
"Remove",
"unused",
"imports",
"Unsafe!"
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/dev_tools/src/d1_dev/src-remove-unused-imports.py#L37-L85 |
DataONEorg/d1_python | dev_tools/src/d1_dev/src-remove-unused-imports.py | comment_import | def comment_import(r, unused_dot_list):
"""Comment out import for {dot_str}."""
unused_dot_str = ".".join(unused_dot_list)
for n in r("ImportNode"):
if n.names()[0] == unused_dot_str:
# The "!" is inserted so that this line doesn't show up when searching for
# the comment pat... | python | def comment_import(r, unused_dot_list):
"""Comment out import for {dot_str}."""
unused_dot_str = ".".join(unused_dot_list)
for n in r("ImportNode"):
if n.names()[0] == unused_dot_str:
# The "!" is inserted so that this line doesn't show up when searching for
# the comment pat... | [
"def",
"comment_import",
"(",
"r",
",",
"unused_dot_list",
")",
":",
"unused_dot_str",
"=",
"\".\"",
".",
"join",
"(",
"unused_dot_list",
")",
"for",
"n",
"in",
"r",
"(",
"\"ImportNode\"",
")",
":",
"if",
"n",
".",
"names",
"(",
")",
"[",
"0",
"]",
"... | Comment out import for {dot_str}. | [
"Comment",
"out",
"import",
"for",
"{",
"dot_str",
"}",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/dev_tools/src/d1_dev/src-remove-unused-imports.py#L147-L155 |
DataONEorg/d1_python | dev_tools/src/d1_dev/src-remove-unused-imports.py | get_atomtrailer_list | def get_atomtrailer_list(r):
"""Capture only the leading dotted name list.
A full sequence typically includes function calls and parameters.
pkga.pkgb.pkgc.one_call(arg1, arg2, arg3=4)
"""
dot_set = set()
for n in r.find_all(("atomtrailers",)):
name_list = []
for x in n.value:
... | python | def get_atomtrailer_list(r):
"""Capture only the leading dotted name list.
A full sequence typically includes function calls and parameters.
pkga.pkgb.pkgc.one_call(arg1, arg2, arg3=4)
"""
dot_set = set()
for n in r.find_all(("atomtrailers",)):
name_list = []
for x in n.value:
... | [
"def",
"get_atomtrailer_list",
"(",
"r",
")",
":",
"dot_set",
"=",
"set",
"(",
")",
"for",
"n",
"in",
"r",
".",
"find_all",
"(",
"(",
"\"atomtrailers\"",
",",
")",
")",
":",
"name_list",
"=",
"[",
"]",
"for",
"x",
"in",
"n",
".",
"value",
":",
"i... | Capture only the leading dotted name list.
A full sequence typically includes function calls and parameters.
pkga.pkgb.pkgc.one_call(arg1, arg2, arg3=4) | [
"Capture",
"only",
"the",
"leading",
"dotted",
"name",
"list",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/dev_tools/src/d1_dev/src-remove-unused-imports.py#L182-L198 |
genialis/resolwe | resolwe/flow/views/collection.py | CollectionViewSet.custom_filter_tags | def custom_filter_tags(self, value, search):
"""Support tags query."""
if not isinstance(value, list):
value = value.split(',')
filters = [Q('match', **{'tags': item}) for item in value]
search = search.query('bool', must=filters)
return search | python | def custom_filter_tags(self, value, search):
"""Support tags query."""
if not isinstance(value, list):
value = value.split(',')
filters = [Q('match', **{'tags': item}) for item in value]
search = search.query('bool', must=filters)
return search | [
"def",
"custom_filter_tags",
"(",
"self",
",",
"value",
",",
"search",
")",
":",
"if",
"not",
"isinstance",
"(",
"value",
",",
"list",
")",
":",
"value",
"=",
"value",
".",
"split",
"(",
"','",
")",
"filters",
"=",
"[",
"Q",
"(",
"'match'",
",",
"*... | Support tags query. | [
"Support",
"tags",
"query",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/views/collection.py#L68-L76 |
genialis/resolwe | resolwe/flow/views/collection.py | CollectionViewSet.custom_filter_text | def custom_filter_text(self, value, search):
"""Support general query using the 'text' attribute."""
if isinstance(value, list):
value = ' '.join(value)
should = [
Q('match', slug={'query': value, 'operator': 'and', 'boost': 10.0}),
Q('match', **{'slug.ngrams... | python | def custom_filter_text(self, value, search):
"""Support general query using the 'text' attribute."""
if isinstance(value, list):
value = ' '.join(value)
should = [
Q('match', slug={'query': value, 'operator': 'and', 'boost': 10.0}),
Q('match', **{'slug.ngrams... | [
"def",
"custom_filter_text",
"(",
"self",
",",
"value",
",",
"search",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"list",
")",
":",
"value",
"=",
"' '",
".",
"join",
"(",
"value",
")",
"should",
"=",
"[",
"Q",
"(",
"'match'",
",",
"slug",
"="... | Support general query using the 'text' attribute. | [
"Support",
"general",
"query",
"using",
"the",
"text",
"attribute",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/views/collection.py#L85-L109 |
genialis/resolwe | resolwe/flow/views/collection.py | CollectionViewSet.set_content_permissions | def set_content_permissions(self, user, obj, payload):
"""Apply permissions to data objects and entities in ``Collection``."""
for entity in obj.entity_set.all():
if user.has_perm('share_entity', entity):
update_permission(entity, payload)
# Data doesn't have "ADD" p... | python | def set_content_permissions(self, user, obj, payload):
"""Apply permissions to data objects and entities in ``Collection``."""
for entity in obj.entity_set.all():
if user.has_perm('share_entity', entity):
update_permission(entity, payload)
# Data doesn't have "ADD" p... | [
"def",
"set_content_permissions",
"(",
"self",
",",
"user",
",",
"obj",
",",
"payload",
")",
":",
"for",
"entity",
"in",
"obj",
".",
"entity_set",
".",
"all",
"(",
")",
":",
"if",
"user",
".",
"has_perm",
"(",
"'share_entity'",
",",
"entity",
")",
":",... | Apply permissions to data objects and entities in ``Collection``. | [
"Apply",
"permissions",
"to",
"data",
"objects",
"and",
"entities",
"in",
"Collection",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/views/collection.py#L111-L122 |
genialis/resolwe | resolwe/flow/views/collection.py | CollectionViewSet.create | def create(self, request, *args, **kwargs):
"""Only authenticated usesr can create new collections."""
if not request.user.is_authenticated:
raise exceptions.NotFound
return super().create(request, *args, **kwargs) | python | def create(self, request, *args, **kwargs):
"""Only authenticated usesr can create new collections."""
if not request.user.is_authenticated:
raise exceptions.NotFound
return super().create(request, *args, **kwargs) | [
"def",
"create",
"(",
"self",
",",
"request",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"request",
".",
"user",
".",
"is_authenticated",
":",
"raise",
"exceptions",
".",
"NotFound",
"return",
"super",
"(",
")",
".",
"create",
... | Only authenticated usesr can create new collections. | [
"Only",
"authenticated",
"usesr",
"can",
"create",
"new",
"collections",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/views/collection.py#L124-L129 |
genialis/resolwe | resolwe/flow/views/collection.py | CollectionViewSet.destroy | def destroy(self, request, *args, **kwargs):
"""Destroy a model instance.
If ``delete_content`` flag is set in query parameters, also all
Data objects and Entities, on which user has ``EDIT``
permission, contained in collection will be deleted.
"""
obj = self.get_object(... | python | def destroy(self, request, *args, **kwargs):
"""Destroy a model instance.
If ``delete_content`` flag is set in query parameters, also all
Data objects and Entities, on which user has ``EDIT``
permission, contained in collection will be deleted.
"""
obj = self.get_object(... | [
"def",
"destroy",
"(",
"self",
",",
"request",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"obj",
"=",
"self",
".",
"get_object",
"(",
")",
"user",
"=",
"request",
".",
"user",
"if",
"strtobool",
"(",
"request",
".",
"query_params",
".",
"... | Destroy a model instance.
If ``delete_content`` flag is set in query parameters, also all
Data objects and Entities, on which user has ``EDIT``
permission, contained in collection will be deleted. | [
"Destroy",
"a",
"model",
"instance",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/views/collection.py#L131-L150 |
genialis/resolwe | resolwe/flow/views/collection.py | CollectionViewSet.add_data | def add_data(self, request, pk=None):
"""Add data to collection."""
collection = self.get_object()
if 'ids' not in request.data:
return Response({"error": "`ids`parameter is required"}, status=status.HTTP_400_BAD_REQUEST)
missing = []
for data_id in request.data['id... | python | def add_data(self, request, pk=None):
"""Add data to collection."""
collection = self.get_object()
if 'ids' not in request.data:
return Response({"error": "`ids`parameter is required"}, status=status.HTTP_400_BAD_REQUEST)
missing = []
for data_id in request.data['id... | [
"def",
"add_data",
"(",
"self",
",",
"request",
",",
"pk",
"=",
"None",
")",
":",
"collection",
"=",
"self",
".",
"get_object",
"(",
")",
"if",
"'ids'",
"not",
"in",
"request",
".",
"data",
":",
"return",
"Response",
"(",
"{",
"\"error\"",
":",
"\"`i... | Add data to collection. | [
"Add",
"data",
"to",
"collection",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/views/collection.py#L153-L173 |
genialis/resolwe | resolwe/flow/views/collection.py | CollectionViewSet.remove_data | def remove_data(self, request, pk=None):
"""Remove data from collection."""
collection = self.get_object()
if 'ids' not in request.data:
return Response({"error": "`ids`parameter is required"}, status=status.HTTP_400_BAD_REQUEST)
for data_id in request.data['ids']:
... | python | def remove_data(self, request, pk=None):
"""Remove data from collection."""
collection = self.get_object()
if 'ids' not in request.data:
return Response({"error": "`ids`parameter is required"}, status=status.HTTP_400_BAD_REQUEST)
for data_id in request.data['ids']:
... | [
"def",
"remove_data",
"(",
"self",
",",
"request",
",",
"pk",
"=",
"None",
")",
":",
"collection",
"=",
"self",
".",
"get_object",
"(",
")",
"if",
"'ids'",
"not",
"in",
"request",
".",
"data",
":",
"return",
"Response",
"(",
"{",
"\"error\"",
":",
"\... | Remove data from collection. | [
"Remove",
"data",
"from",
"collection",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/views/collection.py#L176-L186 |
genialis/resolwe | resolwe/flow/views/collection.py | CollectionViewSet.duplicate | def duplicate(self, request, *args, **kwargs):
"""Duplicate (make copy of) ``Collection`` models."""
if not request.user.is_authenticated:
raise exceptions.NotFound
ids = self.get_ids(request.data)
queryset = get_objects_for_user(request.user, 'view_collection', Collection.o... | python | def duplicate(self, request, *args, **kwargs):
"""Duplicate (make copy of) ``Collection`` models."""
if not request.user.is_authenticated:
raise exceptions.NotFound
ids = self.get_ids(request.data)
queryset = get_objects_for_user(request.user, 'view_collection', Collection.o... | [
"def",
"duplicate",
"(",
"self",
",",
"request",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"request",
".",
"user",
".",
"is_authenticated",
":",
"raise",
"exceptions",
".",
"NotFound",
"ids",
"=",
"self",
".",
"get_ids",
"(",
... | Duplicate (make copy of) ``Collection`` models. | [
"Duplicate",
"(",
"make",
"copy",
"of",
")",
"Collection",
"models",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/flow/views/collection.py#L189-L206 |
DataONEorg/d1_python | gmn/src/d1_gmn/app/management/commands/audit-sync.py | Command.is_object_synced_to_cn | async def is_object_synced_to_cn(self, client, pid):
"""Check if object with {pid} has successfully synced to the CN.
CNRead.describe() is used as it's a light-weight HTTP HEAD request.
This assumes that the call is being made over a connection that has been
authenticated and has read ... | python | async def is_object_synced_to_cn(self, client, pid):
"""Check if object with {pid} has successfully synced to the CN.
CNRead.describe() is used as it's a light-weight HTTP HEAD request.
This assumes that the call is being made over a connection that has been
authenticated and has read ... | [
"async",
"def",
"is_object_synced_to_cn",
"(",
"self",
",",
"client",
",",
"pid",
")",
":",
"try",
":",
"await",
"client",
".",
"describe",
"(",
"pid",
")",
"except",
"d1_common",
".",
"types",
".",
"exceptions",
".",
"DataONEException",
":",
"return",
"Fa... | Check if object with {pid} has successfully synced to the CN.
CNRead.describe() is used as it's a light-weight HTTP HEAD request.
This assumes that the call is being made over a connection that has been
authenticated and has read or better access on the given object if it exists. | [
"Check",
"if",
"object",
"with",
"{",
"pid",
"}",
"has",
"successfully",
"synced",
"to",
"the",
"CN",
"."
] | train | https://github.com/DataONEorg/d1_python/blob/3ac4d4f3ca052d3e8641a6a329cab526c8ddcb0d/gmn/src/d1_gmn/app/management/commands/audit-sync.py#L125-L138 |
genialis/resolwe | resolwe/elastic/lookup.py | Lookup.apply | def apply(self, search, field, value):
"""Apply lookup expression to search query."""
return search.query(
self.query_type( # pylint: disable=not-callable
**{
field: {
self.operator: self.get_value_query(value)
... | python | def apply(self, search, field, value):
"""Apply lookup expression to search query."""
return search.query(
self.query_type( # pylint: disable=not-callable
**{
field: {
self.operator: self.get_value_query(value)
... | [
"def",
"apply",
"(",
"self",
",",
"search",
",",
"field",
",",
"value",
")",
":",
"return",
"search",
".",
"query",
"(",
"self",
".",
"query_type",
"(",
"# pylint: disable=not-callable",
"*",
"*",
"{",
"field",
":",
"{",
"self",
".",
"operator",
":",
"... | Apply lookup expression to search query. | [
"Apply",
"lookup",
"expression",
"to",
"search",
"query",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/elastic/lookup.py#L34-L44 |
genialis/resolwe | resolwe/elastic/lookup.py | In.apply | def apply(self, search, field, value):
"""Apply lookup expression to search query."""
if not isinstance(value, list):
value = [x for x in value.strip().split(',') if x]
filters = [Q('match', **{field: item}) for item in value]
return search.query('bool', should=filters) | python | def apply(self, search, field, value):
"""Apply lookup expression to search query."""
if not isinstance(value, list):
value = [x for x in value.strip().split(',') if x]
filters = [Q('match', **{field: item}) for item in value]
return search.query('bool', should=filters) | [
"def",
"apply",
"(",
"self",
",",
"search",
",",
"field",
",",
"value",
")",
":",
"if",
"not",
"isinstance",
"(",
"value",
",",
"list",
")",
":",
"value",
"=",
"[",
"x",
"for",
"x",
"in",
"value",
".",
"strip",
"(",
")",
".",
"split",
"(",
"','... | Apply lookup expression to search query. | [
"Apply",
"lookup",
"expression",
"to",
"search",
"query",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/elastic/lookup.py#L84-L90 |
genialis/resolwe | resolwe/elastic/lookup.py | Exact.apply | def apply(self, search, field, value):
"""Apply lookup expression to search query."""
# We assume that the field in question has a "raw" counterpart.
return search.query('match', **{'{}.raw'.format(field): value}) | python | def apply(self, search, field, value):
"""Apply lookup expression to search query."""
# We assume that the field in question has a "raw" counterpart.
return search.query('match', **{'{}.raw'.format(field): value}) | [
"def",
"apply",
"(",
"self",
",",
"search",
",",
"field",
",",
"value",
")",
":",
"# We assume that the field in question has a \"raw\" counterpart.",
"return",
"search",
".",
"query",
"(",
"'match'",
",",
"*",
"*",
"{",
"'{}.raw'",
".",
"format",
"(",
"field",
... | Apply lookup expression to search query. | [
"Apply",
"lookup",
"expression",
"to",
"search",
"query",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/elastic/lookup.py#L98-L101 |
genialis/resolwe | resolwe/elastic/lookup.py | QueryBuilder.register_lookup | def register_lookup(self, lookup):
"""Register lookup."""
if lookup.operator in self._lookups:
raise KeyError("Lookup for operator '{}' is already registered".format(lookup.operator))
self._lookups[lookup.operator] = lookup() | python | def register_lookup(self, lookup):
"""Register lookup."""
if lookup.operator in self._lookups:
raise KeyError("Lookup for operator '{}' is already registered".format(lookup.operator))
self._lookups[lookup.operator] = lookup() | [
"def",
"register_lookup",
"(",
"self",
",",
"lookup",
")",
":",
"if",
"lookup",
".",
"operator",
"in",
"self",
".",
"_lookups",
":",
"raise",
"KeyError",
"(",
"\"Lookup for operator '{}' is already registered\"",
".",
"format",
"(",
"lookup",
".",
"operator",
")... | Register lookup. | [
"Register",
"lookup",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/elastic/lookup.py#L127-L132 |
genialis/resolwe | resolwe/elastic/lookup.py | QueryBuilder.get_lookup | def get_lookup(self, operator):
"""Look up a lookup.
:param operator: Name of the lookup operator
"""
try:
return self._lookups[operator]
except KeyError:
raise NotImplementedError("Lookup operator '{}' is not supported".format(operator)) | python | def get_lookup(self, operator):
"""Look up a lookup.
:param operator: Name of the lookup operator
"""
try:
return self._lookups[operator]
except KeyError:
raise NotImplementedError("Lookup operator '{}' is not supported".format(operator)) | [
"def",
"get_lookup",
"(",
"self",
",",
"operator",
")",
":",
"try",
":",
"return",
"self",
".",
"_lookups",
"[",
"operator",
"]",
"except",
"KeyError",
":",
"raise",
"NotImplementedError",
"(",
"\"Lookup operator '{}' is not supported\"",
".",
"format",
"(",
"op... | Look up a lookup.
:param operator: Name of the lookup operator | [
"Look",
"up",
"a",
"lookup",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/elastic/lookup.py#L134-L142 |
genialis/resolwe | resolwe/elastic/lookup.py | QueryBuilder.build | def build(self, search, raw_query):
"""Build query.
:param search: Search query instance
:param raw_query: Raw query arguments dictionary
"""
unmatched_items = {}
for expression, value in raw_query.items():
# Parse query expression into tokens.
to... | python | def build(self, search, raw_query):
"""Build query.
:param search: Search query instance
:param raw_query: Raw query arguments dictionary
"""
unmatched_items = {}
for expression, value in raw_query.items():
# Parse query expression into tokens.
to... | [
"def",
"build",
"(",
"self",
",",
"search",
",",
"raw_query",
")",
":",
"unmatched_items",
"=",
"{",
"}",
"for",
"expression",
",",
"value",
"in",
"raw_query",
".",
"items",
"(",
")",
":",
"# Parse query expression into tokens.",
"tokens",
"=",
"expression",
... | Build query.
:param search: Search query instance
:param raw_query: Raw query arguments dictionary | [
"Build",
"query",
"."
] | train | https://github.com/genialis/resolwe/blob/f7bb54932c81ec0cfc5b5e80d238fceaeaa48d86/resolwe/elastic/lookup.py#L144-L185 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.