Search is not available for this dataset
identifier stringlengths 1 155 | parameters stringlengths 2 6.09k | docstring stringlengths 11 63.4k | docstring_summary stringlengths 0 63.4k | function stringlengths 29 99.8k | function_tokens list | start_point list | end_point list | language stringclasses 1
value | docstring_language stringlengths 2 7 | docstring_language_predictions stringlengths 18 23 | is_langid_reliable stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|---|---|---|
XCObject.Copy | (self) | Make a copy of this object.
The new object will have its own copy of lists and dicts. Any XCObject
objects owned by this object (marked "strong") will be copied in the
new object, even those found in lists. If this object has any weak
references to other XCObjects, the same references are added to th... | Make a copy of this object. | def Copy(self):
"""Make a copy of this object.
The new object will have its own copy of lists and dicts. Any XCObject
objects owned by this object (marked "strong") will be copied in the
new object, even those found in lists. If this object has any weak
references to other XCObjects, the same ref... | [
"def",
"Copy",
"(",
"self",
")",
":",
"that",
"=",
"self",
".",
"__class__",
"(",
"id",
"=",
"self",
".",
"id",
",",
"parent",
"=",
"self",
".",
"parent",
")",
"for",
"key",
",",
"value",
"in",
"self",
".",
"_properties",
".",
"iteritems",
"(",
"... | [
305,
2
] | [
351,
15
] | python | en | ['en', 'en', 'en'] | True |
XCObject.Name | (self) | Return the name corresponding to an object.
Not all objects necessarily need to be nameable, and not all that do have
a "name" property. Override as needed.
| Return the name corresponding to an object. | def Name(self):
"""Return the name corresponding to an object.
Not all objects necessarily need to be nameable, and not all that do have
a "name" property. Override as needed.
"""
# If the schema indicates that "name" is required, try to access the
# property even if it doesn't exist. This w... | [
"def",
"Name",
"(",
"self",
")",
":",
"# If the schema indicates that \"name\" is required, try to access the",
"# property even if it doesn't exist. This will result in a KeyError",
"# being raised for the property that should be present, which seems more",
"# appropriate than NotImplementedErro... | [
353,
2
] | [
368,
79
] | python | en | ['en', 'en', 'en'] | True |
XCObject.Comment | (self) | Return a comment string for the object.
Most objects just use their name as the comment, but PBXProject uses
different values.
The returned comment is not escaped and does not have any comment marker
strings applied to it.
| Return a comment string for the object. | def Comment(self):
"""Return a comment string for the object.
Most objects just use their name as the comment, but PBXProject uses
different values.
The returned comment is not escaped and does not have any comment marker
strings applied to it.
"""
return self.Name() | [
"def",
"Comment",
"(",
"self",
")",
":",
"return",
"self",
".",
"Name",
"(",
")"
] | [
370,
2
] | [
380,
22
] | python | en | ['en', 'en', 'en'] | True |
XCObject.ComputeIDs | (self, recursive=True, overwrite=True, seed_hash=None) | Set "id" properties deterministically.
An object's "id" property is set based on a hash of its class type and
name, as well as the class type and name of all ancestor objects. As
such, it is only advisable to call ComputeIDs once an entire project file
tree is built.
If recursive is True, recurse... | Set "id" properties deterministically. | def ComputeIDs(self, recursive=True, overwrite=True, seed_hash=None):
"""Set "id" properties deterministically.
An object's "id" property is set based on a hash of its class type and
name, as well as the class type and name of all ancestor objects. As
such, it is only advisable to call ComputeIDs once... | [
"def",
"ComputeIDs",
"(",
"self",
",",
"recursive",
"=",
"True",
",",
"overwrite",
"=",
"True",
",",
"seed_hash",
"=",
"None",
")",
":",
"def",
"_HashUpdate",
"(",
"hash",
",",
"data",
")",
":",
"\"\"\"Update hash with data's length and contents.\n\n If the h... | [
396,
2
] | [
456,
47
] | python | en | ['es', 'en', 'en'] | True |
XCObject.EnsureNoIDCollisions | (self) | Verifies that no two objects have the same ID. Checks all descendants.
| Verifies that no two objects have the same ID. Checks all descendants.
| def EnsureNoIDCollisions(self):
"""Verifies that no two objects have the same ID. Checks all descendants.
"""
ids = {}
descendants = self.Descendants()
for descendant in descendants:
if descendant.id in ids:
other = ids[descendant.id]
raise KeyError(
'Duplicate ... | [
"def",
"EnsureNoIDCollisions",
"(",
"self",
")",
":",
"ids",
"=",
"{",
"}",
"descendants",
"=",
"self",
".",
"Descendants",
"(",
")",
"for",
"descendant",
"in",
"descendants",
":",
"if",
"descendant",
".",
"id",
"in",
"ids",
":",
"other",
"=",
"ids",
"... | [
458,
2
] | [
471,
37
] | python | en | ['en', 'en', 'en'] | True |
XCObject.Children | (self) | Returns a list of all of this object's owned (strong) children. | Returns a list of all of this object's owned (strong) children. | def Children(self):
"""Returns a list of all of this object's owned (strong) children."""
children = []
for property, attributes in self._schema.iteritems():
(is_list, property_type, is_strong) = attributes[0:3]
if is_strong and property in self._properties:
if not is_list:
ch... | [
"def",
"Children",
"(",
"self",
")",
":",
"children",
"=",
"[",
"]",
"for",
"property",
",",
"attributes",
"in",
"self",
".",
"_schema",
".",
"iteritems",
"(",
")",
":",
"(",
"is_list",
",",
"property_type",
",",
"is_strong",
")",
"=",
"attributes",
"[... | [
473,
2
] | [
484,
19
] | python | en | ['en', 'en', 'en'] | True |
XCObject.Descendants | (self) | Returns a list of all of this object's descendants, including this
object.
| Returns a list of all of this object's descendants, including this
object.
| def Descendants(self):
"""Returns a list of all of this object's descendants, including this
object.
"""
children = self.Children()
descendants = [self]
for child in children:
descendants.extend(child.Descendants())
return descendants | [
"def",
"Descendants",
"(",
"self",
")",
":",
"children",
"=",
"self",
".",
"Children",
"(",
")",
"descendants",
"=",
"[",
"self",
"]",
"for",
"child",
"in",
"children",
":",
"descendants",
".",
"extend",
"(",
"child",
".",
"Descendants",
"(",
")",
")",... | [
486,
2
] | [
495,
22
] | python | en | ['en', 'en', 'en'] | True |
XCObject._EncodeComment | (self, comment) | Encodes a comment to be placed in the project file output, mimicing
Xcode behavior.
| Encodes a comment to be placed in the project file output, mimicing
Xcode behavior.
| def _EncodeComment(self, comment):
"""Encodes a comment to be placed in the project file output, mimicing
Xcode behavior.
"""
# This mimics Xcode behavior by wrapping the comment in "/*" and "*/". If
# the string already contains a "*/", it is turned into "(*)/". This keeps
# the file writer ... | [
"def",
"_EncodeComment",
"(",
"self",
",",
"comment",
")",
":",
"# This mimics Xcode behavior by wrapping the comment in \"/*\" and \"*/\". If",
"# the string already contains a \"*/\", it is turned into \"(*)/\". This keeps",
"# the file writer from outputting something that would be treated ... | [
503,
2
] | [
514,
56
] | python | en | ['en', 'en', 'en'] | True |
XCObject._EncodeString | (self, value) | Encodes a string to be placed in the project file output, mimicing
Xcode behavior.
| Encodes a string to be placed in the project file output, mimicing
Xcode behavior.
| def _EncodeString(self, value):
"""Encodes a string to be placed in the project file output, mimicing
Xcode behavior.
"""
# Use quotation marks when any character outside of the range A-Z, a-z, 0-9,
# $ (dollar sign), . (period), and _ (underscore) is present. Also use
# quotation marks to rep... | [
"def",
"_EncodeString",
"(",
"self",
",",
"value",
")",
":",
"# Use quotation marks when any character outside of the range A-Z, a-z, 0-9,",
"# $ (dollar sign), . (period), and _ (underscore) is present. Also use",
"# quotation marks to represent empty strings.",
"#",
"# Escape \" (double-q... | [
531,
2
] | [
568,
65
] | python | en | ['en', 'en', 'en'] | True |
XCObject._XCPrintableValue | (self, tabs, value, flatten_list=False) | Returns a representation of value that may be printed in a project file,
mimicing Xcode's behavior.
_XCPrintableValue can handle str and int values, XCObjects (which are
made printable by returning their id property), and list and dict objects
composed of any of the above types. When printing a list o... | Returns a representation of value that may be printed in a project file,
mimicing Xcode's behavior. | def _XCPrintableValue(self, tabs, value, flatten_list=False):
"""Returns a representation of value that may be printed in a project file,
mimicing Xcode's behavior.
_XCPrintableValue can handle str and int values, XCObjects (which are
made printable by returning their id property), and list and dict ob... | [
"def",
"_XCPrintableValue",
"(",
"self",
",",
"tabs",
",",
"value",
",",
"flatten_list",
"=",
"False",
")",
":",
"printable",
"=",
"''",
"comment",
"=",
"None",
"if",
"self",
".",
"_should_print_single_line",
":",
"sep",
"=",
"' '",
"element_tabs",
"=",
"'... | [
573,
2
] | [
636,
20
] | python | en | ['en', 'en', 'en'] | True |
XCObject._XCKVPrint | (self, file, tabs, key, value) | Prints a key and value, members of an XCObject's _properties dictionary,
to file.
tabs is an int identifying the indentation level. If the class'
_should_print_single_line variable is True, tabs is ignored and the
key-value pair will be followed by a space insead of a newline.
| Prints a key and value, members of an XCObject's _properties dictionary,
to file. | def _XCKVPrint(self, file, tabs, key, value):
"""Prints a key and value, members of an XCObject's _properties dictionary,
to file.
tabs is an int identifying the indentation level. If the class'
_should_print_single_line variable is True, tabs is ignored and the
key-value pair will be followed by ... | [
"def",
"_XCKVPrint",
"(",
"self",
",",
"file",
",",
"tabs",
",",
"key",
",",
"value",
")",
":",
"if",
"self",
".",
"_should_print_single_line",
":",
"printable",
"=",
"''",
"after_kv",
"=",
"' '",
"else",
":",
"printable",
"=",
"'\\t'",
"*",
"tabs",
"a... | [
638,
2
] | [
698,
37
] | python | en | ['en', 'en', 'en'] | True |
XCObject.Print | (self, file=sys.stdout) | Prints a reprentation of this object to file, adhering to Xcode output
formatting.
| Prints a reprentation of this object to file, adhering to Xcode output
formatting.
| def Print(self, file=sys.stdout):
"""Prints a reprentation of this object to file, adhering to Xcode output
formatting.
"""
self.VerifyHasRequiredProperties()
if self._should_print_single_line:
# When printing an object in a single line, Xcode doesn't put any space
# between the beginn... | [
"def",
"Print",
"(",
"self",
",",
"file",
"=",
"sys",
".",
"stdout",
")",
":",
"self",
".",
"VerifyHasRequiredProperties",
"(",
")",
"if",
"self",
".",
"_should_print_single_line",
":",
"# When printing an object in a single line, Xcode doesn't put any space",
"# betwee... | [
700,
2
] | [
736,
41
] | python | en | ['en', 'en', 'en'] | True |
XCObject.UpdateProperties | (self, properties, do_copy=False) | Merge the supplied properties into the _properties dictionary.
The input properties must adhere to the class schema or a KeyError or
TypeError exception will be raised. If adding an object of an XCObject
subclass and the schema indicates a strong relationship, the object's
parent will be set to this o... | Merge the supplied properties into the _properties dictionary. | def UpdateProperties(self, properties, do_copy=False):
"""Merge the supplied properties into the _properties dictionary.
The input properties must adhere to the class schema or a KeyError or
TypeError exception will be raised. If adding an object of an XCObject
subclass and the schema indicates a stro... | [
"def",
"UpdateProperties",
"(",
"self",
",",
"properties",
",",
"do_copy",
"=",
"False",
")",
":",
"if",
"properties",
"is",
"None",
":",
"return",
"for",
"property",
",",
"value",
"in",
"properties",
".",
"iteritems",
"(",
")",
":",
"# Make sure the propert... | [
738,
2
] | [
818,
30
] | python | en | ['en', 'en', 'en'] | True |
XCObject.VerifyHasRequiredProperties | (self) | Ensure that all properties identified as required by the schema are
set.
| Ensure that all properties identified as required by the schema are
set.
| def VerifyHasRequiredProperties(self):
"""Ensure that all properties identified as required by the schema are
set.
"""
# TODO(mark): A stronger verification mechanism is needed. Some
# subclasses need to perform validation beyond what the schema can enforce.
for property, attributes in self._s... | [
"def",
"VerifyHasRequiredProperties",
"(",
"self",
")",
":",
"# TODO(mark): A stronger verification mechanism is needed. Some",
"# subclasses need to perform validation beyond what the schema can enforce.",
"for",
"property",
",",
"attributes",
"in",
"self",
".",
"_schema",
".",
"... | [
860,
2
] | [
870,
73
] | python | en | ['en', 'en', 'en'] | True |
XCObject._SetDefaultsFromSchema | (self) | Assign object default values according to the schema. This will not
overwrite properties that have already been set. | Assign object default values according to the schema. This will not
overwrite properties that have already been set. | def _SetDefaultsFromSchema(self):
"""Assign object default values according to the schema. This will not
overwrite properties that have already been set."""
defaults = {}
for property, attributes in self._schema.iteritems():
(is_list, property_type, is_strong, is_required) = attributes[0:4]
... | [
"def",
"_SetDefaultsFromSchema",
"(",
"self",
")",
":",
"defaults",
"=",
"{",
"}",
"for",
"property",
",",
"attributes",
"in",
"self",
".",
"_schema",
".",
"iteritems",
"(",
")",
":",
"(",
"is_list",
",",
"property_type",
",",
"is_strong",
",",
"is_require... | [
872,
2
] | [
888,
51
] | python | en | ['en', 'en', 'en'] | True |
XCHierarchicalElement.Hashables | (self) | Custom hashables for XCHierarchicalElements.
XCHierarchicalElements are special. Generally, their hashes shouldn't
change if the paths don't change. The normal XCObject implementation of
Hashables adds a hashable for each object, which means that if
the hierarchical structure changes (possibly due to... | Custom hashables for XCHierarchicalElements. | def Hashables(self):
"""Custom hashables for XCHierarchicalElements.
XCHierarchicalElements are special. Generally, their hashes shouldn't
change if the paths don't change. The normal XCObject implementation of
Hashables adds a hashable for each object, which means that if
the hierarchical struct... | [
"def",
"Hashables",
"(",
"self",
")",
":",
"if",
"self",
"==",
"self",
".",
"PBXProjectAncestor",
"(",
")",
".",
"_properties",
"[",
"'mainGroup'",
"]",
":",
"# super",
"return",
"XCObject",
".",
"Hashables",
"(",
"self",
")",
"hashables",
"=",
"[",
"]",... | [
950,
2
] | [
1003,
20
] | python | en | ['en', 'en', 'en'] | True |
PBXGroup.AddOrGetFileByPath | (self, path, hierarchical) | Returns an existing or new file reference corresponding to path.
If hierarchical is True, this method will create or use the necessary
hierarchical group structure corresponding to path. Otherwise, it will
look in and create an item in the current group only.
If an existing matching reference is foun... | Returns an existing or new file reference corresponding to path. | def AddOrGetFileByPath(self, path, hierarchical):
"""Returns an existing or new file reference corresponding to path.
If hierarchical is True, this method will create or use the necessary
hierarchical group structure corresponding to path. Otherwise, it will
look in and create an item in the current g... | [
"def",
"AddOrGetFileByPath",
"(",
"self",
",",
"path",
",",
"hierarchical",
")",
":",
"# Adding or getting a directory? Directories end with a trailing slash.",
"is_dir",
"=",
"False",
"if",
"path",
".",
"endswith",
"(",
"'/'",
")",
":",
"is_dir",
"=",
"True",
"pat... | [
1212,
2
] | [
1303,
55
] | python | en | ['en', 'en', 'en'] | True |
PBXGroup.AddOrGetVariantGroupByNameAndPath | (self, name, path) | Returns an existing or new PBXVariantGroup for name and path.
If a PBXVariantGroup identified by the name and path arguments is already
present as a child of this object, it is returned. Otherwise, a new
PBXVariantGroup with the correct properties is created, added as a child,
and returned.
This ... | Returns an existing or new PBXVariantGroup for name and path. | def AddOrGetVariantGroupByNameAndPath(self, name, path):
"""Returns an existing or new PBXVariantGroup for name and path.
If a PBXVariantGroup identified by the name and path arguments is already
present as a child of this object, it is returned. Otherwise, a new
PBXVariantGroup with the correct prope... | [
"def",
"AddOrGetVariantGroupByNameAndPath",
"(",
"self",
",",
"name",
",",
"path",
")",
":",
"key",
"=",
"(",
"name",
",",
"path",
")",
"if",
"key",
"in",
"self",
".",
"_variant_children_by_name_and_path",
":",
"variant_group_ref",
"=",
"self",
".",
"_variant_... | [
1305,
2
] | [
1330,
28
] | python | en | ['en', 'en', 'en'] | True |
PBXGroup.TakeOverOnlyChild | (self, recurse=False) | If this PBXGroup has only one child and it's also a PBXGroup, take
it over by making all of its children this object's children.
This function will continue to take over only children when those children
are groups. If there are three PBXGroups representing a, b, and c, with
c inside b and b inside a,... | If this PBXGroup has only one child and it's also a PBXGroup, take
it over by making all of its children this object's children. | def TakeOverOnlyChild(self, recurse=False):
"""If this PBXGroup has only one child and it's also a PBXGroup, take
it over by making all of its children this object's children.
This function will continue to take over only children when those children
are groups. If there are three PBXGroups representi... | [
"def",
"TakeOverOnlyChild",
"(",
"self",
",",
"recurse",
"=",
"False",
")",
":",
"# At this stage, check that child class types are PBXGroup exactly,",
"# instead of using isinstance. The only subclass of PBXGroup,",
"# PBXVariantGroup, should not participate in reparenting in the same way:... | [
1332,
2
] | [
1400,
42
] | python | en | ['en', 'en', 'en'] | True |
XCConfigurationList.ConfigurationNamed | (self, name) | Convenience accessor to obtain an XCBuildConfiguration by name. | Convenience accessor to obtain an XCBuildConfiguration by name. | def ConfigurationNamed(self, name):
"""Convenience accessor to obtain an XCBuildConfiguration by name."""
for configuration in self._properties['buildConfigurations']:
if configuration._properties['name'] == name:
return configuration
raise KeyError(name) | [
"def",
"ConfigurationNamed",
"(",
"self",
",",
"name",
")",
":",
"for",
"configuration",
"in",
"self",
".",
"_properties",
"[",
"'buildConfigurations'",
"]",
":",
"if",
"configuration",
".",
"_properties",
"[",
"'name'",
"]",
"==",
"name",
":",
"return",
"co... | [
1604,
2
] | [
1610,
24
] | python | en | ['en', 'en', 'en'] | True |
XCConfigurationList.DefaultConfiguration | (self) | Convenience accessor to obtain the default XCBuildConfiguration. | Convenience accessor to obtain the default XCBuildConfiguration. | def DefaultConfiguration(self):
"""Convenience accessor to obtain the default XCBuildConfiguration."""
return self.ConfigurationNamed(self._properties['defaultConfigurationName']) | [
"def",
"DefaultConfiguration",
"(",
"self",
")",
":",
"return",
"self",
".",
"ConfigurationNamed",
"(",
"self",
".",
"_properties",
"[",
"'defaultConfigurationName'",
"]",
")"
] | [
1612,
2
] | [
1614,
80
] | python | en | ['en', 'fr', 'en'] | True |
XCConfigurationList.HasBuildSetting | (self, key) | Determines the state of a build setting in all XCBuildConfiguration
child objects.
If all child objects have key in their build settings, and the value is the
same in all child objects, returns 1.
If no child objects have the key in their build settings, returns 0.
If some, but not all, child obj... | Determines the state of a build setting in all XCBuildConfiguration
child objects. | def HasBuildSetting(self, key):
"""Determines the state of a build setting in all XCBuildConfiguration
child objects.
If all child objects have key in their build settings, and the value is the
same in all child objects, returns 1.
If no child objects have the key in their build settings, returns ... | [
"def",
"HasBuildSetting",
"(",
"self",
",",
"key",
")",
":",
"has",
"=",
"None",
"value",
"=",
"None",
"for",
"configuration",
"in",
"self",
".",
"_properties",
"[",
"'buildConfigurations'",
"]",
":",
"configuration_has",
"=",
"configuration",
".",
"HasBuildSe... | [
1616,
2
] | [
1648,
12
] | python | en | ['en', 'en', 'en'] | True |
XCConfigurationList.GetBuildSetting | (self, key) | Gets the build setting for key.
All child XCConfiguration objects must have the same value set for the
setting, or a ValueError will be raised.
| Gets the build setting for key. | def GetBuildSetting(self, key):
"""Gets the build setting for key.
All child XCConfiguration objects must have the same value set for the
setting, or a ValueError will be raised.
"""
# TODO(mark): This is wrong for build settings that are lists. The list
# contents should be compared (and a l... | [
"def",
"GetBuildSetting",
"(",
"self",
",",
"key",
")",
":",
"# TODO(mark): This is wrong for build settings that are lists. The list",
"# contents should be compared (and a list copy returned?)",
"value",
"=",
"None",
"for",
"configuration",
"in",
"self",
".",
"_properties",
... | [
1650,
2
] | [
1669,
16
] | python | en | ['en', 'en', 'en'] | True |
XCConfigurationList.SetBuildSetting | (self, key, value) | Sets the build setting for key to value in all child
XCBuildConfiguration objects.
| Sets the build setting for key to value in all child
XCBuildConfiguration objects.
| def SetBuildSetting(self, key, value):
"""Sets the build setting for key to value in all child
XCBuildConfiguration objects.
"""
for configuration in self._properties['buildConfigurations']:
configuration.SetBuildSetting(key, value) | [
"def",
"SetBuildSetting",
"(",
"self",
",",
"key",
",",
"value",
")",
":",
"for",
"configuration",
"in",
"self",
".",
"_properties",
"[",
"'buildConfigurations'",
"]",
":",
"configuration",
".",
"SetBuildSetting",
"(",
"key",
",",
"value",
")"
] | [
1671,
2
] | [
1677,
47
] | python | en | ['en', 'en', 'en'] | True |
XCConfigurationList.AppendBuildSetting | (self, key, value) | Appends value to the build setting for key, which is treated as a list,
in all child XCBuildConfiguration objects.
| Appends value to the build setting for key, which is treated as a list,
in all child XCBuildConfiguration objects.
| def AppendBuildSetting(self, key, value):
"""Appends value to the build setting for key, which is treated as a list,
in all child XCBuildConfiguration objects.
"""
for configuration in self._properties['buildConfigurations']:
configuration.AppendBuildSetting(key, value) | [
"def",
"AppendBuildSetting",
"(",
"self",
",",
"key",
",",
"value",
")",
":",
"for",
"configuration",
"in",
"self",
".",
"_properties",
"[",
"'buildConfigurations'",
"]",
":",
"configuration",
".",
"AppendBuildSetting",
"(",
"key",
",",
"value",
")"
] | [
1679,
2
] | [
1685,
50
] | python | en | ['en', 'en', 'en'] | True |
XCConfigurationList.DelBuildSetting | (self, key) | Deletes the build setting key from all child XCBuildConfiguration
objects.
| Deletes the build setting key from all child XCBuildConfiguration
objects.
| def DelBuildSetting(self, key):
"""Deletes the build setting key from all child XCBuildConfiguration
objects.
"""
for configuration in self._properties['buildConfigurations']:
configuration.DelBuildSetting(key) | [
"def",
"DelBuildSetting",
"(",
"self",
",",
"key",
")",
":",
"for",
"configuration",
"in",
"self",
".",
"_properties",
"[",
"'buildConfigurations'",
"]",
":",
"configuration",
".",
"DelBuildSetting",
"(",
"key",
")"
] | [
1687,
2
] | [
1693,
40
] | python | en | ['en', 'en', 'en'] | True |
XCConfigurationList.SetBaseConfiguration | (self, value) | Sets the build configuration in all child XCBuildConfiguration objects.
| Sets the build configuration in all child XCBuildConfiguration objects.
| def SetBaseConfiguration(self, value):
"""Sets the build configuration in all child XCBuildConfiguration objects.
"""
for configuration in self._properties['buildConfigurations']:
configuration.SetBaseConfiguration(value) | [
"def",
"SetBaseConfiguration",
"(",
"self",
",",
"value",
")",
":",
"for",
"configuration",
"in",
"self",
".",
"_properties",
"[",
"'buildConfigurations'",
"]",
":",
"configuration",
".",
"SetBaseConfiguration",
"(",
"value",
")"
] | [
1695,
2
] | [
1700,
47
] | python | en | ['en', 'en', 'en'] | True |
XCBuildPhase._AddPathToDict | (self, pbxbuildfile, path) | Adds path to the dict tracking paths belonging to this build phase.
If the path is already a member of this build phase, raises an exception.
| Adds path to the dict tracking paths belonging to this build phase. | def _AddPathToDict(self, pbxbuildfile, path):
"""Adds path to the dict tracking paths belonging to this build phase.
If the path is already a member of this build phase, raises an exception.
"""
if path in self._files_by_path:
raise ValueError('Found multiple build files with path ' + path)
... | [
"def",
"_AddPathToDict",
"(",
"self",
",",
"pbxbuildfile",
",",
"path",
")",
":",
"if",
"path",
"in",
"self",
".",
"_files_by_path",
":",
"raise",
"ValueError",
"(",
"'Found multiple build files with path '",
"+",
"path",
")",
"self",
".",
"_files_by_path",
"[",... | [
1777,
2
] | [
1785,
44
] | python | en | ['en', 'en', 'en'] | True |
XCBuildPhase._AddBuildFileToDicts | (self, pbxbuildfile, path=None) | Maintains the _files_by_path and _files_by_xcfilelikeelement dicts.
If path is specified, then it is the path that is being added to the
phase, and pbxbuildfile must contain either a PBXFileReference directly
referencing that path, or it must contain a PBXVariantGroup that itself
contains a PBXFileRefe... | Maintains the _files_by_path and _files_by_xcfilelikeelement dicts. | def _AddBuildFileToDicts(self, pbxbuildfile, path=None):
"""Maintains the _files_by_path and _files_by_xcfilelikeelement dicts.
If path is specified, then it is the path that is being added to the
phase, and pbxbuildfile must contain either a PBXFileReference directly
referencing that path, or it must ... | [
"def",
"_AddBuildFileToDicts",
"(",
"self",
",",
"pbxbuildfile",
",",
"path",
"=",
"None",
")",
":",
"xcfilelikeelement",
"=",
"pbxbuildfile",
".",
"_properties",
"[",
"'fileRef'",
"]",
"paths",
"=",
"[",
"]",
"if",
"path",
"!=",
"None",
":",
"# It's best wh... | [
1787,
2
] | [
1841,
70
] | python | en | ['en', 'en', 'en'] | True |
PBXCopyFilesBuildPhase.SetDestination | (self, path) | Set the dstSubfolderSpec and dstPath properties from path.
path may be specified in the same notation used for XCHierarchicalElements,
specifically, "$(DIR)/path".
| Set the dstSubfolderSpec and dstPath properties from path. | def SetDestination(self, path):
"""Set the dstSubfolderSpec and dstPath properties from path.
path may be specified in the same notation used for XCHierarchicalElements,
specifically, "$(DIR)/path".
"""
path_tree_match = self.path_tree_re.search(path)
if path_tree_match:
# Everything els... | [
"def",
"SetDestination",
"(",
"self",
",",
"path",
")",
":",
"path_tree_match",
"=",
"self",
".",
"path_tree_re",
".",
"search",
"(",
"path",
")",
"if",
"path_tree_match",
":",
"# Everything else needs to be relative to an Xcode variable.",
"path_tree",
"=",
"path_tre... | [
1976,
2
] | [
2008,
52
] | python | en | ['en', 'en', 'en'] | True |
ConfiguredAssetFilesystemDataConnector.__init__ | (
self,
name: str,
datasource_name: str,
base_directory: str,
assets: dict,
execution_engine: Optional[ExecutionEngine] = None,
default_regex: Optional[dict] = None,
glob_directive: str = "**/*",
sorters: Optional[list] = None,
batch_spec_p... |
Base class for DataConnectors that connect to data on a filesystem. This class supports the configuration of default_regex
and sorters for filtering and sorting data_references. It takes in configured `assets` as a dictionary.
Args:
name (str): name of ConfiguredAssetFilesystemData... |
Base class for DataConnectors that connect to data on a filesystem. This class supports the configuration of default_regex
and sorters for filtering and sorting data_references. It takes in configured `assets` as a dictionary. | def __init__(
self,
name: str,
datasource_name: str,
base_directory: str,
assets: dict,
execution_engine: Optional[ExecutionEngine] = None,
default_regex: Optional[dict] = None,
glob_directive: str = "**/*",
sorters: Optional[list] = None,
... | [
"def",
"__init__",
"(",
"self",
",",
"name",
":",
"str",
",",
"datasource_name",
":",
"str",
",",
"base_directory",
":",
"str",
",",
"assets",
":",
"dict",
",",
"execution_engine",
":",
"Optional",
"[",
"ExecutionEngine",
"]",
"=",
"None",
",",
"default_re... | [
29,
4
] | [
69,
45
] | python | en | ['en', 'error', 'th'] | False |
ConfiguredAssetFilesystemDataConnector.base_directory | (self) |
Accessor method for base_directory. If directory is a relative path, interpret it as relative to the
root directory. If it is absolute, then keep as-is.
|
Accessor method for base_directory. If directory is a relative path, interpret it as relative to the
root directory. If it is absolute, then keep as-is.
| def base_directory(self) -> str:
"""
Accessor method for base_directory. If directory is a relative path, interpret it as relative to the
root directory. If it is absolute, then keep as-is.
"""
return normalize_directory_path(
dir_path=self._base_directory,
... | [
"def",
"base_directory",
"(",
"self",
")",
"->",
"str",
":",
"return",
"normalize_directory_path",
"(",
"dir_path",
"=",
"self",
".",
"_base_directory",
",",
"root_directory_path",
"=",
"self",
".",
"data_context_root_directory",
",",
")"
] | [
102,
4
] | [
110,
9
] | python | en | ['en', 'error', 'th'] | False |
ExpectTableColumnCountToEqual.validate_configuration | (self, configuration: Optional[ExpectationConfiguration]) |
Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
necessary configuration arguments have been provided for the validation of the expectation.
Args:
configuration (OPTIONAL[ExpectationConfiguration]): \
An opt... |
Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
necessary configuration arguments have been provided for the validation of the expectation. | def validate_configuration(self, configuration: Optional[ExpectationConfiguration]):
"""
Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
necessary configuration arguments have been provided for the validation of the expectation.
... | [
"def",
"validate_configuration",
"(",
"self",
",",
"configuration",
":",
"Optional",
"[",
"ExpectationConfiguration",
"]",
")",
":",
"# Setting up a configuration",
"super",
"(",
")",
".",
"validate_configuration",
"(",
"configuration",
")",
"# Ensuring that a proper valu... | [
76,
4
] | [
106,
19
] | python | en | ['en', 'error', 'th'] | False |
assert_how_to_buttons | (
context,
index_page_locator_info: str,
index_links_dict: Dict,
show_how_to_buttons=True,
) | Helper function to assert presence or non-presence of how-to buttons and related content in various
Data Docs pages.
| Helper function to assert presence or non-presence of how-to buttons and related content in various
Data Docs pages.
| def assert_how_to_buttons(
context,
index_page_locator_info: str,
index_links_dict: Dict,
show_how_to_buttons=True,
):
"""Helper function to assert presence or non-presence of how-to buttons and related content in various
Data Docs pages.
"""
# these are simple checks for presence of ce... | [
"def",
"assert_how_to_buttons",
"(",
"context",
",",
"index_page_locator_info",
":",
"str",
",",
"index_links_dict",
":",
"Dict",
",",
"show_how_to_buttons",
"=",
"True",
",",
")",
":",
"# these are simple checks for presence of certain page elements",
"show_walkthrough_butto... | [
21,
0
] | [
89,
57
] | python | en | ['en', 'en', 'en'] | True |
test_site_builder_with_custom_site_section_builders_config | (tmp_path_factory) | Test that site builder can handle partially specified custom site_section_builders config | Test that site builder can handle partially specified custom site_section_builders config | def test_site_builder_with_custom_site_section_builders_config(tmp_path_factory):
"""Test that site builder can handle partially specified custom site_section_builders config"""
base_dir = str(tmp_path_factory.mktemp("project_dir"))
project_dir = os.path.join(base_dir, "project_path")
os.mkdir(project_d... | [
"def",
"test_site_builder_with_custom_site_section_builders_config",
"(",
"tmp_path_factory",
")",
":",
"base_dir",
"=",
"str",
"(",
"tmp_path_factory",
".",
"mktemp",
"(",
"\"project_dir\"",
")",
")",
"project_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"base_d... | [
579,
0
] | [
620,
5
] | python | en | ['en', 'en', 'en'] | True |
datetime_column_evrs | () | hand-crafted EVRS for datetime columns | hand-crafted EVRS for datetime columns | def datetime_column_evrs():
"""hand-crafted EVRS for datetime columns"""
with open(
file_relative_path(__file__, "../fixtures/datetime_column_evrs.json")
) as infile:
return expectationSuiteValidationResultSchema.load(
json.load(infile, object_pairs_hook=OrderedDict)
) | [
"def",
"datetime_column_evrs",
"(",
")",
":",
"with",
"open",
"(",
"file_relative_path",
"(",
"__file__",
",",
"\"../fixtures/datetime_column_evrs.json\"",
")",
")",
"as",
"infile",
":",
"return",
"expectationSuiteValidationResultSchema",
".",
"load",
"(",
"json",
"."... | [
11,
0
] | [
18,
9
] | python | en | ['en', 'en', 'en'] | True |
test_ProfilingResultsOverviewSectionRenderer_render_variable_types | (
datetime_column_evrs,
) | Build a type table from a type expectations and assert that we correctly infer column type
for datetime. Other types would be useful to test for as well. | Build a type table from a type expectations and assert that we correctly infer column type
for datetime. Other types would be useful to test for as well. | def test_ProfilingResultsOverviewSectionRenderer_render_variable_types(
datetime_column_evrs,
):
"""Build a type table from a type expectations and assert that we correctly infer column type
for datetime. Other types would be useful to test for as well."""
content_blocks = []
ProfilingResultsOvervi... | [
"def",
"test_ProfilingResultsOverviewSectionRenderer_render_variable_types",
"(",
"datetime_column_evrs",
",",
")",
":",
"content_blocks",
"=",
"[",
"]",
"ProfilingResultsOverviewSectionRenderer",
".",
"_render_variable_types",
"(",
"datetime_column_evrs",
",",
"content_blocks",
... | [
21,
0
] | [
34,
42
] | python | en | ['en', 'en', 'en'] | True |
parse_result_format | (result_format) | This is a simple helper utility that can be used to parse a string result_format into the dict format used
internally by great_expectations. It is not necessary but allows shorthand for result_format in cases where
there is no need to specify a custom partial_unexpected_count. | This is a simple helper utility that can be used to parse a string result_format into the dict format used
internally by great_expectations. It is not necessary but allows shorthand for result_format in cases where
there is no need to specify a custom partial_unexpected_count. | def parse_result_format(result_format):
"""This is a simple helper utility that can be used to parse a string result_format into the dict format used
internally by great_expectations. It is not necessary but allows shorthand for result_format in cases where
there is no need to specify a custom partial_unexp... | [
"def",
"parse_result_format",
"(",
"result_format",
")",
":",
"if",
"isinstance",
"(",
"result_format",
",",
"str",
")",
":",
"result_format",
"=",
"{",
"\"result_format\"",
":",
"result_format",
",",
"\"partial_unexpected_count\"",
":",
"20",
"}",
"else",
":",
... | [
35,
0
] | [
45,
24
] | python | en | ['en', 'en', 'en'] | True |
ExpectationConfiguration.patch | (self, op: str, path: str, value: Any) |
Args:
op: A jsonpatch operation. One of 'add', 'replace', or 'remove'
path: A jsonpatch path for the patch operation
value: The value to patch
Returns:
The patched ExpectationConfiguration object
| def patch(self, op: str, path: str, value: Any) -> "ExpectationConfiguration":
"""
Args:
op: A jsonpatch operation. One of 'add', 'replace', or 'remove'
path: A jsonpatch path for the patch operation
value: The value to patch
Returns:
The patched... | [
"def",
"patch",
"(",
"self",
",",
"op",
":",
"str",
",",
"path",
":",
"str",
",",
"value",
":",
"Any",
")",
"->",
"\"ExpectationConfiguration\"",
":",
"if",
"op",
"not",
"in",
"[",
"\"add\"",
",",
"\"replace\"",
",",
"\"remove\"",
"]",
":",
"raise",
... | [
930,
4
] | [
959,
19
] | python | en | ['en', 'error', 'th'] | False | |
ExpectationConfiguration.isEquivalentTo | (self, other, match_type="success") | ExpectationConfiguration equivalence does not include meta, and relies on *equivalence* of kwargs. | ExpectationConfiguration equivalence does not include meta, and relies on *equivalence* of kwargs. | def isEquivalentTo(self, other, match_type="success"):
"""ExpectationConfiguration equivalence does not include meta, and relies on *equivalence* of kwargs."""
if not isinstance(other, self.__class__):
if isinstance(other, dict):
try:
other = expectationCo... | [
"def",
"isEquivalentTo",
"(",
"self",
",",
"other",
",",
"match_type",
"=",
"\"success\"",
")",
":",
"if",
"not",
"isinstance",
"(",
"other",
",",
"self",
".",
"__class__",
")",
":",
"if",
"isinstance",
"(",
"other",
",",
"dict",
")",
":",
"try",
":",
... | [
1114,
4
] | [
1151,
13
] | python | en | ['en', 'en', 'en'] | True |
ExpectationConfiguration.__eq__ | (self, other) | ExpectationConfiguration equality does include meta, but ignores instance identity. | ExpectationConfiguration equality does include meta, but ignores instance identity. | def __eq__(self, other):
"""ExpectationConfiguration equality does include meta, but ignores instance identity."""
if not isinstance(other, self.__class__):
# Delegate comparison to the other instance's __eq__.
return NotImplemented
this_kwargs: dict = convert_to_json_ser... | [
"def",
"__eq__",
"(",
"self",
",",
"other",
")",
":",
"if",
"not",
"isinstance",
"(",
"other",
",",
"self",
".",
"__class__",
")",
":",
"# Delegate comparison to the other instance's __eq__.",
"return",
"NotImplemented",
"this_kwargs",
":",
"dict",
"=",
"convert_t... | [
1153,
4
] | [
1168,
9
] | python | en | ['en', 'en', 'en'] | True |
escape | (string) | Escape a string such that it can be embedded into a Ninja file without
further interpretation. | Escape a string such that it can be embedded into a Ninja file without
further interpretation. | def escape(string):
"""Escape a string such that it can be embedded into a Ninja file without
further interpretation."""
assert '\n' not in string, 'Ninja syntax does not allow newlines'
# We only have one special metacharacter: '$'.
return string.replace('$', '$$') | [
"def",
"escape",
"(",
"string",
")",
":",
"assert",
"'\\n'",
"not",
"in",
"string",
",",
"'Ninja syntax does not allow newlines'",
"# We only have one special metacharacter: '$'.",
"return",
"string",
".",
"replace",
"(",
"'$'",
",",
"'$$'",
")"
] | [
154,
0
] | [
159,
36
] | python | en | ['en', 'en', 'en'] | True |
Writer._count_dollars_before_index | (self, s, i) | Returns the number of '$' characters right in front of s[i]. | Returns the number of '$' characters right in front of s[i]. | def _count_dollars_before_index(self, s, i):
"""Returns the number of '$' characters right in front of s[i]."""
dollar_count = 0
dollar_index = i - 1
while dollar_index > 0 and s[dollar_index] == '$':
dollar_count += 1
dollar_index -= 1
return dollar_count | [
"def",
"_count_dollars_before_index",
"(",
"self",
",",
"s",
",",
"i",
")",
":",
"dollar_count",
"=",
"0",
"dollar_index",
"=",
"i",
"-",
"1",
"while",
"dollar_index",
">",
"0",
"and",
"s",
"[",
"dollar_index",
"]",
"==",
"'$'",
":",
"dollar_count",
"+="... | [
101,
4
] | [
108,
25
] | python | en | ['en', 'en', 'en'] | True |
Writer._line | (self, text, indent=0) | Write 'text' word-wrapped at self.width characters. | Write 'text' word-wrapped at self.width characters. | def _line(self, text, indent=0):
"""Write 'text' word-wrapped at self.width characters."""
leading_space = ' ' * indent
while len(leading_space) + len(text) > self.width:
# The text is too wide; wrap if possible.
# Find the rightmost space that would obey our width cons... | [
"def",
"_line",
"(",
"self",
",",
"text",
",",
"indent",
"=",
"0",
")",
":",
"leading_space",
"=",
"' '",
"*",
"indent",
"while",
"len",
"(",
"leading_space",
")",
"+",
"len",
"(",
"text",
")",
">",
"self",
".",
"width",
":",
"# The text is too wide; ... | [
110,
4
] | [
144,
54
] | python | en | ['en', 'en', 'en'] | True |
ExpectColumnMinToBeBetween.validate_configuration | (self, configuration: Optional[ExpectationConfiguration]) |
Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
necessary configuration arguments have been provided for the validation of the expectation.
Args:
configuration (OPTIONAL[ExpectationConfiguration]): \
An opt... |
Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
necessary configuration arguments have been provided for the validation of the expectation. | def validate_configuration(self, configuration: Optional[ExpectationConfiguration]):
"""
Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
necessary configuration arguments have been provided for the validation of the expectation.
... | [
"def",
"validate_configuration",
"(",
"self",
",",
"configuration",
":",
"Optional",
"[",
"ExpectationConfiguration",
"]",
")",
":",
"super",
"(",
")",
".",
"validate_configuration",
"(",
"configuration",
"=",
"configuration",
")",
"self",
".",
"validate_metric_valu... | [
105,
4
] | [
117,
85
] | python | en | ['en', 'error', 'th'] | False |
declaration_path | (decl, with_defaults=None) |
Returns a list of parent declarations names.
Args:
decl (declaration_t): declaration for which declaration path
should be calculated.
Returns:
list[(str | basestring)]: list of names, where first item is the top
parent name a... |
Returns a list of parent declarations names. | def declaration_path(decl, with_defaults=None):
"""
Returns a list of parent declarations names.
Args:
decl (declaration_t): declaration for which declaration path
should be calculated.
Returns:
list[(str | basestring)]: list of names, where first item is ... | [
"def",
"declaration_path",
"(",
"decl",
",",
"with_defaults",
"=",
"None",
")",
":",
"if",
"with_defaults",
"is",
"not",
"None",
":",
"# Deprecated since 1.9.0, will be removed in 2.0.0",
"warnings",
".",
"warn",
"(",
"\"The with_defaults parameter is deprecated.\\n\"",
"... | [
8,
0
] | [
45,
42
] | python | en | ['en', 'error', 'th'] | False |
partial_declaration_path | (decl) |
Returns a list of parent declarations names without template arguments that
have default value.
Args:
decl (declaration_t): declaration for which the partial declaration
path should be calculated.
Returns:
list[(str | basestring)]: list of names, where fi... |
Returns a list of parent declarations names without template arguments that
have default value. | def partial_declaration_path(decl):
"""
Returns a list of parent declarations names without template arguments that
have default value.
Args:
decl (declaration_t): declaration for which the partial declaration
path should be calculated.
Returns:
list[(... | [
"def",
"partial_declaration_path",
"(",
"decl",
")",
":",
"# TODO:",
"# If parent declaration cache already has declaration_path, reuse it for",
"# calculation.",
"if",
"not",
"decl",
":",
"return",
"[",
"]",
"if",
"not",
"decl",
".",
"cache",
".",
"partial_declaration_pa... | [
48,
0
] | [
84,
50
] | python | en | ['en', 'error', 'th'] | False |
full_name | (decl, with_defaults=True) |
Returns declaration full qualified name.
If `decl` belongs to anonymous namespace or class, the function will return
C++ illegal qualified name.
Args:
decl (declaration_t): declaration for which the full qualified name
should be calculated.
Returns:
... |
Returns declaration full qualified name. | def full_name(decl, with_defaults=True):
"""
Returns declaration full qualified name.
If `decl` belongs to anonymous namespace or class, the function will return
C++ illegal qualified name.
Args:
decl (declaration_t): declaration for which the full qualified name
... | [
"def",
"full_name",
"(",
"decl",
",",
"with_defaults",
"=",
"True",
")",
":",
"if",
"None",
"is",
"decl",
":",
"raise",
"RuntimeError",
"(",
"\"Unable to generate full name for None object!\"",
")",
"if",
"with_defaults",
":",
"if",
"not",
"decl",
".",
"cache",
... | [
96,
0
] | [
134,
43
] | python | en | ['en', 'error', 'th'] | False |
get_named_parent | (decl) |
Returns a reference to a named parent declaration.
Args:
decl (declaration_t): the child declaration
Returns:
declaration_t: the declaration or None if not found.
|
Returns a reference to a named parent declaration. | def get_named_parent(decl):
"""
Returns a reference to a named parent declaration.
Args:
decl (declaration_t): the child declaration
Returns:
declaration_t: the declaration or None if not found.
"""
if not decl:
return None
parent = decl.parent
while parent a... | [
"def",
"get_named_parent",
"(",
"decl",
")",
":",
"if",
"not",
"decl",
":",
"return",
"None",
"parent",
"=",
"decl",
".",
"parent",
"while",
"parent",
"and",
"(",
"not",
"parent",
".",
"name",
"or",
"parent",
".",
"name",
"==",
"'::'",
")",
":",
"par... | [
137,
0
] | [
155,
17
] | python | en | ['en', 'error', 'th'] | False |
test_comprehensive_list_of_messages | () | Ensure that we have a comprehensive set of tests for known messages, by
forcing a manual update to this list when a message is added or removed, and
reminding the developer to add or remove the associate test. | Ensure that we have a comprehensive set of tests for known messages, by
forcing a manual update to this list when a message is added or removed, and
reminding the developer to add or remove the associate test. | def test_comprehensive_list_of_messages():
"""Ensure that we have a comprehensive set of tests for known messages, by
forcing a manual update to this list when a message is added or removed, and
reminding the developer to add or remove the associate test."""
valid_message_list = list(valid_usage_statist... | [
"def",
"test_comprehensive_list_of_messages",
"(",
")",
":",
"valid_message_list",
"=",
"list",
"(",
"valid_usage_statistics_messages",
".",
"keys",
"(",
")",
")",
"# NOTE: If you are changing the expected valid message list below, you need",
"# to also update one or more tests below... | [
19,
0
] | [
61,
5
] | python | en | ['en', 'en', 'en'] | True |
ValidationResultsPageRenderer.__init__ | (self, column_section_renderer=None, run_info_at_end: bool = False) |
Args:
column_section_renderer:
run_info_at_end: Move the run info (Info, Batch Markers, Batch Kwargs) to the end
of the rendered output rather than after Statistics.
|
Args:
column_section_renderer:
run_info_at_end: Move the run info (Info, Batch Markers, Batch Kwargs) to the end
of the rendered output rather than after Statistics.
| def __init__(self, column_section_renderer=None, run_info_at_end: bool = False):
"""
Args:
column_section_renderer:
run_info_at_end: Move the run info (Info, Batch Markers, Batch Kwargs) to the end
of the rendered output rather than after Statistics.
"""
... | [
"def",
"__init__",
"(",
"self",
",",
"column_section_renderer",
"=",
"None",
",",
"run_info_at_end",
":",
"bool",
"=",
"False",
")",
":",
"super",
"(",
")",
".",
"__init__",
"(",
")",
"if",
"column_section_renderer",
"is",
"None",
":",
"column_section_renderer... | [
32,
4
] | [
58,
46
] | python | en | ['en', 'error', 'th'] | False |
ValidationResultsPageRenderer.render_validation_operator_result | (
self, validation_operator_result: ValidationOperatorResult
) |
Render a ValidationOperatorResult which can have multiple ExpectationSuiteValidationResult
Args:
validation_operator_result: ValidationOperatorResult
Returns:
List[RenderedDocumentContent]
|
Render a ValidationOperatorResult which can have multiple ExpectationSuiteValidationResult | def render_validation_operator_result(
self, validation_operator_result: ValidationOperatorResult
) -> List[RenderedDocumentContent]:
"""
Render a ValidationOperatorResult which can have multiple ExpectationSuiteValidationResult
Args:
validation_operator_result: Validati... | [
"def",
"render_validation_operator_result",
"(",
"self",
",",
"validation_operator_result",
":",
"ValidationOperatorResult",
")",
"->",
"List",
"[",
"RenderedDocumentContent",
"]",
":",
"return",
"[",
"self",
".",
"render",
"(",
"validation_result",
")",
"for",
"valid... | [
60,
4
] | [
75,
9
] | python | en | ['en', 'error', 'th'] | False |
ConfiguredAssetFilePathDataConnector.__init__ | (
self,
name: str,
datasource_name: str,
assets: dict,
execution_engine: Optional[ExecutionEngine] = None,
default_regex: Optional[dict] = None,
sorters: Optional[list] = None,
batch_spec_passthrough: Optional[dict] = None,
) |
Base class for DataConnectors that connect to filesystem-like data by taking in
configured `assets` as a dictionary. This class supports the configuration of default_regex and
sorters for filtering and sorting data_references.
Args:
name (str): name of ConfiguredAssetFilePa... |
Base class for DataConnectors that connect to filesystem-like data by taking in
configured `assets` as a dictionary. This class supports the configuration of default_regex and
sorters for filtering and sorting data_references. | def __init__(
self,
name: str,
datasource_name: str,
assets: dict,
execution_engine: Optional[ExecutionEngine] = None,
default_regex: Optional[dict] = None,
sorters: Optional[list] = None,
batch_spec_passthrough: Optional[dict] = None,
):
"""
... | [
"def",
"__init__",
"(",
"self",
",",
"name",
":",
"str",
",",
"datasource_name",
":",
"str",
",",
"assets",
":",
"dict",
",",
"execution_engine",
":",
"Optional",
"[",
"ExecutionEngine",
"]",
"=",
"None",
",",
"default_regex",
":",
"Optional",
"[",
"dict",... | [
33,
4
] | [
71,
53
] | python | en | ['en', 'error', 'th'] | False |
ConfiguredAssetFilePathDataConnector.get_available_data_asset_names | (self) |
Return the list of asset names known by this DataConnector.
Returns:
A list of available names
|
Return the list of asset names known by this DataConnector. | def get_available_data_asset_names(self) -> List[str]:
"""
Return the list of asset names known by this DataConnector.
Returns:
A list of available names
"""
return list(self.assets.keys()) | [
"def",
"get_available_data_asset_names",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"return",
"list",
"(",
"self",
".",
"assets",
".",
"keys",
"(",
")",
")"
] | [
104,
4
] | [
111,
39
] | python | en | ['en', 'error', 'th'] | False |
ConfiguredAssetFilePathDataConnector._get_data_reference_list | (
self, data_asset_name: Optional[str] = None
) |
List objects in the underlying data store to create a list of data_references.
This method is used to refresh the cache.
|
List objects in the underlying data store to create a list of data_references.
This method is used to refresh the cache.
| def _get_data_reference_list(
self, data_asset_name: Optional[str] = None
) -> List[str]:
"""
List objects in the underlying data store to create a list of data_references.
This method is used to refresh the cache.
"""
asset: Optional[Asset] = self._get_asset(data_ass... | [
"def",
"_get_data_reference_list",
"(",
"self",
",",
"data_asset_name",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
")",
"->",
"List",
"[",
"str",
"]",
":",
"asset",
":",
"Optional",
"[",
"Asset",
"]",
"=",
"self",
".",
"_get_asset",
"(",
"data_asset_... | [
134,
4
] | [
143,
24
] | python | en | ['en', 'error', 'th'] | False |
ConfiguredAssetFilePathDataConnector.get_data_reference_list_count | (self) |
Returns the list of data_references known by this DataConnector by looping over all data_asset_names in
_data_references_cache
Returns:
number of data_references known by this DataConnector.
|
Returns the list of data_references known by this DataConnector by looping over all data_asset_names in
_data_references_cache | def get_data_reference_list_count(self) -> int:
"""
Returns the list of data_references known by this DataConnector by looping over all data_asset_names in
_data_references_cache
Returns:
number of data_references known by this DataConnector.
"""
total_refere... | [
"def",
"get_data_reference_list_count",
"(",
"self",
")",
"->",
"int",
":",
"total_references",
":",
"int",
"=",
"sum",
"(",
"[",
"len",
"(",
"self",
".",
"_data_references_cache",
"[",
"data_asset_name",
"]",
")",
"for",
"data_asset_name",
"in",
"self",
".",
... | [
145,
4
] | [
160,
31
] | python | en | ['en', 'error', 'th'] | False |
ConfiguredAssetFilePathDataConnector.get_unmatched_data_references | (self) |
Returns the list of data_references unmatched by configuration by looping through items in _data_references_cache
and returning data_reference that do not have an associated data_asset.
Returns:
list of data_references that are not matched by configuration.
|
Returns the list of data_references unmatched by configuration by looping through items in _data_references_cache
and returning data_reference that do not have an associated data_asset. | def get_unmatched_data_references(self) -> List[str]:
"""
Returns the list of data_references unmatched by configuration by looping through items in _data_references_cache
and returning data_reference that do not have an associated data_asset.
Returns:
list of data_reference... | [
"def",
"get_unmatched_data_references",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"unmatched_data_references",
":",
"List",
"[",
"str",
"]",
"=",
"[",
"]",
"for",
"(",
"data_asset_name",
",",
"data_reference_sub_cache",
",",
")",
"in",
"self",
".... | [
162,
4
] | [
179,
40
] | python | en | ['en', 'error', 'th'] | False |
ConfiguredAssetFilePathDataConnector.build_batch_spec | (self, batch_definition: BatchDefinition) |
Build BatchSpec from batch_definition by calling DataConnector's build_batch_spec function.
Args:
batch_definition (BatchDefinition): to be used to build batch_spec
Returns:
BatchSpec built from batch_definition
|
Build BatchSpec from batch_definition by calling DataConnector's build_batch_spec function. | def build_batch_spec(self, batch_definition: BatchDefinition) -> PathBatchSpec:
"""
Build BatchSpec from batch_definition by calling DataConnector's build_batch_spec function.
Args:
batch_definition (BatchDefinition): to be used to build batch_spec
Returns:
Batc... | [
"def",
"build_batch_spec",
"(",
"self",
",",
"batch_definition",
":",
"BatchDefinition",
")",
"->",
"PathBatchSpec",
":",
"data_asset_name",
":",
"str",
"=",
"batch_definition",
".",
"data_asset_name",
"if",
"(",
"data_asset_name",
"in",
"self",
".",
"assets",
"an... | [
227,
4
] | [
259,
25
] | python | en | ['en', 'error', 'th'] | False |
test_database_store_backend_id_initialization | (caplog, sa, test_backends) |
What does this test and why?
NOTE: This test only has one key column which may not mirror actual functionality
A StoreBackend should have a store_backend_id property. That store_backend_id should be read and initialized
from an existing persistent store_backend_id during instantiation, or a new store... |
What does this test and why? | def test_database_store_backend_id_initialization(caplog, sa, test_backends):
"""
What does this test and why?
NOTE: This test only has one key column which may not mirror actual functionality
A StoreBackend should have a store_backend_id property. That store_backend_id should be read and initialized
... | [
"def",
"test_database_store_backend_id_initialization",
"(",
"caplog",
",",
"sa",
",",
"test_backends",
")",
":",
"if",
"\"postgresql\"",
"not",
"in",
"test_backends",
":",
"pytest",
".",
"skip",
"(",
"\"test_database_store_backend_id_initialization requires postgresql\"",
... | [
148,
0
] | [
219,
5
] | python | en | ['en', 'error', 'th'] | False |
S3GlobReaderBatchKwargsGenerator.__init__ | (
self,
name="default",
datasource=None,
bucket=None,
reader_options=None,
assets=None,
delimiter="/",
reader_method=None,
boto3_options=None,
max_keys=1000,
) | Initialize a new S3GlobReaderBatchKwargsGenerator
Args:
name: the name of the batch kwargs generator
datasource: the datasource to which it is attached
bucket: the name of the s3 bucket from which it generates batch_kwargs
reader_options: options passed to the da... | Initialize a new S3GlobReaderBatchKwargsGenerator | def __init__(
self,
name="default",
datasource=None,
bucket=None,
reader_options=None,
assets=None,
delimiter="/",
reader_method=None,
boto3_options=None,
max_keys=1000,
):
"""Initialize a new S3GlobReaderBatchKwargsGenerator
... | [
"def",
"__init__",
"(",
"self",
",",
"name",
"=",
"\"default\"",
",",
"datasource",
"=",
"None",
",",
"bucket",
"=",
"None",
",",
"reader_options",
"=",
"None",
",",
"assets",
"=",
"None",
",",
"delimiter",
"=",
"\"/\"",
",",
"reader_method",
"=",
"None"... | [
62,
4
] | [
110,
13
] | python | en | ['en', 'pl', 'en'] | True |
get_tweet | (tweet_id) | Looks up data for a single tweet. | Looks up data for a single tweet. | def get_tweet(tweet_id):
"""Looks up data for a single tweet."""
twitter = Twitter(logs_to_cloud=False)
return twitter.get_tweet(tweet_id) | [
"def",
"get_tweet",
"(",
"tweet_id",
")",
":",
"twitter",
"=",
"Twitter",
"(",
"logs_to_cloud",
"=",
"False",
")",
"return",
"twitter",
".",
"get_tweet",
"(",
"tweet_id",
")"
] | [
14,
0
] | [
18,
38
] | python | en | ['en', 'en', 'en'] | True |
get_tweet_text | (tweet_id) | Looks up the text for a single tweet. | Looks up the text for a single tweet. | def get_tweet_text(tweet_id):
"""Looks up the text for a single tweet."""
tweet = get_tweet(tweet_id)
analysis = Analysis(logs_to_cloud=False)
return analysis.get_expanded_text(tweet) | [
"def",
"get_tweet_text",
"(",
"tweet_id",
")",
":",
"tweet",
"=",
"get_tweet",
"(",
"tweet_id",
")",
"analysis",
"=",
"Analysis",
"(",
"logs_to_cloud",
"=",
"False",
")",
"return",
"analysis",
".",
"get_expanded_text",
"(",
"tweet",
")"
] | [
21,
0
] | [
26,
44
] | python | en | ['en', 'en', 'en'] | True |
BaseDatasource.__init__ | (
self,
name: str,
execution_engine=None,
data_context_root_directory: Optional[str] = None,
) |
Build a new Datasource.
Args:
name: the name for the datasource
execution_engine (ClassConfig): the type of compute engine to produce
data_context_root_directory: Installation directory path (if installed on a filesystem).
|
Build a new Datasource. | def __init__(
self,
name: str,
execution_engine=None,
data_context_root_directory: Optional[str] = None,
):
"""
Build a new Datasource.
Args:
name: the name for the datasource
execution_engine (ClassConfig): the type of compute engine ... | [
"def",
"__init__",
"(",
"self",
",",
"name",
":",
"str",
",",
"execution_engine",
"=",
"None",
",",
"data_context_root_directory",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
",",
")",
":",
"self",
".",
"_name",
"=",
"name",
"self",
".",
"_data_contex... | [
27,
4
] | [
57,
34
] | python | en | ['en', 'error', 'th'] | False |
BaseDatasource.get_batch_from_batch_definition | (
self,
batch_definition: BatchDefinition,
batch_data: Any = None,
) |
Note: this method should *not* be used when getting a Batch from a BatchRequest, since it does not capture BatchRequest metadata.
|
Note: this method should *not* be used when getting a Batch from a BatchRequest, since it does not capture BatchRequest metadata.
| def get_batch_from_batch_definition(
self,
batch_definition: BatchDefinition,
batch_data: Any = None,
) -> Batch:
"""
Note: this method should *not* be used when getting a Batch from a BatchRequest, since it does not capture BatchRequest metadata.
"""
if not i... | [
"def",
"get_batch_from_batch_definition",
"(",
"self",
",",
"batch_definition",
":",
"BatchDefinition",
",",
"batch_data",
":",
"Any",
"=",
"None",
",",
")",
"->",
"Batch",
":",
"if",
"not",
"isinstance",
"(",
"batch_data",
",",
"type",
"(",
"None",
")",
")"... | [
59,
4
] | [
90,
24
] | python | en | ['en', 'error', 'th'] | False |
BaseDatasource.get_batch_definition_list_from_batch_request | (
self, batch_request: BatchRequest
) |
Validates batch request and utilizes the classes'
Data Connectors' property to get a list of batch definition given
a batch request
Args:
:param batch_request: A BatchRequest object used to request a batch
:return: A list of batch definitions
|
Validates batch request and utilizes the classes'
Data Connectors' property to get a list of batch definition given
a batch request
Args:
:param batch_request: A BatchRequest object used to request a batch
:return: A list of batch definitions
| def get_batch_definition_list_from_batch_request(
self, batch_request: BatchRequest
) -> List[BatchDefinition]:
"""
Validates batch request and utilizes the classes'
Data Connectors' property to get a list of batch definition given
a batch request
Args:
:... | [
"def",
"get_batch_definition_list_from_batch_request",
"(",
"self",
",",
"batch_request",
":",
"BatchRequest",
")",
"->",
"List",
"[",
"BatchDefinition",
"]",
":",
"self",
".",
"_validate_batch_request",
"(",
"batch_request",
"=",
"batch_request",
")",
"data_connector",... | [
100,
4
] | [
118,
9
] | python | en | ['en', 'error', 'th'] | False |
BaseDatasource.get_batch_list_from_batch_request | (
self, batch_request: Union[BatchRequest, RuntimeBatchRequest]
) |
Processes batch_request and returns the (possibly empty) list of batch objects.
Args:
:batch_request encapsulation of request parameters necessary to identify the (possibly multiple) batches
:returns possibly empty list of batch objects; each batch object contains a dataset and... |
Processes batch_request and returns the (possibly empty) list of batch objects. | def get_batch_list_from_batch_request(
self, batch_request: Union[BatchRequest, RuntimeBatchRequest]
) -> List[Batch]:
"""
Processes batch_request and returns the (possibly empty) list of batch objects.
Args:
:batch_request encapsulation of request parameters necessary t... | [
"def",
"get_batch_list_from_batch_request",
"(",
"self",
",",
"batch_request",
":",
"Union",
"[",
"BatchRequest",
",",
"RuntimeBatchRequest",
"]",
")",
"->",
"List",
"[",
"Batch",
"]",
":",
"self",
".",
"_validate_batch_request",
"(",
"batch_request",
"=",
"batch_... | [
120,
4
] | [
196,
26
] | python | en | ['en', 'error', 'th'] | False |
BaseDatasource._build_data_connector_from_config | (
self,
name: str,
config: Dict[str, Any],
) | Build a DataConnector using the provided configuration and return the newly-built DataConnector. | Build a DataConnector using the provided configuration and return the newly-built DataConnector. | def _build_data_connector_from_config(
self,
name: str,
config: Dict[str, Any],
) -> DataConnector:
"""Build a DataConnector using the provided configuration and return the newly-built DataConnector."""
new_data_connector: DataConnector = instantiate_class_from_config(
... | [
"def",
"_build_data_connector_from_config",
"(",
"self",
",",
"name",
":",
"str",
",",
"config",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
",",
")",
"->",
"DataConnector",
":",
"new_data_connector",
":",
"DataConnector",
"=",
"instantiate_class_from_config",
"("... | [
198,
4
] | [
220,
33
] | python | en | ['en', 'en', 'en'] | True |
BaseDatasource.get_available_data_asset_names | (
self, data_connector_names: Optional[Union[list, str]] = None
) |
Returns a dictionary of data_asset_names that the specified data
connector can provide. Note that some data_connectors may not be
capable of describing specific named data assets, and some (such as
inferred_asset_data_connector) require the user to configure
data asset names.
... |
Returns a dictionary of data_asset_names that the specified data
connector can provide. Note that some data_connectors may not be
capable of describing specific named data assets, and some (such as
inferred_asset_data_connector) require the user to configure
data asset names. | def get_available_data_asset_names(
self, data_connector_names: Optional[Union[list, str]] = None
) -> Dict[str, List[str]]:
"""
Returns a dictionary of data_asset_names that the specified data
connector can provide. Note that some data_connectors may not be
capable of descri... | [
"def",
"get_available_data_asset_names",
"(",
"self",
",",
"data_connector_names",
":",
"Optional",
"[",
"Union",
"[",
"list",
",",
"str",
"]",
"]",
"=",
"None",
")",
"->",
"Dict",
"[",
"str",
",",
"List",
"[",
"str",
"]",
"]",
":",
"available_data_asset_n... | [
222,
4
] | [
258,
41
] | python | en | ['en', 'error', 'th'] | False |
BaseDatasource.name | (self) |
Property for datasource name
|
Property for datasource name
| def name(self) -> str:
"""
Property for datasource name
"""
return self._name | [
"def",
"name",
"(",
"self",
")",
"->",
"str",
":",
"return",
"self",
".",
"_name"
] | [
323,
4
] | [
327,
25
] | python | en | ['en', 'error', 'th'] | False |
Datasource.__init__ | (
self,
name: str,
execution_engine=None,
data_connectors=None,
data_context_root_directory: Optional[str] = None,
) |
Build a new Datasource with data connectors.
Args:
name: the name for the datasource
execution_engine (ClassConfig): the type of compute engine to produce
data_connectors: DataConnectors to add to the datasource
data_context_root_directory: Installation ... |
Build a new Datasource with data connectors. | def __init__(
self,
name: str,
execution_engine=None,
data_connectors=None,
data_context_root_directory: Optional[str] = None,
):
"""
Build a new Datasource with data connectors.
Args:
name: the name for the datasource
executio... | [
"def",
"__init__",
"(",
"self",
",",
"name",
":",
"str",
",",
"execution_engine",
"=",
"None",
",",
"data_connectors",
"=",
"None",
",",
"data_context_root_directory",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
",",
")",
":",
"self",
".",
"_name",
"=... | [
349,
4
] | [
379,
74
] | python | en | ['en', 'error', 'th'] | False |
ExpectColumnProportionOfUniqueValuesToBeBetween.validate_configuration | (self, configuration: Optional[ExpectationConfiguration]) |
Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
necessary configuration arguments have been provided for the validation of the expectation.
Args:
configuration (OPTIONAL[ExpectationConfiguration]): \
An opt... |
Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
necessary configuration arguments have been provided for the validation of the expectation. | def validate_configuration(self, configuration: Optional[ExpectationConfiguration]):
"""
Validates that a configuration has been set, and sets a configuration if it has yet to be set. Ensures that
necessary configuration arguments have been provided for the validation of the expectation.
... | [
"def",
"validate_configuration",
"(",
"self",
",",
"configuration",
":",
"Optional",
"[",
"ExpectationConfiguration",
"]",
")",
":",
"super",
"(",
")",
".",
"validate_configuration",
"(",
"configuration",
")",
"self",
".",
"validate_metric_value_between_configuration",
... | [
108,
4
] | [
120,
85
] | python | en | ['en', 'error', 'th'] | False |
reset_downloads_folder | () | Clears the downloads folder.
If settings.ARCHIVE_EXISTING_DOWNLOADS is set to True, archives it. | Clears the downloads folder.
If settings.ARCHIVE_EXISTING_DOWNLOADS is set to True, archives it. | def reset_downloads_folder():
''' Clears the downloads folder.
If settings.ARCHIVE_EXISTING_DOWNLOADS is set to True, archives it. '''
if os.path.exists(downloads_path) and not os.listdir(downloads_path) == []:
archived_downloads_folder = os.path.join(downloads_path, '..',
... | [
"def",
"reset_downloads_folder",
"(",
")",
":",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"downloads_path",
")",
"and",
"not",
"os",
".",
"listdir",
"(",
"downloads_path",
")",
"==",
"[",
"]",
":",
"archived_downloads_folder",
"=",
"os",
".",
"path",
... | [
21,
0
] | [
27,
67
] | python | en | ['en', 'en', 'en'] | True |
is_element_present | (driver, selector, by=By.CSS_SELECTOR) |
Returns whether the specified element selector is present on the page.
@Params
driver - the webdriver object (required)
selector - the locator for identifying the page element (required)
by - the type of selector being used (Default: By.CSS_SELECTOR)
@Returns
Boolean (is element present)
... |
Returns whether the specified element selector is present on the page.
| def is_element_present(driver, selector, by=By.CSS_SELECTOR):
"""
Returns whether the specified element selector is present on the page.
@Params
driver - the webdriver object (required)
selector - the locator for identifying the page element (required)
by - the type of selector being used (Defau... | [
"def",
"is_element_present",
"(",
"driver",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
")",
":",
"try",
":",
"driver",
".",
"find_element",
"(",
"by",
"=",
"by",
",",
"value",
"=",
"selector",
")",
"return",
"True",
"except",
"Exception"... | [
41,
0
] | [
55,
20
] | python | en | ['en', 'error', 'th'] | False |
is_element_visible | (driver, selector, by=By.CSS_SELECTOR) |
Returns whether the specified element selector is visible on the page.
@Params
driver - the webdriver object (required)
selector - the locator for identifying the page element (required)
by - the type of selector being used (Default: By.CSS_SELECTOR)
@Returns
Boolean (is element visible)
... |
Returns whether the specified element selector is visible on the page.
| def is_element_visible(driver, selector, by=By.CSS_SELECTOR):
"""
Returns whether the specified element selector is visible on the page.
@Params
driver - the webdriver object (required)
selector - the locator for identifying the page element (required)
by - the type of selector being used (Defau... | [
"def",
"is_element_visible",
"(",
"driver",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
")",
":",
"try",
":",
"element",
"=",
"driver",
".",
"find_element",
"(",
"by",
"=",
"by",
",",
"value",
"=",
"selector",
")",
"return",
"element",
... | [
58,
0
] | [
72,
20
] | python | en | ['en', 'error', 'th'] | False |
is_text_visible | (driver, text, selector, by=By.CSS_SELECTOR) |
Returns whether the specified text is visible in the specified selector.
@Params
driver - the webdriver object (required)
text - the text string to search for
selector - the locator for identifying the page element (required)
by - the type of selector being used (Default: By.CSS_SELECTOR)
@... |
Returns whether the specified text is visible in the specified selector.
| def is_text_visible(driver, text, selector, by=By.CSS_SELECTOR):
"""
Returns whether the specified text is visible in the specified selector.
@Params
driver - the webdriver object (required)
text - the text string to search for
selector - the locator for identifying the page element (required)
... | [
"def",
"is_text_visible",
"(",
"driver",
",",
"text",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
")",
":",
"try",
":",
"element",
"=",
"driver",
".",
"find_element",
"(",
"by",
"=",
"by",
",",
"value",
"=",
"selector",
")",
"return",
... | [
75,
0
] | [
90,
20
] | python | en | ['en', 'error', 'th'] | False |
hover_on_element | (driver, selector, by=By.CSS_SELECTOR) |
Fires the hover event for the specified element by the given selector.
@Params
driver - the webdriver object (required)
selector - the locator for identifying the page element (required)
by - the type of selector being used (Default: By.CSS_SELECTOR)
|
Fires the hover event for the specified element by the given selector.
| def hover_on_element(driver, selector, by=By.CSS_SELECTOR):
"""
Fires the hover event for the specified element by the given selector.
@Params
driver - the webdriver object (required)
selector - the locator for identifying the page element (required)
by - the type of selector being used (Default... | [
"def",
"hover_on_element",
"(",
"driver",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
")",
":",
"element",
"=",
"driver",
".",
"find_element",
"(",
"by",
"=",
"by",
",",
"value",
"=",
"selector",
")",
"hover",
"=",
"ActionChains",
"(",
... | [
93,
0
] | [
103,
19
] | python | en | ['en', 'error', 'th'] | False |
hover_element | (driver, element) |
Similar to hover_on_element(), but uses found element, not a selector.
|
Similar to hover_on_element(), but uses found element, not a selector.
| def hover_element(driver, element):
"""
Similar to hover_on_element(), but uses found element, not a selector.
"""
hover = ActionChains(driver).move_to_element(element)
hover.perform() | [
"def",
"hover_element",
"(",
"driver",
",",
"element",
")",
":",
"hover",
"=",
"ActionChains",
"(",
"driver",
")",
".",
"move_to_element",
"(",
"element",
")",
"hover",
".",
"perform",
"(",
")"
] | [
106,
0
] | [
111,
19
] | python | en | ['en', 'error', 'th'] | False |
hover_and_click | (driver, hover_selector, click_selector,
hover_by=By.CSS_SELECTOR, click_by=By.CSS_SELECTOR,
timeout=settings.SMALL_TIMEOUT) |
Fires the hover event for a specified element by a given selector, then
clicks on another element specified. Useful for dropdown hover based menus.
@Params
driver - the webdriver object (required)
hover_selector - the css selector to hover over (required)
click_selector - the css selector to cl... |
Fires the hover event for a specified element by a given selector, then
clicks on another element specified. Useful for dropdown hover based menus.
| def hover_and_click(driver, hover_selector, click_selector,
hover_by=By.CSS_SELECTOR, click_by=By.CSS_SELECTOR,
timeout=settings.SMALL_TIMEOUT):
"""
Fires the hover event for a specified element by a given selector, then
clicks on another element specified. Useful for... | [
"def",
"hover_and_click",
"(",
"driver",
",",
"hover_selector",
",",
"click_selector",
",",
"hover_by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"click_by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"timeout",
"=",
"settings",
".",
"SMALL_TIMEOUT",
")",
":",
"start_ms"... | [
119,
0
] | [
154,
54
] | python | en | ['en', 'error', 'th'] | False |
hover_element_and_click | (driver, element, click_selector,
click_by=By.CSS_SELECTOR,
timeout=settings.SMALL_TIMEOUT) |
Similar to hover_and_click(), but assumes top element is already found.
|
Similar to hover_and_click(), but assumes top element is already found.
| def hover_element_and_click(driver, element, click_selector,
click_by=By.CSS_SELECTOR,
timeout=settings.SMALL_TIMEOUT):
"""
Similar to hover_and_click(), but assumes top element is already found.
"""
start_ms = time.time() * 1000.0
stop_ms = st... | [
"def",
"hover_element_and_click",
"(",
"driver",
",",
"element",
",",
"click_selector",
",",
"click_by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"timeout",
"=",
"settings",
".",
"SMALL_TIMEOUT",
")",
":",
"start_ms",
"=",
"time",
".",
"time",
"(",
")",
"*",
"... | [
157,
0
] | [
183,
54
] | python | en | ['en', 'error', 'th'] | False |
wait_for_element_present | (driver, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT) |
Searches for the specified element by the given selector. Returns the
element object if the element is present on the page. The element can be
invisible. Raises an exception if the element does not appear in the
specified timeout.
@Params
driver - the webdriver object
selector - the locator... |
Searches for the specified element by the given selector. Returns the
element object if the element is present on the page. The element can be
invisible. Raises an exception if the element does not appear in the
specified timeout.
| def wait_for_element_present(driver, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT):
"""
Searches for the specified element by the given selector. Returns the
element object if the element is present on the page. The element can be
invisible. Raises an excepti... | [
"def",
"wait_for_element_present",
"(",
"driver",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"element",
"=",
"None",
"start_ms",
"=",
"time",
".",
"time",
"(",
")",
"*",
"1... | [
215,
0
] | [
250,
58
] | python | en | ['en', 'error', 'th'] | False |
wait_for_element_visible | (driver, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT) |
Searches for the specified element by the given selector. Returns the
element object if the element is present and visible on the page.
Raises an exception if the element does not appear in the
specified timeout.
@Params
driver - the webdriver object (required)
selector - the locator for id... |
Searches for the specified element by the given selector. Returns the
element object if the element is present and visible on the page.
Raises an exception if the element does not appear in the
specified timeout.
@Params
driver - the webdriver object (required)
selector - the locator for id... | def wait_for_element_visible(driver, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT):
"""
Searches for the specified element by the given selector. Returns the
element object if the element is present and visible on the page.
Raises an exception if the element ... | [
"def",
"wait_for_element_visible",
"(",
"driver",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"element",
"=",
"None",
"start_ms",
"=",
"time",
".",
"time",
"(",
")",
"*",
"1... | [
253,
0
] | [
298,
62
] | python | en | ['en', 'error', 'th'] | False |
wait_for_text_visible | (driver, text, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT) |
Searches for the specified element by the given selector. Returns the
element object if the text is present in the element and visible
on the page. Raises an exception if the text or element do not appear
in the specified timeout.
@Params
driver - the webdriver object (required)
text - the ... |
Searches for the specified element by the given selector. Returns the
element object if the text is present in the element and visible
on the page. Raises an exception if the text or element do not appear
in the specified timeout.
| def wait_for_text_visible(driver, text, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT):
"""
Searches for the specified element by the given selector. Returns the
element object if the text is present in the element and visible
on the page. Raises an exception if ... | [
"def",
"wait_for_text_visible",
"(",
"driver",
",",
"text",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"element",
"=",
"None",
"start_ms",
"=",
"time",
".",
"time",
"(",
")... | [
301,
0
] | [
341,
62
] | python | en | ['en', 'error', 'th'] | False |
wait_for_exact_text_visible | (driver, text, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT) |
Searches for the specified element by the given selector. Returns the
element object if the text matches exactly with the text in the element,
and the text is visible.
Raises an exception if the text or element do not appear
in the specified timeout.
@Params
driver - the webdriver object (r... |
Searches for the specified element by the given selector. Returns the
element object if the text matches exactly with the text in the element,
and the text is visible.
Raises an exception if the text or element do not appear
in the specified timeout.
| def wait_for_exact_text_visible(driver, text, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT):
"""
Searches for the specified element by the given selector. Returns the
element object if the text matches exactly with the text in the element,
and the text is ... | [
"def",
"wait_for_exact_text_visible",
"(",
"driver",
",",
"text",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"element",
"=",
"None",
"start_ms",
"=",
"time",
".",
"time",
"("... | [
344,
0
] | [
385,
62
] | python | en | ['en', 'error', 'th'] | False |
wait_for_element_absent | (driver, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT) |
Searches for the specified element by the given selector.
Raises an exception if the element is still present after the
specified timeout.
@Params
driver - the webdriver object
selector - the locator for identifying the page element (required)
by - the type of selector being used (Default: ... |
Searches for the specified element by the given selector.
Raises an exception if the element is still present after the
specified timeout.
| def wait_for_element_absent(driver, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT):
"""
Searches for the specified element by the given selector.
Raises an exception if the element is still present after the
specified timeout.
@Params
driver - the webdr... | [
"def",
"wait_for_element_absent",
"(",
"driver",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"start_ms",
"=",
"time",
".",
"time",
"(",
")",
"*",
"1000.0",
"stop_ms",
"=",
"... | [
388,
0
] | [
418,
41
] | python | en | ['en', 'error', 'th'] | False |
wait_for_element_not_visible | (driver, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT) |
Searches for the specified element by the given selector.
Raises an exception if the element is still visible after the
specified timeout.
@Params
driver - the webdriver object (required)
selector - the locator for identifying the page element (required)
by - the type of selector being used... |
Searches for the specified element by the given selector.
Raises an exception if the element is still visible after the
specified timeout.
| def wait_for_element_not_visible(driver, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT):
"""
Searches for the specified element by the given selector.
Raises an exception if the element is still visible after the
specified timeout.
@Params
driver -... | [
"def",
"wait_for_element_not_visible",
"(",
"driver",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"start_ms",
"=",
"time",
".",
"time",
"(",
")",
"*",
"1000.0",
"stop_ms",
"="... | [
421,
0
] | [
454,
41
] | python | en | ['en', 'error', 'th'] | False |
wait_for_text_not_visible | (driver, text, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT) |
Searches for the text in the element of the given selector on the page.
Returns True if the text is not visible on the page within the timeout.
Raises an exception if the text is still present after the timeout.
@Params
driver - the webdriver object (required)
text - the text that is being sear... |
Searches for the text in the element of the given selector on the page.
Returns True if the text is not visible on the page within the timeout.
Raises an exception if the text is still present after the timeout.
| def wait_for_text_not_visible(driver, text, selector, by=By.CSS_SELECTOR,
timeout=settings.LARGE_TIMEOUT):
"""
Searches for the text in the element of the given selector on the page.
Returns True if the text is not visible on the page within the timeout.
Raises an exception... | [
"def",
"wait_for_text_not_visible",
"(",
"driver",
",",
"text",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"start_ms",
"=",
"time",
".",
"time",
"(",
")",
"*",
"1000.0",
"s... | [
457,
0
] | [
488,
41
] | python | en | ['en', 'error', 'th'] | False |
find_visible_elements | (driver, selector, by=By.CSS_SELECTOR) |
Finds all WebElements that match a selector and are visible.
Similar to webdriver.find_elements.
@Params
driver - the webdriver object (required)
selector - the locator for identifying the page element (required)
by - the type of selector being used (Default: By.CSS_SELECTOR)
|
Finds all WebElements that match a selector and are visible.
Similar to webdriver.find_elements.
| def find_visible_elements(driver, selector, by=By.CSS_SELECTOR):
"""
Finds all WebElements that match a selector and are visible.
Similar to webdriver.find_elements.
@Params
driver - the webdriver object (required)
selector - the locator for identifying the page element (required)
by - the t... | [
"def",
"find_visible_elements",
"(",
"driver",
",",
"selector",
",",
"by",
"=",
"By",
".",
"CSS_SELECTOR",
")",
":",
"elements",
"=",
"driver",
".",
"find_elements",
"(",
"by",
"=",
"by",
",",
"value",
"=",
"selector",
")",
"try",
":",
"v_elems",
"=",
... | [
491,
0
] | [
511,
22
] | python | en | ['en', 'error', 'th'] | False |
save_screenshot | (driver, name, folder=None) |
Saves a screenshot to the current directory (or to a subfolder if provided)
If the folder provided doesn't exist, it will get created.
The screenshot will be in PNG format.
|
Saves a screenshot to the current directory (or to a subfolder if provided)
If the folder provided doesn't exist, it will get created.
The screenshot will be in PNG format.
| def save_screenshot(driver, name, folder=None):
"""
Saves a screenshot to the current directory (or to a subfolder if provided)
If the folder provided doesn't exist, it will get created.
The screenshot will be in PNG format.
"""
if not name.endswith(".png"):
name = name + ".png"
if f... | [
"def",
"save_screenshot",
"(",
"driver",
",",
"name",
",",
"folder",
"=",
"None",
")",
":",
"if",
"not",
"name",
".",
"endswith",
"(",
"\".png\"",
")",
":",
"name",
"=",
"name",
"+",
"\".png\"",
"if",
"folder",
":",
"abs_path",
"=",
"os",
".",
"path"... | [
514,
0
] | [
539,
16
] | python | en | ['en', 'error', 'th'] | False |
save_page_source | (driver, name, folder=None) |
Saves the page HTML to the current directory (or given subfolder).
If the folder specified doesn't exist, it will get created.
@Params
name - The file name to save the current page's HTML to.
folder - The folder to save the file to. (Default = current folder)
|
Saves the page HTML to the current directory (or given subfolder).
If the folder specified doesn't exist, it will get created.
| def save_page_source(driver, name, folder=None):
"""
Saves the page HTML to the current directory (or given subfolder).
If the folder specified doesn't exist, it will get created.
@Params
name - The file name to save the current page's HTML to.
folder - The folder to save the file to. (Default =... | [
"def",
"save_page_source",
"(",
"driver",
",",
"name",
",",
"folder",
"=",
"None",
")",
":",
"if",
"not",
"name",
".",
"endswith",
"(",
"\".html\"",
")",
":",
"name",
"=",
"name",
"+",
"\".html\"",
"if",
"folder",
":",
"abs_path",
"=",
"os",
".",
"pa... | [
542,
0
] | [
565,
21
] | python | en | ['en', 'error', 'th'] | False |
save_test_failure_data | (driver, name, browser_type, folder=None) |
Saves failure data to the current directory (or to a subfolder if provided)
If the folder provided doesn't exist, it will get created.
|
Saves failure data to the current directory (or to a subfolder if provided)
If the folder provided doesn't exist, it will get created.
| def save_test_failure_data(driver, name, browser_type, folder=None):
"""
Saves failure data to the current directory (or to a subfolder if provided)
If the folder provided doesn't exist, it will get created.
"""
import traceback
if folder:
abs_path = os.path.abspath('.')
file_pat... | [
"def",
"save_test_failure_data",
"(",
"driver",
",",
"name",
",",
"browser_type",
",",
"folder",
"=",
"None",
")",
":",
"import",
"traceback",
"if",
"folder",
":",
"abs_path",
"=",
"os",
".",
"path",
".",
"abspath",
"(",
"'.'",
")",
"file_path",
"=",
"ab... | [
578,
0
] | [
602,
29
] | python | en | ['en', 'error', 'th'] | False |
wait_for_and_accept_alert | (driver, timeout=settings.LARGE_TIMEOUT) |
Wait for and accept an alert. Returns the text from the alert.
@Params
driver - the webdriver object (required)
timeout - the time to wait for the alert in seconds
|
Wait for and accept an alert. Returns the text from the alert.
| def wait_for_and_accept_alert(driver, timeout=settings.LARGE_TIMEOUT):
"""
Wait for and accept an alert. Returns the text from the alert.
@Params
driver - the webdriver object (required)
timeout - the time to wait for the alert in seconds
"""
alert = wait_for_and_switch_to_alert(driver, time... | [
"def",
"wait_for_and_accept_alert",
"(",
"driver",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"alert",
"=",
"wait_for_and_switch_to_alert",
"(",
"driver",
",",
"timeout",
")",
"alert_text",
"=",
"alert",
".",
"text",
"alert",
".",
"accept",... | [
605,
0
] | [
615,
21
] | python | en | ['en', 'error', 'th'] | False |
wait_for_and_dismiss_alert | (driver, timeout=settings.LARGE_TIMEOUT) |
Wait for and dismiss an alert. Returns the text from the alert.
@Params
driver - the webdriver object (required)
timeout - the time to wait for the alert in seconds
|
Wait for and dismiss an alert. Returns the text from the alert.
| def wait_for_and_dismiss_alert(driver, timeout=settings.LARGE_TIMEOUT):
"""
Wait for and dismiss an alert. Returns the text from the alert.
@Params
driver - the webdriver object (required)
timeout - the time to wait for the alert in seconds
"""
alert = wait_for_and_switch_to_alert(driver, ti... | [
"def",
"wait_for_and_dismiss_alert",
"(",
"driver",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"alert",
"=",
"wait_for_and_switch_to_alert",
"(",
"driver",
",",
"timeout",
")",
"alert_text",
"=",
"alert",
".",
"text",
"alert",
".",
"dismiss... | [
618,
0
] | [
628,
21
] | python | en | ['en', 'error', 'th'] | False |
wait_for_and_switch_to_alert | (driver, timeout=settings.LARGE_TIMEOUT) |
Wait for a browser alert to appear, and switch to it. This should be usable
as a drop-in replacement for driver.switch_to.alert when the alert box
may not exist yet.
@Params
driver - the webdriver object (required)
timeout - the time to wait for the alert in seconds
|
Wait for a browser alert to appear, and switch to it. This should be usable
as a drop-in replacement for driver.switch_to.alert when the alert box
may not exist yet.
| def wait_for_and_switch_to_alert(driver, timeout=settings.LARGE_TIMEOUT):
"""
Wait for a browser alert to appear, and switch to it. This should be usable
as a drop-in replacement for driver.switch_to.alert when the alert box
may not exist yet.
@Params
driver - the webdriver object (required)
... | [
"def",
"wait_for_and_switch_to_alert",
"(",
"driver",
",",
"timeout",
"=",
"settings",
".",
"LARGE_TIMEOUT",
")",
":",
"start_ms",
"=",
"time",
".",
"time",
"(",
")",
"*",
"1000.0",
"stop_ms",
"=",
"start_ms",
"+",
"(",
"timeout",
"*",
"1000.0",
")",
"for"... | [
631,
0
] | [
656,
41
] | python | en | ['en', 'error', 'th'] | False |
switch_to_frame | (driver, frame, timeout=settings.SMALL_TIMEOUT) |
Wait for an iframe to appear, and switch to it. This should be
usable as a drop-in replacement for driver.switch_to.frame().
@Params
driver - the webdriver object (required)
frame - the frame element, name, id, index, or selector
timeout - the time to wait for the alert in seconds
|
Wait for an iframe to appear, and switch to it. This should be
usable as a drop-in replacement for driver.switch_to.frame().
| def switch_to_frame(driver, frame, timeout=settings.SMALL_TIMEOUT):
"""
Wait for an iframe to appear, and switch to it. This should be
usable as a drop-in replacement for driver.switch_to.frame().
@Params
driver - the webdriver object (required)
frame - the frame element, name, id, index, or sel... | [
"def",
"switch_to_frame",
"(",
"driver",
",",
"frame",
",",
"timeout",
"=",
"settings",
".",
"SMALL_TIMEOUT",
")",
":",
"start_ms",
"=",
"time",
".",
"time",
"(",
")",
"*",
"1000.0",
"stop_ms",
"=",
"start_ms",
"+",
"(",
"timeout",
"*",
"1000.0",
")",
... | [
659,
0
] | [
699,
41
] | python | en | ['en', 'error', 'th'] | False |
switch_to_window | (driver, window, timeout=settings.SMALL_TIMEOUT) |
Wait for a window to appear, and switch to it. This should be usable
as a drop-in replacement for driver.switch_to.window().
@Params
driver - the webdriver object (required)
window - the window index or window handle
timeout - the time to wait for the window in seconds
|
Wait for a window to appear, and switch to it. This should be usable
as a drop-in replacement for driver.switch_to.window().
| def switch_to_window(driver, window, timeout=settings.SMALL_TIMEOUT):
"""
Wait for a window to appear, and switch to it. This should be usable
as a drop-in replacement for driver.switch_to.window().
@Params
driver - the webdriver object (required)
window - the window index or window handle
t... | [
"def",
"switch_to_window",
"(",
"driver",
",",
"window",
",",
"timeout",
"=",
"settings",
".",
"SMALL_TIMEOUT",
")",
":",
"start_ms",
"=",
"time",
".",
"time",
"(",
")",
"*",
"1000.0",
"stop_ms",
"=",
"start_ms",
"+",
"(",
"timeout",
"*",
"1000.0",
")",
... | [
702,
0
] | [
750,
45
] | python | en | ['en', 'error', 'th'] | False |
Mark.cli_as_experimental | (func: Callable) | Apply as a decorator to CLI commands that are Experimental. | Apply as a decorator to CLI commands that are Experimental. | def cli_as_experimental(func: Callable) -> Callable:
"""Apply as a decorator to CLI commands that are Experimental."""
@wraps(func)
def wrapper(*args, **kwargs):
cli_message(
"<yellow>Heads up! This feature is Experimental. It may change. "
"Please gi... | [
"def",
"cli_as_experimental",
"(",
"func",
":",
"Callable",
")",
"->",
"Callable",
":",
"@",
"wraps",
"(",
"func",
")",
"def",
"wrapper",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"cli_message",
"(",
"\"<yellow>Heads up! This feature is Experimental... | [
18,
4
] | [
29,
22
] | python | en | ['en', 'en', 'en'] | True |
Mark.cli_as_beta | (func: Callable) | Apply as a decorator to CLI commands that are beta. | Apply as a decorator to CLI commands that are beta. | def cli_as_beta(func: Callable) -> Callable:
"""Apply as a decorator to CLI commands that are beta."""
@wraps(func)
def wrapper(*args, **kwargs):
cli_message(
"<yellow>Heads up! This feature is in Beta. Please give us "
"your feedback!</yellow>"
... | [
"def",
"cli_as_beta",
"(",
"func",
":",
"Callable",
")",
"->",
"Callable",
":",
"@",
"wraps",
"(",
"func",
")",
"def",
"wrapper",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"cli_message",
"(",
"\"<yellow>Heads up! This feature is in Beta. Please give... | [
32,
4
] | [
43,
22
] | python | en | ['en', 'en', 'en'] | True |
Mark.cli_as_deprecation | (
message: str = "<yellow>Heads up! This feature will be deprecated in the next major release</yellow>",
) | Apply as a decorator to CLI commands that will be deprecated. | Apply as a decorator to CLI commands that will be deprecated. | def cli_as_deprecation(
message: str = "<yellow>Heads up! This feature will be deprecated in the next major release</yellow>",
) -> Callable:
"""Apply as a decorator to CLI commands that will be deprecated."""
def inner_decorator(func):
@wraps(func)
def wrapped(*args... | [
"def",
"cli_as_deprecation",
"(",
"message",
":",
"str",
"=",
"\"<yellow>Heads up! This feature will be deprecated in the next major release</yellow>\"",
",",
")",
"->",
"Callable",
":",
"def",
"inner_decorator",
"(",
"func",
")",
":",
"@",
"wraps",
"(",
"func",
")",
... | [
46,
4
] | [
59,
30
] | python | en | ['en', 'en', 'en'] | True |
test_expect_column_values_to_be_of_type | (spark_session, test_dataframe) |
data asset expectation
|
data asset expectation
| def test_expect_column_values_to_be_of_type(spark_session, test_dataframe):
"""
data asset expectation
"""
from pyspark.sql.utils import AnalysisException
assert test_dataframe.expect_column_values_to_be_of_type(
"address.street", "StringType"
).success
assert test_dataframe.expect_... | [
"def",
"test_expect_column_values_to_be_of_type",
"(",
"spark_session",
",",
"test_dataframe",
")",
":",
"from",
"pyspark",
".",
"sql",
".",
"utils",
"import",
"AnalysisException",
"assert",
"test_dataframe",
".",
"expect_column_values_to_be_of_type",
"(",
"\"address.street... | [
122,
0
] | [
138,
85
] | python | en | ['en', 'error', 'th'] | False |
test_expect_column_values_to_be_of_type | (spark_session, test_dataframe) |
data asset expectation
|
data asset expectation
| def test_expect_column_values_to_be_of_type(spark_session, test_dataframe):
"""
data asset expectation
"""
from pyspark.sql.utils import AnalysisException
assert test_dataframe.expect_column_values_to_be_of_type(
"address.street", "StringType"
).success
assert test_dataframe.expect_... | [
"def",
"test_expect_column_values_to_be_of_type",
"(",
"spark_session",
",",
"test_dataframe",
")",
":",
"from",
"pyspark",
".",
"sql",
".",
"utils",
"import",
"AnalysisException",
"assert",
"test_dataframe",
".",
"expect_column_values_to_be_of_type",
"(",
"\"address.street... | [
145,
0
] | [
161,
85
] | python | en | ['en', 'error', 'th'] | False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.