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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
substitute_value_from_azure_keyvault | (value) |
This methods uses a azure.identity.DefaultAzureCredential to authenticate to the Azure SDK for Python
and a azure.keyvault.secrets.SecretClient to try to retrieve the secret value from the elements
it is able to parse from the input value.
- value: string with pattern ``secret|https://${vault_name}.va... |
This methods uses a azure.identity.DefaultAzureCredential to authenticate to the Azure SDK for Python
and a azure.keyvault.secrets.SecretClient to try to retrieve the secret value from the elements
it is able to parse from the input value. | def substitute_value_from_azure_keyvault(value):
"""
This methods uses a azure.identity.DefaultAzureCredential to authenticate to the Azure SDK for Python
and a azure.keyvault.secrets.SecretClient to try to retrieve the secret value from the elements
it is able to parse from the input value.
- valu... | [
"def",
"substitute_value_from_azure_keyvault",
"(",
"value",
")",
":",
"regex",
"=",
"re",
".",
"compile",
"(",
"r\"^secret\\|(https:\\/\\/[a-zA-Z0-9\\-]{3,24}\\.vault\\.azure\\.net)\\/secrets\\/([0-9a-zA-Z-]+)\"",
"r\"(?:\\/([a-f0-9]{32}))?(?:\\|([^\\|]+))?$\"",
")",
"if",
"not",
... | [
398,
0
] | [
444,
17
] | python | en | ['en', 'error', 'th'] | False |
substitute_all_config_variables | (
data, replace_variables_dict, dollar_sign_escape_string: str = r"\$"
) |
Substitute all config variables of the form ${SOME_VARIABLE} in a dictionary-like
config object for their values.
The method traverses the dictionary recursively.
:param data:
:param replace_variables_dict:
:return: a dictionary with all the variables replaced with their values
|
Substitute all config variables of the form ${SOME_VARIABLE} in a dictionary-like
config object for their values. | def substitute_all_config_variables(
data, replace_variables_dict, dollar_sign_escape_string: str = r"\$"
):
"""
Substitute all config variables of the form ${SOME_VARIABLE} in a dictionary-like
config object for their values.
The method traverses the dictionary recursively.
:param data:
:... | [
"def",
"substitute_all_config_variables",
"(",
"data",
",",
"replace_variables_dict",
",",
"dollar_sign_escape_string",
":",
"str",
"=",
"r\"\\$\"",
")",
":",
"if",
"isinstance",
"(",
"data",
",",
"DataContextConfig",
")",
":",
"data",
"=",
"DataContextConfigSchema",
... | [
447,
0
] | [
477,
5
] | python | en | ['en', 'error', 'th'] | False |
file_relative_path | (dunderfile, relative_path) |
This function is useful when one needs to load a file that is
relative to the position of the current file. (Such as when
you encode a configuration file path in source file and want
in runnable in any current working directory)
It is meant to be used like the following:
file_relative_path(__f... |
This function is useful when one needs to load a file that is
relative to the position of the current file. (Such as when
you encode a configuration file path in source file and want
in runnable in any current working directory) | def file_relative_path(dunderfile, relative_path):
"""
This function is useful when one needs to load a file that is
relative to the position of the current file. (Such as when
you encode a configuration file path in source file and want
in runnable in any current working directory)
It is meant... | [
"def",
"file_relative_path",
"(",
"dunderfile",
",",
"relative_path",
")",
":",
"return",
"os",
".",
"path",
".",
"join",
"(",
"os",
".",
"path",
".",
"dirname",
"(",
"dunderfile",
")",
",",
"relative_path",
")"
] | [
480,
0
] | [
492,
67
] | python | en | ['en', 'error', 'th'] | False |
parse_substitution_variable | (substitution_variable: str) |
Parse and check whether the string contains a substitution variable of the case insensitive form ${SOME_VAR} or $SOME_VAR
Args:
substitution_variable: string to be parsed
Returns:
string of variable name e.g. SOME_VAR or None if not parsable. If there are multiple substitution variables th... |
Parse and check whether the string contains a substitution variable of the case insensitive form ${SOME_VAR} or $SOME_VAR
Args:
substitution_variable: string to be parsed | def parse_substitution_variable(substitution_variable: str) -> Optional[str]:
"""
Parse and check whether the string contains a substitution variable of the case insensitive form ${SOME_VAR} or $SOME_VAR
Args:
substitution_variable: string to be parsed
Returns:
string of variable name e... | [
"def",
"parse_substitution_variable",
"(",
"substitution_variable",
":",
"str",
")",
"->",
"Optional",
"[",
"str",
"]",
":",
"substitution_variable_name",
"=",
"pp",
".",
"Word",
"(",
"pp",
".",
"alphanums",
"+",
"\"_\"",
")",
".",
"setResultsName",
"(",
"\"su... | [
495,
0
] | [
514,
19
] | python | en | ['en', 'error', 'th'] | False |
PasswordMasker.mask_db_url | (url: str, use_urlparse: bool = False, **kwargs) |
Mask password in database url.
Uses sqlalchemy engine parsing if sqlalchemy is installed, otherwise defaults to using urlparse from the stdlib which does not handle kwargs.
Args:
url: Database url e.g. "postgresql+psycopg2://username:password@host:65432/database"
use_url... |
Mask password in database url.
Uses sqlalchemy engine parsing if sqlalchemy is installed, otherwise defaults to using urlparse from the stdlib which does not handle kwargs.
Args:
url: Database url e.g. "postgresql+psycopg2://username:password@host:65432/database"
use_url... | def mask_db_url(url: str, use_urlparse: bool = False, **kwargs) -> str:
"""
Mask password in database url.
Uses sqlalchemy engine parsing if sqlalchemy is installed, otherwise defaults to using urlparse from the stdlib which does not handle kwargs.
Args:
url: Database url e.g... | [
"def",
"mask_db_url",
"(",
"url",
":",
"str",
",",
"use_urlparse",
":",
"bool",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
"->",
"str",
":",
"if",
"sa",
"is",
"not",
"None",
"and",
"use_urlparse",
"is",
"False",
":",
"engine",
"=",
"sa",
".",
"cre... | [
539,
4
] | [
584,
29
] | python | en | ['en', 'error', 'th'] | False |
InferredAssetFilePathDataConnector.__init__ | (
self,
name: str,
datasource_name: str,
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. This class supports the configuration of default_regex
and sorters for filtering and sorting data_references.
Args:
name (str): name of ConfiguredAssetFilePathDataConnector
datasource_name (str): Name o... |
Base class for DataConnectors that connect to filesystem-like data. This class supports the configuration of default_regex
and sorters for filtering and sorting data_references. | def __init__(
self,
name: str,
datasource_name: str,
execution_engine: Optional[ExecutionEngine] = None,
default_regex: Optional[dict] = None,
sorters: Optional[list] = None,
batch_spec_passthrough: Optional[dict] = None,
):
"""
Base class for ... | [
"def",
"__init__",
"(",
"self",
",",
"name",
":",
"str",
",",
"datasource_name",
":",
"str",
",",
"execution_engine",
":",
"Optional",
"[",
"ExecutionEngine",
"]",
"=",
"None",
",",
"default_regex",
":",
"Optional",
"[",
"dict",
"]",
"=",
"None",
",",
"s... | [
26,
4
] | [
56,
9
] | python | en | ['en', 'error', 'th'] | False |
InferredAssetFilePathDataConnector._refresh_data_references_cache | (self) | refreshes data_reference cache | refreshes data_reference cache | def _refresh_data_references_cache(self):
"""refreshes data_reference cache"""
# Map data_references to batch_definitions
self._data_references_cache = {}
for data_reference in self._get_data_reference_list():
mapped_batch_definition_list: List[
BatchDefiniti... | [
"def",
"_refresh_data_references_cache",
"(",
"self",
")",
":",
"# Map data_references to batch_definitions",
"self",
".",
"_data_references_cache",
"=",
"{",
"}",
"for",
"data_reference",
"in",
"self",
".",
"_get_data_reference_list",
"(",
")",
":",
"mapped_batch_definit... | [
58,
4
] | [
69,
86
] | python | en | ['fr', 'en', 'en'] | True |
InferredAssetFilePathDataConnector.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
"""
return len(se... | [
"def",
"get_data_reference_list_count",
"(",
"self",
")",
"->",
"int",
":",
"return",
"len",
"(",
"self",
".",
"_data_references_cache",
")"
] | [
71,
4
] | [
79,
47
] | python | en | ['en', 'error', 'th'] | False |
InferredAssetFilePathDataConnector.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_references 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_references 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_references that do not have an associated data_asset.
Returns:
list of data_referenc... | [
"def",
"get_unmatched_data_references",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"return",
"[",
"k",
"for",
"k",
",",
"v",
"in",
"self",
".",
"_data_references_cache",
".",
"items",
"(",
")",
"if",
"v",
"is",
"None",
"]"
] | [
81,
4
] | [
89,
79
] | python | en | ['en', 'error', 'th'] | False |
InferredAssetFilePathDataConnector.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
"""
if len(self._data_references_cache) == 0:
self._refresh_data_references_cache()
# This wi... | [
"def",
"get_available_data_asset_names",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"if",
"len",
"(",
"self",
".",
"_data_references_cache",
")",
"==",
"0",
":",
"self",
".",
"_refresh_data_references_cache",
"(",
")",
"# This will fetch ALL batch_defin... | [
91,
4
] | [
115,
42
] | python | en | ['en', 'error', 'th'] | False |
InferredAssetFilePathDataConnector.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",
":",
"batch_spec",
":",
"BatchSpec",
"=",
"super",
"(",
")",
".",
"build_batch_spec",
"(",
"batch_definition",
"=",
"batch_definition",
")",
"retur... | [
117,
4
] | [
131,
40
] | python | en | ['en', 'error', 'th'] | False |
test_alice_columnar_table_single_batch_batches_are_accessible | (
monkeypatch,
alice_columnar_table_single_batch_context,
alice_columnar_table_single_batch,
) |
What does this test and why?
Batches created in the multibatch_generic_csv_generator fixture should be available using the
multibatch_generic_csv_generator_context
This test most likely duplicates tests elsewhere, but it is more of a test of the configurable fixture.
|
What does this test and why?
Batches created in the multibatch_generic_csv_generator fixture should be available using the
multibatch_generic_csv_generator_context
This test most likely duplicates tests elsewhere, but it is more of a test of the configurable fixture.
| def test_alice_columnar_table_single_batch_batches_are_accessible(
monkeypatch,
alice_columnar_table_single_batch_context,
alice_columnar_table_single_batch,
):
"""
What does this test and why?
Batches created in the multibatch_generic_csv_generator fixture should be available using the
mult... | [
"def",
"test_alice_columnar_table_single_batch_batches_are_accessible",
"(",
"monkeypatch",
",",
"alice_columnar_table_single_batch_context",
",",
"alice_columnar_table_single_batch",
",",
")",
":",
"context",
":",
"DataContext",
"=",
"alice_columnar_table_single_batch_context",
"dat... | [
21,
0
] | [
69,
27
] | python | en | ['en', 'error', 'th'] | False |
test_bobby_columnar_table_multi_batch_batches_are_accessible | (
monkeypatch,
bobby_columnar_table_multi_batch_deterministic_data_context,
bobby_columnar_table_multi_batch,
) |
What does this test and why?
Batches created in the multibatch_generic_csv_generator fixture should be available using the
multibatch_generic_csv_generator_context
This test most likely duplicates tests elsewhere, but it is more of a test of the configurable fixture.
|
What does this test and why?
Batches created in the multibatch_generic_csv_generator fixture should be available using the
multibatch_generic_csv_generator_context
This test most likely duplicates tests elsewhere, but it is more of a test of the configurable fixture.
| def test_bobby_columnar_table_multi_batch_batches_are_accessible(
monkeypatch,
bobby_columnar_table_multi_batch_deterministic_data_context,
bobby_columnar_table_multi_batch,
):
"""
What does this test and why?
Batches created in the multibatch_generic_csv_generator fixture should be available us... | [
"def",
"test_bobby_columnar_table_multi_batch_batches_are_accessible",
"(",
"monkeypatch",
",",
"bobby_columnar_table_multi_batch_deterministic_data_context",
",",
"bobby_columnar_table_multi_batch",
",",
")",
":",
"context",
":",
"DataContext",
"=",
"bobby_columnar_table_multi_batch_d... | [
104,
0
] | [
169,
21
] | python | en | ['en', 'error', 'th'] | False |
column_function_partial | (
engine: Type[ExecutionEngine], partial_fn_type: str = None, **kwargs
) | Provides engine-specific support for authing a metric_fn with a simplified signature.
A metric function that is decorated as a column_function_partial will be called with the engine-specific column type
and any value_kwargs associated with the Metric for which the provider function is being declared.
Args... | Provides engine-specific support for authing a metric_fn with a simplified signature. | def column_function_partial(
engine: Type[ExecutionEngine], partial_fn_type: str = None, **kwargs
):
"""Provides engine-specific support for authing a metric_fn with a simplified signature.
A metric function that is decorated as a column_function_partial will be called with the engine-specific column type
... | [
"def",
"column_function_partial",
"(",
"engine",
":",
"Type",
"[",
"ExecutionEngine",
"]",
",",
"partial_fn_type",
":",
"str",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"domain_type",
"=",
"MetricDomainTypes",
".",
"COLUMN",
"if",
"issubclass",
"(",
"e... | [
38,
0
] | [
249,
74
] | python | en | ['en', 'en', 'en'] | True |
column_condition_partial | (
engine: Type[ExecutionEngine],
partial_fn_type: Optional[Union[str, MetricPartialFunctionTypes]] = None,
**kwargs,
) | Provides engine-specific support for authing a metric_fn with a simplified signature. A column_condition_partial
must provide a map function that evalues to a boolean value; it will be used to provide supplemental metrics, such
as the unexpected_value count, unexpected_values, and unexpected_rows.
A metric... | Provides engine-specific support for authing a metric_fn with a simplified signature. A column_condition_partial
must provide a map function that evalues to a boolean value; it will be used to provide supplemental metrics, such
as the unexpected_value count, unexpected_values, and unexpected_rows. | def column_condition_partial(
engine: Type[ExecutionEngine],
partial_fn_type: Optional[Union[str, MetricPartialFunctionTypes]] = None,
**kwargs,
):
"""Provides engine-specific support for authing a metric_fn with a simplified signature. A column_condition_partial
must provide a map function that eva... | [
"def",
"column_condition_partial",
"(",
"engine",
":",
"Type",
"[",
"ExecutionEngine",
"]",
",",
"partial_fn_type",
":",
"Optional",
"[",
"Union",
"[",
"str",
",",
"MetricPartialFunctionTypes",
"]",
"]",
"=",
"None",
",",
"*",
"*",
"kwargs",
",",
")",
":",
... | [
252,
0
] | [
495,
75
] | python | en | ['en', 'en', 'en'] | True |
_pandas_map_condition_unexpected_count | (
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) | Returns unexpected count for MapExpectations | Returns unexpected count for MapExpectations | def _pandas_map_condition_unexpected_count(
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""Returns unexpected count for MapExpectations"""
return np.count_nonzero(metrics["unexpected_condition"... | [
"def",
"_pandas_map_condition_unexpected_count",
"(",
"cls",
",",
"execution_engine",
":",
"PandasExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
",",
"*... | [
498,
0
] | [
507,
63
] | python | en | ['en', 'en', 'en'] | True |
_pandas_column_map_condition_values | (
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) | Return values from the specified domain that match the map-style metric in the metrics dictionary. | Return values from the specified domain that match the map-style metric in the metrics dictionary. | def _pandas_column_map_condition_values(
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""Return values from the specified domain that match the map-style metric in the metrics dictionary."""
(
... | [
"def",
"_pandas_column_map_condition_values",
"(",
"cls",
",",
"execution_engine",
":",
"PandasExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
",",
"*",
... | [
510,
0
] | [
562,
79
] | python | en | ['en', 'en', 'en'] | True |
_pandas_column_map_series_and_domain_values | (
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) | Return values from the specified domain that match the map-style metric in the metrics dictionary. | Return values from the specified domain that match the map-style metric in the metrics dictionary. | def _pandas_column_map_series_and_domain_values(
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""Return values from the specified domain that match the map-style metric in the metrics dictionary."""... | [
"def",
"_pandas_column_map_series_and_domain_values",
"(",
"cls",
",",
"execution_engine",
":",
"PandasExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
",",... | [
565,
0
] | [
635,
9
] | python | en | ['en', 'en', 'en'] | True |
_pandas_column_map_condition_value_counts | (
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) | Returns respective value counts for distinct column values | Returns respective value counts for distinct column values | def _pandas_column_map_condition_value_counts(
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""Returns respective value counts for distinct column values"""
(
boolean_mapped_unexpected_v... | [
"def",
"_pandas_column_map_condition_value_counts",
"(",
"cls",
",",
"execution_engine",
":",
"PandasExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
",",
... | [
687,
0
] | [
753,
70
] | python | da | ['da', 'fr', 'en'] | False |
_pandas_map_condition_rows | (
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) | Return values from the specified domain (ignoring the column constraint) that match the map-style metric in the metrics dictionary. | Return values from the specified domain (ignoring the column constraint) that match the map-style metric in the metrics dictionary. | def _pandas_map_condition_rows(
cls,
execution_engine: PandasExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""Return values from the specified domain (ignoring the column constraint) that match the map-style metric in the metric... | [
"def",
"_pandas_map_condition_rows",
"(",
"cls",
",",
"execution_engine",
":",
"PandasExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
",",
"*",
"*",
... | [
756,
0
] | [
803,
63
] | python | en | ['en', 'en', 'en'] | True |
_sqlalchemy_map_condition_unexpected_count_aggregate_fn | (
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) | Returns unexpected count for MapExpectations | Returns unexpected count for MapExpectations | def _sqlalchemy_map_condition_unexpected_count_aggregate_fn(
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""Returns unexpected count for MapExpectations"""
unexpected_condition, compute_dom... | [
"def",
"_sqlalchemy_map_condition_unexpected_count_aggregate_fn",
"(",
"cls",
",",
"execution_engine",
":",
"SqlAlchemyExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any... | [
806,
0
] | [
827,
5
] | python | en | ['en', 'en', 'en'] | True |
_sqlalchemy_map_condition_unexpected_count_value | (
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) | Returns unexpected count for MapExpectations. This is a *value* metric, which is useful for
when the unexpected_condition is a window function.
| Returns unexpected count for MapExpectations. This is a *value* metric, which is useful for
when the unexpected_condition is a window function.
| def _sqlalchemy_map_condition_unexpected_count_value(
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""Returns unexpected count for MapExpectations. This is a *value* metric, which is useful for
... | [
"def",
"_sqlalchemy_map_condition_unexpected_count_value",
"(",
"cls",
",",
"execution_engine",
":",
"SqlAlchemyExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any",
"]... | [
830,
0
] | [
908,
57
] | python | en | ['en', 'en', 'en'] | True |
_sqlalchemy_column_map_condition_values | (
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) |
Particularly for the purpose of finding unexpected values, returns all the metric values which do not meet an
expected Expectation condition for ColumnMapExpectation Expectations.
|
Particularly for the purpose of finding unexpected values, returns all the metric values which do not meet an
expected Expectation condition for ColumnMapExpectation Expectations.
| def _sqlalchemy_column_map_condition_values(
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""
Particularly for the purpose of finding unexpected values, returns all the metric values which d... | [
"def",
"_sqlalchemy_column_map_condition_values",
"(",
"cls",
",",
"execution_engine",
":",
"SqlAlchemyExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
",",... | [
911,
0
] | [
955,
5
] | python | en | ['en', 'error', 'th'] | False |
_sqlalchemy_column_map_condition_value_counts | (
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) |
Returns value counts for all the metric values which do not meet an expected Expectation condition for instances
of ColumnMapExpectation.
|
Returns value counts for all the metric values which do not meet an expected Expectation condition for instances
of ColumnMapExpectation.
| def _sqlalchemy_column_map_condition_value_counts(
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""
Returns value counts for all the metric values which do not meet an expected Expectation c... | [
"def",
"_sqlalchemy_column_map_condition_value_counts",
"(",
"cls",
",",
"execution_engine",
":",
"SqlAlchemyExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
... | [
958,
0
] | [
996,
16
] | python | en | ['en', 'error', 'th'] | False |
_sqlalchemy_map_condition_rows | (
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
) |
Returns all rows of the metric values which do not meet an expected Expectation condition for instances
of ColumnMapExpectation.
|
Returns all rows of the metric values which do not meet an expected Expectation condition for instances
of ColumnMapExpectation.
| def _sqlalchemy_map_condition_rows(
cls,
execution_engine: SqlAlchemyExecutionEngine,
metric_domain_kwargs: Dict,
metric_value_kwargs: Dict,
metrics: Dict[str, Any],
**kwargs,
):
"""
Returns all rows of the metric values which do not meet an expected Expectation condition for instances
... | [
"def",
"_sqlalchemy_map_condition_rows",
"(",
"cls",
",",
"execution_engine",
":",
"SqlAlchemyExecutionEngine",
",",
"metric_domain_kwargs",
":",
"Dict",
",",
"metric_value_kwargs",
":",
"Dict",
",",
"metrics",
":",
"Dict",
"[",
"str",
",",
"Any",
"]",
",",
"*",
... | [
999,
0
] | [
1028,
75
] | python | en | ['en', 'error', 'th'] | False |
serve_listeners | (
handler, listeners, *, handler_nursery=None, task_status=trio.TASK_STATUS_IGNORED
) | r"""Listen for incoming connections on ``listeners``, and for each one
start a task running ``handler(stream)``.
.. warning::
If ``handler`` raises an exception, then this function doesn't do
anything special to catch it – so by default the exception will
propagate out and crash your serv... | r"""Listen for incoming connections on ``listeners``, and for each one
start a task running ``handler(stream)``. | async def serve_listeners(
handler, listeners, *, handler_nursery=None, task_status=trio.TASK_STATUS_IGNORED
):
r"""Listen for incoming connections on ``listeners``, and for each one
start a task running ``handler(stream)``.
.. warning::
If ``handler`` raises an exception, then this function do... | [
"async",
"def",
"serve_listeners",
"(",
"handler",
",",
"listeners",
",",
"*",
",",
"handler_nursery",
"=",
"None",
",",
"task_status",
"=",
"trio",
".",
"TASK_STATUS_IGNORED",
")",
":",
"async",
"with",
"trio",
".",
"open_nursery",
"(",
")",
"as",
"nursery"... | [
50,
0
] | [
120,
38
] | python | en | ['en', 'en', 'en'] | True |
_get_fields | (attrs, field_class, pop=False, ordered=False) | Get fields from a class. If ordered=True, fields will sorted by creation index.
:param attrs: Mapping of class attributes
:param type field_class: Base field class
:param bool pop: Remove matching fields
| Get fields from a class. If ordered=True, fields will sorted by creation index. | def _get_fields(attrs, field_class, pop=False, ordered=False):
"""Get fields from a class. If ordered=True, fields will sorted by creation index.
:param attrs: Mapping of class attributes
:param type field_class: Base field class
:param bool pop: Remove matching fields
"""
fields = [
(f... | [
"def",
"_get_fields",
"(",
"attrs",
",",
"field_class",
",",
"pop",
"=",
"False",
",",
"ordered",
"=",
"False",
")",
":",
"fields",
"=",
"[",
"(",
"field_name",
",",
"field_value",
")",
"for",
"field_name",
",",
"field_value",
"in",
"attrs",
".",
"items"... | [
46,
0
] | [
63,
17
] | python | en | ['en', 'en', 'en'] | True |
_get_fields_by_mro | (klass, field_class, ordered=False) | Collect fields from a class, following its method resolution order. The
class itself is excluded from the search; only its parents are checked. Get
fields from ``_declared_fields`` if available, else use ``__dict__``.
:param type klass: Class whose fields to retrieve
:param type field_class: Base field... | Collect fields from a class, following its method resolution order. The
class itself is excluded from the search; only its parents are checked. Get
fields from ``_declared_fields`` if available, else use ``__dict__``. | def _get_fields_by_mro(klass, field_class, ordered=False):
"""Collect fields from a class, following its method resolution order. The
class itself is excluded from the search; only its parents are checked. Get
fields from ``_declared_fields`` if available, else use ``__dict__``.
:param type klass: Clas... | [
"def",
"_get_fields_by_mro",
"(",
"klass",
",",
"field_class",
",",
"ordered",
"=",
"False",
")",
":",
"mro",
"=",
"inspect",
".",
"getmro",
"(",
"klass",
")",
"# Loop over mro in reverse to maintain correct order of fields",
"return",
"sum",
"(",
"(",
"_get_fields"... | [
68,
0
] | [
88,
5
] | python | en | ['en', 'en', 'en'] | True |
SchemaMeta.get_declared_fields | (
mcs,
klass: type,
cls_fields: typing.List,
inherited_fields: typing.List,
dict_cls: type,
) | Returns a dictionary of field_name => `Field` pairs declared on the class.
This is exposed mainly so that plugins can add additional fields, e.g. fields
computed from class Meta options.
:param klass: The class object.
:param cls_fields: The fields declared on the class, including those... | Returns a dictionary of field_name => `Field` pairs declared on the class.
This is exposed mainly so that plugins can add additional fields, e.g. fields
computed from class Meta options. | def get_declared_fields(
mcs,
klass: type,
cls_fields: typing.List,
inherited_fields: typing.List,
dict_cls: type,
):
"""Returns a dictionary of field_name => `Field` pairs declared on the class.
This is exposed mainly so that plugins can add additional fields... | [
"def",
"get_declared_fields",
"(",
"mcs",
",",
"klass",
":",
"type",
",",
"cls_fields",
":",
"typing",
".",
"List",
",",
"inherited_fields",
":",
"typing",
".",
"List",
",",
"dict_cls",
":",
"type",
",",
")",
":",
"return",
"dict_cls",
"(",
"inherited_fiel... | [
134,
4
] | [
152,
54
] | python | en | ['en', 'en', 'en'] | True |
SchemaMeta.resolve_hooks | (cls) | Add in the decorated processors
By doing this after constructing the class, we let standard inheritance
do all the hard work.
| Add in the decorated processors | def resolve_hooks(cls) -> typing.Dict[types.Tag, typing.List[str]]:
"""Add in the decorated processors
By doing this after constructing the class, we let standard inheritance
do all the hard work.
"""
mro = inspect.getmro(cls)
hooks = defaultdict(list) # type: typing.D... | [
"def",
"resolve_hooks",
"(",
"cls",
")",
"->",
"typing",
".",
"Dict",
"[",
"types",
".",
"Tag",
",",
"typing",
".",
"List",
"[",
"str",
"]",
"]",
":",
"mro",
"=",
"inspect",
".",
"getmro",
"(",
"cls",
")",
"hooks",
"=",
"defaultdict",
"(",
"list",
... | [
160,
4
] | [
197,
20
] | python | en | ['en', 'it', 'en'] | True |
Schema.from_dict | (
cls,
fields: typing.Dict[str, typing.Union[ma_fields.Field, type]],
*,
name: str = "GeneratedSchema"
) | Generate a `Schema` class given a dictionary of fields.
.. code-block:: python
from great_expectations.marshmallow__shade import Schema, fields
PersonSchema = Schema.from_dict({"name": fields.Str()})
print(PersonSchema().load({"name": "David"})) # => {'name': 'David'}
... | Generate a `Schema` class given a dictionary of fields. | def from_dict(
cls,
fields: typing.Dict[str, typing.Union[ma_fields.Field, type]],
*,
name: str = "GeneratedSchema"
) -> type:
"""Generate a `Schema` class given a dictionary of fields.
.. code-block:: python
from great_expectations.marshmallow__shade im... | [
"def",
"from_dict",
"(",
"cls",
",",
"fields",
":",
"typing",
".",
"Dict",
"[",
"str",
",",
"typing",
".",
"Union",
"[",
"ma_fields",
".",
"Field",
",",
"type",
"]",
"]",
",",
"*",
",",
"name",
":",
"str",
"=",
"\"GeneratedSchema\"",
")",
"->",
"ty... | [
424,
4
] | [
453,
25
] | python | en | ['en', 'en', 'en'] | True |
Schema.handle_error | (
self, error: ValidationError, data: typing.Any, *, many: bool, **kwargs
) | Custom error handler function for the schema.
:param error: The `ValidationError` raised during (de)serialization.
:param data: The original input data.
:param many: Value of ``many`` on dump or load.
:param partial: Value of ``partial`` on load.
.. versionadded:: 2.0.0
... | Custom error handler function for the schema. | def handle_error(
self, error: ValidationError, data: typing.Any, *, many: bool, **kwargs
):
"""Custom error handler function for the schema.
:param error: The `ValidationError` raised during (de)serialization.
:param data: The original input data.
:param many: Value of ``ma... | [
"def",
"handle_error",
"(",
"self",
",",
"error",
":",
"ValidationError",
",",
"data",
":",
"typing",
".",
"Any",
",",
"*",
",",
"many",
":",
"bool",
",",
"*",
"*",
"kwargs",
")",
":",
"pass"
] | [
457,
4
] | [
472,
12
] | python | en | ['en', 'nl', 'en'] | True |
Schema.get_attribute | (self, obj: typing.Any, attr: str, default: typing.Any) | Defines how to pull values from an object to serialize.
.. versionadded:: 2.0.0
.. versionchanged:: 3.0.0a1
Changed position of ``obj`` and ``attr``.
| Defines how to pull values from an object to serialize. | def get_attribute(self, obj: typing.Any, attr: str, default: typing.Any):
"""Defines how to pull values from an object to serialize.
.. versionadded:: 2.0.0
.. versionchanged:: 3.0.0a1
Changed position of ``obj`` and ``attr``.
"""
return get_value(obj, attr, default... | [
"def",
"get_attribute",
"(",
"self",
",",
"obj",
":",
"typing",
".",
"Any",
",",
"attr",
":",
"str",
",",
"default",
":",
"typing",
".",
"Any",
")",
":",
"return",
"get_value",
"(",
"obj",
",",
"attr",
",",
"default",
")"
] | [
474,
4
] | [
482,
44
] | python | en | ['en', 'en', 'en'] | True |
Schema._call_and_store | (getter_func, data, *, field_name, error_store, index=None) | Call ``getter_func`` with ``data`` as its argument, and store any `ValidationErrors`.
:param callable getter_func: Function for getting the serialized/deserialized
value from ``data``.
:param data: The data passed to ``getter_func``.
:param str field_name: Field name.
:param... | Call ``getter_func`` with ``data`` as its argument, and store any `ValidationErrors`. | def _call_and_store(getter_func, data, *, field_name, error_store, index=None):
"""Call ``getter_func`` with ``data`` as its argument, and store any `ValidationErrors`.
:param callable getter_func: Function for getting the serialized/deserialized
value from ``data``.
:param data: Th... | [
"def",
"_call_and_store",
"(",
"getter_func",
",",
"data",
",",
"*",
",",
"field_name",
",",
"error_store",
",",
"index",
"=",
"None",
")",
":",
"try",
":",
"value",
"=",
"getter_func",
"(",
"data",
")",
"except",
"ValidationError",
"as",
"error",
":",
"... | [
487,
4
] | [
504,
20
] | python | en | ['en', 'en', 'en'] | True |
Schema._serialize | (
self, obj: typing.Union[_T, typing.Iterable[_T]], *, many: bool = False
) | Serialize ``obj``.
:param obj: The object(s) to serialize.
:param bool many: `True` if ``data`` should be serialized as a collection.
:return: A dictionary of the serialized data
.. versionchanged:: 1.0.0
Renamed from ``marshal``.
| Serialize ``obj``. | def _serialize(
self, obj: typing.Union[_T, typing.Iterable[_T]], *, many: bool = False
):
"""Serialize ``obj``.
:param obj: The object(s) to serialize.
:param bool many: `True` if ``data`` should be serialized as a collection.
:return: A dictionary of the serialized data
... | [
"def",
"_serialize",
"(",
"self",
",",
"obj",
":",
"typing",
".",
"Union",
"[",
"_T",
",",
"typing",
".",
"Iterable",
"[",
"_T",
"]",
"]",
",",
"*",
",",
"many",
":",
"bool",
"=",
"False",
")",
":",
"if",
"many",
"and",
"obj",
"is",
"not",
"Non... | [
506,
4
] | [
530,
18
] | python | en | ['en', 'pl', 'hi'] | False |
Schema.dump | (self, obj: typing.Any, *, many: bool = None) | Serialize an object to native Python data types according to this
Schema's fields.
:param obj: The object to serialize.
:param many: Whether to serialize `obj` as a collection. If `None`, the value
for `self.many` is used.
:return: A dict of serialized data
:rtype: d... | Serialize an object to native Python data types according to this
Schema's fields. | def dump(self, obj: typing.Any, *, many: bool = None):
"""Serialize an object to native Python data types according to this
Schema's fields.
:param obj: The object to serialize.
:param many: Whether to serialize `obj` as a collection. If `None`, the value
for `self.many` is ... | [
"def",
"dump",
"(",
"self",
",",
"obj",
":",
"typing",
".",
"Any",
",",
"*",
",",
"many",
":",
"bool",
"=",
"None",
")",
":",
"many",
"=",
"self",
".",
"many",
"if",
"many",
"is",
"None",
"else",
"bool",
"(",
"many",
")",
"if",
"many",
"and",
... | [
532,
4
] | [
568,
21
] | python | en | ['en', 'en', 'en'] | True |
Schema.dumps | (self, obj: typing.Any, *args, many: bool = None, **kwargs) | Same as :meth:`dump`, except return a JSON-encoded string.
:param obj: The object to serialize.
:param many: Whether to serialize `obj` as a collection. If `None`, the value
for `self.many` is used.
:return: A ``json`` string
:rtype: str
.. versionadded:: 1.0.0
... | Same as :meth:`dump`, except return a JSON-encoded string. | def dumps(self, obj: typing.Any, *args, many: bool = None, **kwargs):
"""Same as :meth:`dump`, except return a JSON-encoded string.
:param obj: The object to serialize.
:param many: Whether to serialize `obj` as a collection. If `None`, the value
for `self.many` is used.
:re... | [
"def",
"dumps",
"(",
"self",
",",
"obj",
":",
"typing",
".",
"Any",
",",
"*",
"args",
",",
"many",
":",
"bool",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"serialized",
"=",
"self",
".",
"dump",
"(",
"obj",
",",
"many",
"=",
"many",
")",
... | [
570,
4
] | [
593,
73
] | python | en | ['en', 'en', 'en'] | True |
Schema._deserialize | (
self,
data: typing.Union[
typing.Mapping[str, typing.Any],
typing.Iterable[typing.Mapping[str, typing.Any]],
],
*,
error_store: ErrorStore,
many: bool = False,
partial=False,
unknown=RAISE,
index=None
) | Deserialize ``data``.
:param dict data: The data to deserialize.
:param ErrorStore error_store: Structure to store errors.
:param bool many: `True` if ``data`` should be deserialized as a collection.
:param bool|tuple partial: Whether to ignore missing fields and not require
... | Deserialize ``data``. | def _deserialize(
self,
data: typing.Union[
typing.Mapping[str, typing.Any],
typing.Iterable[typing.Mapping[str, typing.Any]],
],
*,
error_store: ErrorStore,
many: bool = False,
partial=False,
unknown=RAISE,
index=None
)... | [
"def",
"_deserialize",
"(",
"self",
",",
"data",
":",
"typing",
".",
"Union",
"[",
"typing",
".",
"Mapping",
"[",
"str",
",",
"typing",
".",
"Any",
"]",
",",
"typing",
".",
"Iterable",
"[",
"typing",
".",
"Mapping",
"[",
"str",
",",
"typing",
".",
... | [
595,
4
] | [
701,
18
] | python | en | ['en', 'no', 'it'] | False |
Schema.load | (
self,
data: typing.Union[
typing.Mapping[str, typing.Any],
typing.Iterable[typing.Mapping[str, typing.Any]],
],
*,
many: bool = None,
partial: typing.Union[bool, types.StrSequenceOrSet] = None,
unknown: str = None
) | Deserialize a data structure to an object defined by this Schema's fields.
:param data: The data to deserialize.
:param many: Whether to deserialize `data` as a collection. If `None`, the
value for `self.many` is used.
:param partial: Whether to ignore missing fields and not require... | Deserialize a data structure to an object defined by this Schema's fields. | def load(
self,
data: typing.Union[
typing.Mapping[str, typing.Any],
typing.Iterable[typing.Mapping[str, typing.Any]],
],
*,
many: bool = None,
partial: typing.Union[bool, types.StrSequenceOrSet] = None,
unknown: str = None
):
"... | [
"def",
"load",
"(",
"self",
",",
"data",
":",
"typing",
".",
"Union",
"[",
"typing",
".",
"Mapping",
"[",
"str",
",",
"typing",
".",
"Any",
"]",
",",
"typing",
".",
"Iterable",
"[",
"typing",
".",
"Mapping",
"[",
"str",
",",
"typing",
".",
"Any",
... | [
703,
4
] | [
736,
9
] | python | en | ['en', 'en', 'en'] | True |
Schema.loads | (
self,
json_data: str,
*,
many: bool = None,
partial: typing.Union[bool, types.StrSequenceOrSet] = None,
unknown: str = None,
**kwargs
) | Same as :meth:`load`, except it takes a JSON string as input.
:param json_data: A JSON string of the data to deserialize.
:param many: Whether to deserialize `obj` as a collection. If `None`, the
value for `self.many` is used.
:param partial: Whether to ignore missing fields and not... | Same as :meth:`load`, except it takes a JSON string as input. | def loads(
self,
json_data: str,
*,
many: bool = None,
partial: typing.Union[bool, types.StrSequenceOrSet] = None,
unknown: str = None,
**kwargs
):
"""Same as :meth:`load`, except it takes a JSON string as input.
:param json_data: A JSON strin... | [
"def",
"loads",
"(",
"self",
",",
"json_data",
":",
"str",
",",
"*",
",",
"many",
":",
"bool",
"=",
"None",
",",
"partial",
":",
"typing",
".",
"Union",
"[",
"bool",
",",
"types",
".",
"StrSequenceOrSet",
"]",
"=",
"None",
",",
"unknown",
":",
"str... | [
738,
4
] | [
768,
75
] | python | en | ['en', 'en', 'en'] | True |
Schema.validate | (
self,
data: typing.Mapping,
*,
many: bool = None,
partial: typing.Union[bool, types.StrSequenceOrSet] = None
) | Validate `data` against the schema, returning a dictionary of
validation errors.
:param data: The data to validate.
:param many: Whether to validate `data` as a collection. If `None`, the
value for `self.many` is used.
:param partial: Whether to ignore missing fields and not... | Validate `data` against the schema, returning a dictionary of
validation errors. | def validate(
self,
data: typing.Mapping,
*,
many: bool = None,
partial: typing.Union[bool, types.StrSequenceOrSet] = None
) -> typing.Dict[str, typing.List[str]]:
"""Validate `data` against the schema, returning a dictionary of
validation errors.
:pa... | [
"def",
"validate",
"(",
"self",
",",
"data",
":",
"typing",
".",
"Mapping",
",",
"*",
",",
"many",
":",
"bool",
"=",
"None",
",",
"partial",
":",
"typing",
".",
"Union",
"[",
"bool",
",",
"types",
".",
"StrSequenceOrSet",
"]",
"=",
"None",
")",
"->... | [
790,
4
] | [
815,
17
] | python | en | ['en', 'en', 'en'] | True |
Schema._do_load | (
self,
data: typing.Union[
typing.Mapping[str, typing.Any],
typing.Iterable[typing.Mapping[str, typing.Any]],
],
*,
many: bool = None,
partial: typing.Union[bool, types.StrSequenceOrSet] = None,
unknown: str = None,
postprocess: bo... | Deserialize `data`, returning the deserialized result.
This method is private API.
:param data: The data to deserialize.
:param many: Whether to deserialize `data` as a collection. If `None`, the
value for `self.many` is used.
:param partial: Whether to validate required fie... | Deserialize `data`, returning the deserialized result.
This method is private API. | def _do_load(
self,
data: typing.Union[
typing.Mapping[str, typing.Any],
typing.Iterable[typing.Mapping[str, typing.Any]],
],
*,
many: bool = None,
partial: typing.Union[bool, types.StrSequenceOrSet] = None,
unknown: str = None,
pos... | [
"def",
"_do_load",
"(",
"self",
",",
"data",
":",
"typing",
".",
"Union",
"[",
"typing",
".",
"Mapping",
"[",
"str",
",",
"typing",
".",
"Any",
"]",
",",
"typing",
".",
"Iterable",
"[",
"typing",
".",
"Mapping",
"[",
"str",
",",
"typing",
".",
"Any... | [
819,
4
] | [
918,
21
] | python | en | ['en', 'no', 'en'] | True |
Schema._normalize_nested_options | (self) | Apply then flatten nested schema options.
This method is private API.
| Apply then flatten nested schema options.
This method is private API.
| def _normalize_nested_options(self) -> None:
"""Apply then flatten nested schema options.
This method is private API.
"""
if self.only is not None:
# Apply the only option to nested fields.
self.__apply_nested_option("only", self.only, "intersection")
... | [
"def",
"_normalize_nested_options",
"(",
"self",
")",
"->",
"None",
":",
"if",
"self",
".",
"only",
"is",
"not",
"None",
":",
"# Apply the only option to nested fields.",
"self",
".",
"__apply_nested_option",
"(",
"\"only\"",
",",
"self",
".",
"only",
",",
"\"in... | [
920,
4
] | [
935,
13
] | python | en | ['en', 'lb', 'en'] | True |
Schema.__apply_nested_option | (self, option_name, field_names, set_operation) | Apply nested options to nested fields | Apply nested options to nested fields | def __apply_nested_option(self, option_name, field_names, set_operation) -> None:
"""Apply nested options to nested fields"""
# Split nested field names on the first dot.
nested_fields = [name.split(".", 1) for name in field_names if "." in name]
# Partition the nested field names by par... | [
"def",
"__apply_nested_option",
"(",
"self",
",",
"option_name",
",",
"field_names",
",",
"set_operation",
")",
"->",
"None",
":",
"# Split nested field names on the first dot.",
"nested_fields",
"=",
"[",
"name",
".",
"split",
"(",
"\".\"",
",",
"1",
")",
"for",
... | [
937,
4
] | [
954,
72
] | python | en | ['en', 'en', 'en'] | True |
Schema._init_fields | (self) | Update self.fields, self.load_fields, and self.dump_fields based on schema options.
This method is private API.
| Update self.fields, self.load_fields, and self.dump_fields based on schema options.
This method is private API.
| def _init_fields(self) -> None:
"""Update self.fields, self.load_fields, and self.dump_fields based on schema options.
This method is private API.
"""
if self.opts.fields:
available_field_names = self.set_class(self.opts.fields)
else:
available_field_names... | [
"def",
"_init_fields",
"(",
"self",
")",
"->",
"None",
":",
"if",
"self",
".",
"opts",
".",
"fields",
":",
"available_field_names",
"=",
"self",
".",
"set_class",
"(",
"self",
".",
"opts",
".",
"fields",
")",
"else",
":",
"available_field_names",
"=",
"s... | [
956,
4
] | [
1029,
38
] | python | en | ['en', 'fy', 'en'] | True |
Schema.on_bind_field | (self, field_name: str, field_obj: ma_fields.Field) | Hook to modify a field when it is bound to the `Schema`.
No-op by default.
| Hook to modify a field when it is bound to the `Schema`. | def on_bind_field(self, field_name: str, field_obj: ma_fields.Field) -> None:
"""Hook to modify a field when it is bound to the `Schema`.
No-op by default.
"""
return None | [
"def",
"on_bind_field",
"(",
"self",
",",
"field_name",
":",
"str",
",",
"field_obj",
":",
"ma_fields",
".",
"Field",
")",
"->",
"None",
":",
"return",
"None"
] | [
1031,
4
] | [
1036,
19
] | python | en | ['en', 'en', 'en'] | True |
Schema._bind_field | (self, field_name: str, field_obj: ma_fields.Field) | Bind field to the schema, setting any necessary attributes on the
field (e.g. parent and name).
Also set field load_only and dump_only values if field_name was
specified in ``class Meta``.
| Bind field to the schema, setting any necessary attributes on the
field (e.g. parent and name). | def _bind_field(self, field_name: str, field_obj: ma_fields.Field) -> None:
"""Bind field to the schema, setting any necessary attributes on the
field (e.g. parent and name).
Also set field load_only and dump_only values if field_name was
specified in ``class Meta``.
"""
... | [
"def",
"_bind_field",
"(",
"self",
",",
"field_name",
":",
"str",
",",
"field_obj",
":",
"ma_fields",
".",
"Field",
")",
"->",
"None",
":",
"if",
"field_name",
"in",
"self",
".",
"load_only",
":",
"field_obj",
".",
"load_only",
"=",
"True",
"if",
"field_... | [
1038,
4
] | [
1063,
49
] | python | en | ['en', 'en', 'en'] | True |
TestcaseManager.insert_execution_data | (self, execution_query_payload) | Inserts a test execution row into the database.
Returns the execution guid.
"execution_start_time" is defined by milliseconds since the Epoch.
(See https://currentmillis.com to convert that to a real date.) | Inserts a test execution row into the database.
Returns the execution guid.
"execution_start_time" is defined by milliseconds since the Epoch.
(See https://currentmillis.com to convert that to a real date.) | def insert_execution_data(self, execution_query_payload):
""" Inserts a test execution row into the database.
Returns the execution guid.
"execution_start_time" is defined by milliseconds since the Epoch.
(See https://currentmillis.com to convert that to a real date.) """
... | [
"def",
"insert_execution_data",
"(",
"self",
",",
"execution_query_payload",
")",
":",
"query",
"=",
"\"\"\"INSERT INTO test_execution\n (guid, execution_start, total_execution_time, username)\n VALUES (%(guid)s,%(execution_start_time)s,\n ... | [
8,
4
] | [
21,
43
] | python | en | ['en', 'en', 'en'] | True |
TestcaseManager.update_execution_data | (self, execution_guid, execution_time) | Updates an existing test execution row in the database. | Updates an existing test execution row in the database. | def update_execution_data(self, execution_guid, execution_time):
""" Updates an existing test execution row in the database. """
query = """UPDATE test_execution
SET total_execution_time=%(execution_time)s
WHERE guid=%(execution_guid)s """
DatabaseManager(se... | [
"def",
"update_execution_data",
"(",
"self",
",",
"execution_guid",
",",
"execution_time",
")",
":",
"query",
"=",
"\"\"\"UPDATE test_execution\n SET total_execution_time=%(execution_time)s\n WHERE guid=%(execution_guid)s \"\"\"",
"DatabaseManager",
"(... | [
23,
4
] | [
31,
47
] | python | en | ['en', 'en', 'en'] | True |
TestcaseManager.insert_testcase_data | (self, testcase_run_payload) | Inserts all data for the test in the DB. Returns new row guid. | Inserts all data for the test in the DB. Returns new row guid. | def insert_testcase_data(self, testcase_run_payload):
""" Inserts all data for the test in the DB. Returns new row guid. """
query = """INSERT INTO test_run_data(
guid, browser, state, execution_guid, env, start_time,
test_address, runtime, retry_count, message, sta... | [
"def",
"insert_testcase_data",
"(",
"self",
",",
"testcase_run_payload",
")",
":",
"query",
"=",
"\"\"\"INSERT INTO test_run_data(\n guid, browser, state, execution_guid, env, start_time,\n test_address, runtime, retry_count, message, stack_trace)\n ... | [
33,
4
] | [
51,
53
] | python | en | ['en', 'en', 'en'] | True |
TestcaseManager.update_testcase_data | (self, testcase_payload) | Updates an existing test run in the database. | Updates an existing test run in the database. | def update_testcase_data(self, testcase_payload):
""" Updates an existing test run in the database. """
query = """UPDATE test_run_data SET
runtime=%(runtime)s,
state=%(state)s,
retry_count=%(retry_count)s,
... | [
"def",
"update_testcase_data",
"(",
"self",
",",
"testcase_payload",
")",
":",
"query",
"=",
"\"\"\"UPDATE test_run_data SET\n runtime=%(runtime)s,\n state=%(state)s,\n retry_count=%(retry_count)s,\n ... | [
53,
4
] | [
63,
49
] | python | en | ['en', 'en', 'en'] | True |
get_keywords | () | Get the keywords needed to look up the version information. | Get the keywords needed to look up the version information. | def get_keywords():
"""Get the keywords needed to look up the version information."""
# these strings will be replaced by git during git-archive.
# setup.py/versioneer.py will grep for the variable names, so they must
# each be defined on a line of their own. _version.py will just call
# get_keyword... | [
"def",
"get_keywords",
"(",
")",
":",
"# these strings will be replaced by git during git-archive.",
"# setup.py/versioneer.py will grep for the variable names, so they must",
"# each be defined on a line of their own. _version.py will just call",
"# get_keywords().",
"git_refnames",
"=",
"\"$... | [
18,
0
] | [
28,
19
] | python | en | ['en', 'en', 'en'] | True |
get_config | () | Create, populate and return the VersioneerConfig() object. | Create, populate and return the VersioneerConfig() object. | def get_config():
"""Create, populate and return the VersioneerConfig() object."""
# these strings are filled in when 'setup.py versioneer' creates
# _version.py
cfg = VersioneerConfig()
cfg.VCS = "git"
cfg.style = "pep440"
cfg.tag_prefix = ""
cfg.parentdir_prefix = "great_expectations-"... | [
"def",
"get_config",
"(",
")",
":",
"# these strings are filled in when 'setup.py versioneer' creates",
"# _version.py",
"cfg",
"=",
"VersioneerConfig",
"(",
")",
"cfg",
".",
"VCS",
"=",
"\"git\"",
"cfg",
".",
"style",
"=",
"\"pep440\"",
"cfg",
".",
"tag_prefix",
"=... | [
35,
0
] | [
46,
14
] | python | en | ['en', 'en', 'en'] | True |
register_vcs_handler | (vcs, method) | Decorator to mark a method as the handler for a particular VCS. | Decorator to mark a method as the handler for a particular VCS. | def register_vcs_handler(vcs, method): # decorator
"""Decorator to mark a method as the handler for a particular VCS."""
def decorate(f):
"""Store f in HANDLERS[vcs][method]."""
if vcs not in HANDLERS:
HANDLERS[vcs] = {}
HANDLERS[vcs][method] = f
return f
retur... | [
"def",
"register_vcs_handler",
"(",
"vcs",
",",
"method",
")",
":",
"# decorator",
"def",
"decorate",
"(",
"f",
")",
":",
"\"\"\"Store f in HANDLERS[vcs][method].\"\"\"",
"if",
"vcs",
"not",
"in",
"HANDLERS",
":",
"HANDLERS",
"[",
"vcs",
"]",
"=",
"{",
"}",
... | [
57,
0
] | [
67,
19
] | python | en | ['en', 'en', 'en'] | True |
run_command | (commands, args, cwd=None, verbose=False, hide_stderr=False, env=None) | Call the given command(s). | Call the given command(s). | def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False, env=None):
"""Call the given command(s)."""
assert isinstance(commands, list)
for c in commands:
try:
dispcmd = str([c] + args)
# remember shell=False, so use git.cmd on windows, not just git
... | [
"def",
"run_command",
"(",
"commands",
",",
"args",
",",
"cwd",
"=",
"None",
",",
"verbose",
"=",
"False",
",",
"hide_stderr",
"=",
"False",
",",
"env",
"=",
"None",
")",
":",
"assert",
"isinstance",
"(",
"commands",
",",
"list",
")",
"for",
"c",
"in... | [
70,
0
] | [
106,
31
] | python | en | ['en', 'en', 'en'] | True |
versions_from_parentdir | (parentdir_prefix, root, verbose) | Try to determine the version from the parent directory name.
Source tarballs conventionally unpack into a directory that includes both
the project name and a version string. We will also support searching up
two directory levels for an appropriately named parent directory
| Try to determine the version from the parent directory name. | def versions_from_parentdir(parentdir_prefix, root, verbose):
"""Try to determine the version from the parent directory name.
Source tarballs conventionally unpack into a directory that includes both
the project name and a version string. We will also support searching up
two directory levels for an ap... | [
"def",
"versions_from_parentdir",
"(",
"parentdir_prefix",
",",
"root",
",",
"verbose",
")",
":",
"rootdirs",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"3",
")",
":",
"dirname",
"=",
"os",
".",
"path",
".",
"basename",
"(",
"root",
")",
"if",
"d... | [
109,
0
] | [
137,
70
] | python | en | ['en', 'en', 'en'] | True |
git_get_keywords | (versionfile_abs) | Extract version information from the given file. | Extract version information from the given file. | def git_get_keywords(versionfile_abs):
"""Extract version information from the given file."""
# the code embedded in _version.py can just fetch the value of these
# keywords. When used from setup.py, we don't want to import _version.py,
# so we do it with a regexp instead. This function is not used from... | [
"def",
"git_get_keywords",
"(",
"versionfile_abs",
")",
":",
"# the code embedded in _version.py can just fetch the value of these",
"# keywords. When used from setup.py, we don't want to import _version.py,",
"# so we do it with a regexp instead. This function is not used from",
"# _version.py.",... | [
141,
0
] | [
166,
19
] | python | en | ['en', 'en', 'en'] | True |
git_versions_from_keywords | (keywords, tag_prefix, verbose) | Get version information from git keywords. | Get version information from git keywords. | def git_versions_from_keywords(keywords, tag_prefix, verbose):
"""Get version information from git keywords."""
if not keywords:
raise NotThisMethod("no keywords at all, weird")
date = keywords.get("date")
if date is not None:
# git-2.2.0 added "%cI", which expands to an ISO-8601 -compli... | [
"def",
"git_versions_from_keywords",
"(",
"keywords",
",",
"tag_prefix",
",",
"verbose",
")",
":",
"if",
"not",
"keywords",
":",
"raise",
"NotThisMethod",
"(",
"\"no keywords at all, weird\"",
")",
"date",
"=",
"keywords",
".",
"get",
"(",
"\"date\"",
")",
"if",... | [
170,
0
] | [
228,
5
] | python | en | ['en', 'da', 'en'] | True |
git_pieces_from_vcs | (tag_prefix, root, verbose, run_command=run_command) | Get version from 'git describe' in the root of the source tree.
This only gets called if the git-archive 'subst' keywords were *not*
expanded, and _version.py hasn't already been rewritten with a short
version string, meaning we're inside a checked out source tree.
| Get version from 'git describe' in the root of the source tree. | def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
"""Get version from 'git describe' in the root of the source tree.
This only gets called if the git-archive 'subst' keywords were *not*
expanded, and _version.py hasn't already been rewritten with a short
version string, meani... | [
"def",
"git_pieces_from_vcs",
"(",
"tag_prefix",
",",
"root",
",",
"verbose",
",",
"run_command",
"=",
"run_command",
")",
":",
"GITS",
"=",
"[",
"\"git\"",
"]",
"if",
"sys",
".",
"platform",
"==",
"\"win32\"",
":",
"GITS",
"=",
"[",
"\"git.cmd\"",
",",
... | [
232,
0
] | [
329,
17
] | python | en | ['en', 'en', 'en'] | True |
plus_or_dot | (pieces) | Return a + if we don't already have one, else return a . | Return a + if we don't already have one, else return a . | def plus_or_dot(pieces):
"""Return a + if we don't already have one, else return a ."""
if "+" in pieces.get("closest-tag", ""):
return "."
return "+" | [
"def",
"plus_or_dot",
"(",
"pieces",
")",
":",
"if",
"\"+\"",
"in",
"pieces",
".",
"get",
"(",
"\"closest-tag\"",
",",
"\"\"",
")",
":",
"return",
"\".\"",
"return",
"\"+\""
] | [
332,
0
] | [
336,
14
] | python | en | ['en', 'en', 'en'] | True |
render_pep440 | (pieces) | Build up version string, with post-release "local version identifier".
Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
Exceptions:
1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
| Build up version string, with post-release "local version identifier". | def render_pep440(pieces):
"""Build up version string, with post-release "local version identifier".
Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
Exceptions:
1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHE... | [
"def",
"render_pep440",
"(",
"pieces",
")",
":",
"if",
"pieces",
"[",
"\"closest-tag\"",
"]",
":",
"rendered",
"=",
"pieces",
"[",
"\"closest-tag\"",
"]",
"if",
"pieces",
"[",
"\"distance\"",
"]",
"or",
"pieces",
"[",
"\"dirty\"",
"]",
":",
"rendered",
"+=... | [
339,
0
] | [
360,
19
] | python | en | ['en', 'en', 'en'] | True |
render_pep440_pre | (pieces) | TAG[.post.devDISTANCE] -- No -dirty.
Exceptions:
1: no tags. 0.post.devDISTANCE
| TAG[.post.devDISTANCE] -- No -dirty. | def render_pep440_pre(pieces):
"""TAG[.post.devDISTANCE] -- No -dirty.
Exceptions:
1: no tags. 0.post.devDISTANCE
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
if pieces["distance"]:
rendered += ".post.dev%d" % pieces["distance"]
else:
# exce... | [
"def",
"render_pep440_pre",
"(",
"pieces",
")",
":",
"if",
"pieces",
"[",
"\"closest-tag\"",
"]",
":",
"rendered",
"=",
"pieces",
"[",
"\"closest-tag\"",
"]",
"if",
"pieces",
"[",
"\"distance\"",
"]",
":",
"rendered",
"+=",
"\".post.dev%d\"",
"%",
"pieces",
... | [
363,
0
] | [
376,
19
] | python | en | ['en', 'en', 'pt'] | True |
render_pep440_post | (pieces) | TAG[.postDISTANCE[.dev0]+gHEX] .
The ".dev0" means dirty. Note that .dev0 sorts backwards
(a dirty tree will appear "older" than the corresponding clean one),
but you shouldn't be releasing software with -dirty anyways.
Exceptions:
1: no tags. 0.postDISTANCE[.dev0]
| TAG[.postDISTANCE[.dev0]+gHEX] . | def render_pep440_post(pieces):
"""TAG[.postDISTANCE[.dev0]+gHEX] .
The ".dev0" means dirty. Note that .dev0 sorts backwards
(a dirty tree will appear "older" than the corresponding clean one),
but you shouldn't be releasing software with -dirty anyways.
Exceptions:
1: no tags. 0.postDISTANCE[... | [
"def",
"render_pep440_post",
"(",
"pieces",
")",
":",
"if",
"pieces",
"[",
"\"closest-tag\"",
"]",
":",
"rendered",
"=",
"pieces",
"[",
"\"closest-tag\"",
"]",
"if",
"pieces",
"[",
"\"distance\"",
"]",
"or",
"pieces",
"[",
"\"dirty\"",
"]",
":",
"rendered",
... | [
379,
0
] | [
403,
19
] | python | cy | ['en', 'cy', 'hi'] | False |
render_pep440_old | (pieces) | TAG[.postDISTANCE[.dev0]] .
The ".dev0" means dirty.
Eexceptions:
1: no tags. 0.postDISTANCE[.dev0]
| TAG[.postDISTANCE[.dev0]] . | def render_pep440_old(pieces):
"""TAG[.postDISTANCE[.dev0]] .
The ".dev0" means dirty.
Eexceptions:
1: no tags. 0.postDISTANCE[.dev0]
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
if pieces["distance"] or pieces["dirty"]:
rendered += ".post%d" % pie... | [
"def",
"render_pep440_old",
"(",
"pieces",
")",
":",
"if",
"pieces",
"[",
"\"closest-tag\"",
"]",
":",
"rendered",
"=",
"pieces",
"[",
"\"closest-tag\"",
"]",
"if",
"pieces",
"[",
"\"distance\"",
"]",
"or",
"pieces",
"[",
"\"dirty\"",
"]",
":",
"rendered",
... | [
406,
0
] | [
425,
19
] | python | en | ['en', 'mt', 'hi'] | False |
render_git_describe | (pieces) | TAG[-DISTANCE-gHEX][-dirty].
Like 'git describe --tags --dirty --always'.
Exceptions:
1: no tags. HEX[-dirty] (note: no 'g' prefix)
| TAG[-DISTANCE-gHEX][-dirty]. | def render_git_describe(pieces):
"""TAG[-DISTANCE-gHEX][-dirty].
Like 'git describe --tags --dirty --always'.
Exceptions:
1: no tags. HEX[-dirty] (note: no 'g' prefix)
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
if pieces["distance"]:
rendered +=... | [
"def",
"render_git_describe",
"(",
"pieces",
")",
":",
"if",
"pieces",
"[",
"\"closest-tag\"",
"]",
":",
"rendered",
"=",
"pieces",
"[",
"\"closest-tag\"",
"]",
"if",
"pieces",
"[",
"\"distance\"",
"]",
":",
"rendered",
"+=",
"\"-%d-g%s\"",
"%",
"(",
"pieces... | [
428,
0
] | [
445,
19
] | python | en | ['en', 'en', 'en'] | False |
render_git_describe_long | (pieces) | TAG-DISTANCE-gHEX[-dirty].
Like 'git describe --tags --dirty --always -long'.
The distance/hash is unconditional.
Exceptions:
1: no tags. HEX[-dirty] (note: no 'g' prefix)
| TAG-DISTANCE-gHEX[-dirty]. | def render_git_describe_long(pieces):
"""TAG-DISTANCE-gHEX[-dirty].
Like 'git describe --tags --dirty --always -long'.
The distance/hash is unconditional.
Exceptions:
1: no tags. HEX[-dirty] (note: no 'g' prefix)
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
... | [
"def",
"render_git_describe_long",
"(",
"pieces",
")",
":",
"if",
"pieces",
"[",
"\"closest-tag\"",
"]",
":",
"rendered",
"=",
"pieces",
"[",
"\"closest-tag\"",
"]",
"rendered",
"+=",
"\"-%d-g%s\"",
"%",
"(",
"pieces",
"[",
"\"distance\"",
"]",
",",
"pieces",
... | [
448,
0
] | [
465,
19
] | python | en | ['en', 'en', 'pt'] | False |
render | (pieces, style) | Render the given version pieces into the requested style. | Render the given version pieces into the requested style. | def render(pieces, style):
"""Render the given version pieces into the requested style."""
if pieces["error"]:
return {
"version": "unknown",
"full-revisionid": pieces.get("long"),
"dirty": None,
"error": pieces["error"],
"date": None,
... | [
"def",
"render",
"(",
"pieces",
",",
"style",
")",
":",
"if",
"pieces",
"[",
"\"error\"",
"]",
":",
"return",
"{",
"\"version\"",
":",
"\"unknown\"",
",",
"\"full-revisionid\"",
":",
"pieces",
".",
"get",
"(",
"\"long\"",
")",
",",
"\"dirty\"",
":",
"Non... | [
468,
0
] | [
503,
5
] | python | en | ['en', 'en', 'en'] | True |
get_versions | () | Get version information or return default if unable to do so. | Get version information or return default if unable to do so. | def get_versions():
"""Get version information or return default if unable to do so."""
# I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
# __file__, we can work backwards from there to the root. Some
# py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
#... | [
"def",
"get_versions",
"(",
")",
":",
"# I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have",
"# __file__, we can work backwards from there to the root. Some",
"# py2exe/bbfreeze/non-CPython implementations don't do __file__, in which",
"# case we can only use expanded keywords.... | [
506,
0
] | [
555,
5
] | python | en | ['it', 'en', 'en'] | True |
clean_text | (start_token, end_token, doc_tokens, doc_bytes,
ignore_final_whitespace=True) | Remove HTML tags from a text span and reconstruct proper spacing. | Remove HTML tags from a text span and reconstruct proper spacing. | def clean_text(start_token, end_token, doc_tokens, doc_bytes,
ignore_final_whitespace=True):
"""Remove HTML tags from a text span and reconstruct proper spacing."""
text = ""
for index in range(start_token, end_token):
token = doc_tokens[index]
if token["html_token"]:
continue
tex... | [
"def",
"clean_text",
"(",
"start_token",
",",
"end_token",
",",
"doc_tokens",
",",
"doc_bytes",
",",
"ignore_final_whitespace",
"=",
"True",
")",
":",
"text",
"=",
"\"\"",
"for",
"index",
"in",
"range",
"(",
"start_token",
",",
"end_token",
")",
":",
"token"... | [
72,
0
] | [
108,
13
] | python | en | ['en', 'en', 'en'] | True |
reduce_annotations | (anno_types, answers) |
In cases where there is annotator disagreement, this fn picks either only the short_answers or only the no_answers,
depending on which is more numerous, with a bias towards picking short_answers.
Note: By this stage, all long_answer annotations and all samples with yes/no answer have been removed.
This leaves... |
In cases where there is annotator disagreement, this fn picks either only the short_answers or only the no_answers,
depending on which is more numerous, with a bias towards picking short_answers. | def reduce_annotations(anno_types, answers):
"""
In cases where there is annotator disagreement, this fn picks either only the short_answers or only the no_answers,
depending on which is more numerous, with a bias towards picking short_answers.
Note: By this stage, all long_answer annotations and all samples w... | [
"def",
"reduce_annotations",
"(",
"anno_types",
",",
"answers",
")",
":",
"for",
"at",
"in",
"set",
"(",
"anno_types",
")",
":",
"assert",
"at",
"in",
"(",
"\"no_answer\"",
",",
"\"short_answer\"",
")",
"if",
"anno_types",
".",
"count",
"(",
"\"short_answer\... | [
127,
0
] | [
152,
31
] | python | en | ['en', 'error', 'th'] | False |
nq_to_squad | (record) | Convert a Natural Questions record to SQuAD format. | Convert a Natural Questions record to SQuAD format. | def nq_to_squad(record):
"""Convert a Natural Questions record to SQuAD format."""
doc_bytes = record["document_html"].encode("utf-8")
doc_tokens = record["document_tokens"]
question_text = record["question_text"]
question_text = question_text[0].upper() + question_text[1:] + "?"
answers = []
anno_type... | [
"def",
"nq_to_squad",
"(",
"record",
")",
":",
"doc_bytes",
"=",
"record",
"[",
"\"document_html\"",
"]",
".",
"encode",
"(",
"\"utf-8\"",
")",
"doc_tokens",
"=",
"record",
"[",
"\"document_tokens\"",
"]",
"question_text",
"=",
"record",
"[",
"\"question_text\""... | [
156,
0
] | [
231,
60
] | python | en | ['en', 'en', 'en'] | True |
is_main_thread | () | Attempt to reliably check if we are in the main thread. | Attempt to reliably check if we are in the main thread. | def is_main_thread():
"""Attempt to reliably check if we are in the main thread."""
try:
signal.signal(signal.SIGINT, signal.getsignal(signal.SIGINT))
return True
except ValueError:
return False | [
"def",
"is_main_thread",
"(",
")",
":",
"try",
":",
"signal",
".",
"signal",
"(",
"signal",
".",
"SIGINT",
",",
"signal",
".",
"getsignal",
"(",
"signal",
".",
"SIGINT",
")",
")",
"return",
"True",
"except",
"ValueError",
":",
"return",
"False"
] | [
77,
0
] | [
83,
20
] | python | en | ['en', 'en', 'en'] | True |
async_wraps | (cls, wrapped_cls, attr_name) | Similar to wraps, but for async wrappers of non-async functions. | Similar to wraps, but for async wrappers of non-async functions. | def async_wraps(cls, wrapped_cls, attr_name):
"""Similar to wraps, but for async wrappers of non-async functions."""
def decorator(func):
func.__name__ = attr_name
func.__qualname__ = ".".join((cls.__qualname__, attr_name))
func.__doc__ = """Like :meth:`~{}.{}.{}`, but async.
... | [
"def",
"async_wraps",
"(",
"cls",
",",
"wrapped_cls",
",",
"attr_name",
")",
":",
"def",
"decorator",
"(",
"func",
")",
":",
"func",
".",
"__name__",
"=",
"attr_name",
"func",
".",
"__qualname__",
"=",
"\".\"",
".",
"join",
"(",
"(",
"cls",
".",
"__qua... | [
199,
0
] | [
214,
20
] | python | en | ['en', 'en', 'en'] | True |
name_asyncgen | (agen) | Return the fully-qualified name of the async generator function
that produced the async generator iterator *agen*.
| Return the fully-qualified name of the async generator function
that produced the async generator iterator *agen*.
| def name_asyncgen(agen):
"""Return the fully-qualified name of the async generator function
that produced the async generator iterator *agen*.
"""
if not hasattr(agen, "ag_code"): # pragma: no cover
return repr(agen)
try:
module = agen.ag_frame.f_globals["__name__"]
except (Attr... | [
"def",
"name_asyncgen",
"(",
"agen",
")",
":",
"if",
"not",
"hasattr",
"(",
"agen",
",",
"\"ag_code\"",
")",
":",
"# pragma: no cover",
"return",
"repr",
"(",
"agen",
")",
"try",
":",
"module",
"=",
"agen",
".",
"ag_frame",
".",
"f_globals",
"[",
"\"__na... | [
342,
0
] | [
356,
33
] | python | en | ['en', 'en', 'en'] | True |
make_analysator | (f) | Return a static text analyser function that returns float values. | Return a static text analyser function that returns float values. | def make_analysator(f):
"""Return a static text analyser function that returns float values."""
def text_analyse(text):
try:
rv = f(text)
except Exception:
return 0.0
if not rv:
return 0.0
try:
return min(1.0, max(0.0, float(rv)))
... | [
"def",
"make_analysator",
"(",
"f",
")",
":",
"def",
"text_analyse",
"(",
"text",
")",
":",
"try",
":",
"rv",
"=",
"f",
"(",
"text",
")",
"except",
"Exception",
":",
"return",
"0.0",
"if",
"not",
"rv",
":",
"return",
"0.0",
"try",
":",
"return",
"m... | [
106,
0
] | [
120,
37
] | python | en | ['en', 'en', 'en'] | True |
shebang_matches | (text, regex) | r"""Check if the given regular expression matches the last part of the
shebang if one exists.
>>> from pygments.util import shebang_matches
>>> shebang_matches('#!/usr/bin/env python', r'python(2\.\d)?')
True
>>> shebang_matches('#!/usr/bin/python2.4', r'python(2\.\d)?')
Tru... | r"""Check if the given regular expression matches the last part of the
shebang if one exists. | def shebang_matches(text, regex):
r"""Check if the given regular expression matches the last part of the
shebang if one exists.
>>> from pygments.util import shebang_matches
>>> shebang_matches('#!/usr/bin/env python', r'python(2\.\d)?')
True
>>> shebang_matches('#!/usr/bin/pyth... | [
"def",
"shebang_matches",
"(",
"text",
",",
"regex",
")",
":",
"index",
"=",
"text",
".",
"find",
"(",
"'\\n'",
")",
"if",
"index",
">=",
"0",
":",
"first_line",
"=",
"text",
"[",
":",
"index",
"]",
".",
"lower",
"(",
")",
"else",
":",
"first_line"... | [
123,
0
] | [
165,
16
] | python | en | ['en', 'en', 'en'] | True |
doctype_matches | (text, regex) | Check if the doctype matches a regular expression (if present).
Note that this method only checks the first part of a DOCTYPE.
eg: 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
| Check if the doctype matches a regular expression (if present). | def doctype_matches(text, regex):
"""Check if the doctype matches a regular expression (if present).
Note that this method only checks the first part of a DOCTYPE.
eg: 'html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"'
"""
m = doctype_lookup_re.match(text)
if m is None:
return False
d... | [
"def",
"doctype_matches",
"(",
"text",
",",
"regex",
")",
":",
"m",
"=",
"doctype_lookup_re",
".",
"match",
"(",
"text",
")",
"if",
"m",
"is",
"None",
":",
"return",
"False",
"doctype",
"=",
"m",
".",
"group",
"(",
"2",
")",
"return",
"re",
".",
"c... | [
168,
0
] | [
178,
69
] | python | en | ['en', 'en', 'en'] | True |
html_doctype_matches | (text) | Check if the file looks like it has a html doctype. | Check if the file looks like it has a html doctype. | def html_doctype_matches(text):
"""Check if the file looks like it has a html doctype."""
return doctype_matches(text, r'html') | [
"def",
"html_doctype_matches",
"(",
"text",
")",
":",
"return",
"doctype_matches",
"(",
"text",
",",
"r'html'",
")"
] | [
181,
0
] | [
183,
41
] | python | en | ['en', 'en', 'en'] | True |
looks_like_xml | (text) | Check if a doctype exists or if we have some tags. | Check if a doctype exists or if we have some tags. | def looks_like_xml(text):
"""Check if a doctype exists or if we have some tags."""
if xml_decl_re.match(text):
return True
key = hash(text)
try:
return _looks_like_xml_cache[key]
except KeyError:
m = doctype_lookup_re.match(text)
if m is not None:
return T... | [
"def",
"looks_like_xml",
"(",
"text",
")",
":",
"if",
"xml_decl_re",
".",
"match",
"(",
"text",
")",
":",
"return",
"True",
"key",
"=",
"hash",
"(",
"text",
")",
"try",
":",
"return",
"_looks_like_xml_cache",
"[",
"key",
"]",
"except",
"KeyError",
":",
... | [
189,
0
] | [
202,
17
] | python | en | ['en', 'en', 'en'] | True |
unirange | (a, b) | Returns a regular expression string to match the given non-BMP range. | Returns a regular expression string to match the given non-BMP range. | def unirange(a, b):
"""Returns a regular expression string to match the given non-BMP range."""
if b < a:
raise ValueError("Bad character range")
if a < 0x10000 or b < 0x10000:
raise ValueError("unirange is only defined for non-BMP ranges")
if sys.maxunicode > 0xffff:
# wide bui... | [
"def",
"unirange",
"(",
"a",
",",
"b",
")",
":",
"if",
"b",
"<",
"a",
":",
"raise",
"ValueError",
"(",
"\"Bad character range\"",
")",
"if",
"a",
"<",
"0x10000",
"or",
"b",
"<",
"0x10000",
":",
"raise",
"ValueError",
"(",
"\"unirange is only defined for no... | [
216,
0
] | [
252,
49
] | python | en | ['en', 'en', 'en'] | True |
format_lines | (var_name, seq, raw=False, indent_level=0) | Formats a sequence of strings for output. | Formats a sequence of strings for output. | def format_lines(var_name, seq, raw=False, indent_level=0):
"""Formats a sequence of strings for output."""
lines = []
base_indent = ' ' * indent_level * 4
inner_indent = ' ' * (indent_level + 1) * 4
lines.append(base_indent + var_name + ' = (')
if raw:
# These should be preformatted rep... | [
"def",
"format_lines",
"(",
"var_name",
",",
"seq",
",",
"raw",
"=",
"False",
",",
"indent_level",
"=",
"0",
")",
":",
"lines",
"=",
"[",
"]",
"base_indent",
"=",
"' '",
"*",
"indent_level",
"*",
"4",
"inner_indent",
"=",
"' '",
"*",
"(",
"indent_level... | [
255,
0
] | [
271,
27
] | python | en | ['en', 'en', 'en'] | True |
duplicates_removed | (it, already_seen=()) |
Returns a list with duplicates removed from the iterable `it`.
Order is preserved.
|
Returns a list with duplicates removed from the iterable `it`. | def duplicates_removed(it, already_seen=()):
"""
Returns a list with duplicates removed from the iterable `it`.
Order is preserved.
"""
lst = []
seen = set()
for i in it:
if i in seen or i in already_seen:
continue
lst.append(i)
seen.add(i)
return lst | [
"def",
"duplicates_removed",
"(",
"it",
",",
"already_seen",
"=",
"(",
")",
")",
":",
"lst",
"=",
"[",
"]",
"seen",
"=",
"set",
"(",
")",
"for",
"i",
"in",
"it",
":",
"if",
"i",
"in",
"seen",
"or",
"i",
"in",
"already_seen",
":",
"continue",
"lst... | [
274,
0
] | [
287,
14
] | python | en | ['en', 'error', 'th'] | False |
guess_decode | (text) | Decode *text* with guessed encoding.
First try UTF-8; this should fail for non-UTF-8 encodings.
Then try the preferred locale encoding.
Fall back to latin-1, which always works.
| Decode *text* with guessed encoding. | def guess_decode(text):
"""Decode *text* with guessed encoding.
First try UTF-8; this should fail for non-UTF-8 encodings.
Then try the preferred locale encoding.
Fall back to latin-1, which always works.
"""
try:
text = text.decode('utf-8')
return text, 'utf-8'
except Unico... | [
"def",
"guess_decode",
"(",
"text",
")",
":",
"try",
":",
"text",
"=",
"text",
".",
"decode",
"(",
"'utf-8'",
")",
"return",
"text",
",",
"'utf-8'",
"except",
"UnicodeDecodeError",
":",
"try",
":",
"import",
"locale",
"prefencoding",
"=",
"locale",
".",
... | [
300,
0
] | [
318,
33
] | python | en | ['en', 'en', 'en'] | True |
guess_decode_from_terminal | (text, term) | Decode *text* coming from terminal *term*.
First try the terminal encoding, if given.
Then try UTF-8. Then try the preferred locale encoding.
Fall back to latin-1, which always works.
| Decode *text* coming from terminal *term*. | def guess_decode_from_terminal(text, term):
"""Decode *text* coming from terminal *term*.
First try the terminal encoding, if given.
Then try UTF-8. Then try the preferred locale encoding.
Fall back to latin-1, which always works.
"""
if getattr(term, 'encoding', None):
try:
... | [
"def",
"guess_decode_from_terminal",
"(",
"text",
",",
"term",
")",
":",
"if",
"getattr",
"(",
"term",
",",
"'encoding'",
",",
"None",
")",
":",
"try",
":",
"text",
"=",
"text",
".",
"decode",
"(",
"term",
".",
"encoding",
")",
"except",
"UnicodeDecodeEr... | [
321,
0
] | [
335,
29
] | python | en | ['en', 'en', 'en'] | True |
terminal_encoding | (term) | Return our best guess of encoding for the given *term*. | Return our best guess of encoding for the given *term*. | def terminal_encoding(term):
"""Return our best guess of encoding for the given *term*."""
if getattr(term, 'encoding', None):
return term.encoding
import locale
return locale.getpreferredencoding() | [
"def",
"terminal_encoding",
"(",
"term",
")",
":",
"if",
"getattr",
"(",
"term",
",",
"'encoding'",
",",
"None",
")",
":",
"return",
"term",
".",
"encoding",
"import",
"locale",
"return",
"locale",
".",
"getpreferredencoding",
"(",
")"
] | [
338,
0
] | [
343,
40
] | python | en | ['en', 'en', 'en'] | True |
add_metaclass | (metaclass) | Class decorator for creating a class with a metaclass. | Class decorator for creating a class with a metaclass. | def add_metaclass(metaclass):
"""Class decorator for creating a class with a metaclass."""
def wrapper(cls):
orig_vars = cls.__dict__.copy()
orig_vars.pop('__dict__', None)
orig_vars.pop('__weakref__', None)
for slots_var in orig_vars.get('__slots__', ()):
orig_vars.p... | [
"def",
"add_metaclass",
"(",
"metaclass",
")",
":",
"def",
"wrapper",
"(",
"cls",
")",
":",
"orig_vars",
"=",
"cls",
".",
"__dict__",
".",
"copy",
"(",
")",
"orig_vars",
".",
"pop",
"(",
"'__dict__'",
",",
"None",
")",
"orig_vars",
".",
"pop",
"(",
"... | [
377,
0
] | [
386,
18
] | python | en | ['en', 'en', 'en'] | True |
WaitForSingleObject | (obj) | Async and cancellable variant of WaitForSingleObject. Windows only.
Args:
handle: A Win32 handle, as a Python integer.
Raises:
OSError: If the handle is invalid, e.g. when it is already closed.
| Async and cancellable variant of WaitForSingleObject. Windows only. | async def WaitForSingleObject(obj):
"""Async and cancellable variant of WaitForSingleObject. Windows only.
Args:
handle: A Win32 handle, as a Python integer.
Raises:
OSError: If the handle is invalid, e.g. when it is already closed.
"""
# Allow ints or whatever we can convert to a win... | [
"async",
"def",
"WaitForSingleObject",
"(",
"obj",
")",
":",
"# Allow ints or whatever we can convert to a win handle",
"handle",
"=",
"_handle",
"(",
"obj",
")",
"# Quick check; we might not even need to spawn a thread. The zero",
"# means a zero timeout; this call never blocks. We al... | [
12,
0
] | [
49,
43
] | python | en | ['en', 'en', 'en'] | True |
WaitForMultipleObjects_sync | (*handles) | Wait for any of the given Windows handles to be signaled. | Wait for any of the given Windows handles to be signaled. | def WaitForMultipleObjects_sync(*handles):
"""Wait for any of the given Windows handles to be signaled."""
n = len(handles)
handle_arr = ffi.new("HANDLE[{}]".format(n))
for i in range(n):
handle_arr[i] = handles[i]
timeout = 0xFFFFFFFF # INFINITE
retcode = kernel32.WaitForMultipleObject... | [
"def",
"WaitForMultipleObjects_sync",
"(",
"*",
"handles",
")",
":",
"n",
"=",
"len",
"(",
"handles",
")",
"handle_arr",
"=",
"ffi",
".",
"new",
"(",
"\"HANDLE[{}]\"",
".",
"format",
"(",
"n",
")",
")",
"for",
"i",
"in",
"range",
"(",
"n",
")",
":",
... | [
52,
0
] | [
61,
24
] | python | en | ['en', 'en', 'en'] | True |
wsc_data_query | (stations) |
Fetch data from WSC for the given stations by running
# the database/web queries in parallel.
|
Fetch data from WSC for the given stations by running
# the database/web queries in parallel.
| def wsc_data_query(stations):
"""
Fetch data from WSC for the given stations by running
# the database/web queries in parallel.
"""
t0 = time.time()
# Collect fetch methods for all dashboard modules
# fetch_method = {module.id: getattr(
# module, 'fetch_data') for module in modules}
... | [
"def",
"wsc_data_query",
"(",
"stations",
")",
":",
"t0",
"=",
"time",
".",
"time",
"(",
")",
"# Collect fetch methods for all dashboard modules",
"# fetch_method = {module.id: getattr(",
"# module, 'fetch_data') for module in modules}",
"# Create a thread pool: one separate thre... | [
50,
0
] | [
77,
55
] | python | en | ['en', 'error', 'th'] | False |
test_cli_works_from_adjacent_directory_without_config_flag | (
monkeypatch, empty_data_context
) | We don't care about the NOUN here just combinations of the config flag | We don't care about the NOUN here just combinations of the config flag | def test_cli_works_from_adjacent_directory_without_config_flag(
monkeypatch, empty_data_context
):
"""We don't care about the NOUN here just combinations of the config flag"""
runner = CliRunner(mix_stderr=True)
monkeypatch.chdir(os.path.dirname(empty_data_context.root_directory))
result = runner.in... | [
"def",
"test_cli_works_from_adjacent_directory_without_config_flag",
"(",
"monkeypatch",
",",
"empty_data_context",
")",
":",
"runner",
"=",
"CliRunner",
"(",
"mix_stderr",
"=",
"True",
")",
"monkeypatch",
".",
"chdir",
"(",
"os",
".",
"path",
".",
"dirname",
"(",
... | [
89,
0
] | [
97,
50
] | python | en | ['en', 'en', 'en'] | True |
test_cli_works_from_great_expectations_directory_without_config_flag | (
monkeypatch, empty_data_context
) | We don't care about the NOUN here just combinations of the config flag | We don't care about the NOUN here just combinations of the config flag | def test_cli_works_from_great_expectations_directory_without_config_flag(
monkeypatch, empty_data_context
):
"""We don't care about the NOUN here just combinations of the config flag"""
runner = CliRunner(mix_stderr=True)
monkeypatch.chdir(empty_data_context.root_directory)
result = runner.invoke(cl... | [
"def",
"test_cli_works_from_great_expectations_directory_without_config_flag",
"(",
"monkeypatch",
",",
"empty_data_context",
")",
":",
"runner",
"=",
"CliRunner",
"(",
"mix_stderr",
"=",
"True",
")",
"monkeypatch",
".",
"chdir",
"(",
"empty_data_context",
".",
"root_dire... | [
100,
0
] | [
108,
50
] | python | en | ['en', 'en', 'en'] | True |
test_cli_works_from_random_directory_with_config_flag_fully_specified_yml | (
monkeypatch, empty_data_context, tmp_path_factory
) | We don't care about the NOUN here just combinations of the config flag | We don't care about the NOUN here just combinations of the config flag | def test_cli_works_from_random_directory_with_config_flag_fully_specified_yml(
monkeypatch, empty_data_context, tmp_path_factory
):
"""We don't care about the NOUN here just combinations of the config flag"""
context = empty_data_context
runner = CliRunner(mix_stderr=True)
temp_dir = tmp_path_factor... | [
"def",
"test_cli_works_from_random_directory_with_config_flag_fully_specified_yml",
"(",
"monkeypatch",
",",
"empty_data_context",
",",
"tmp_path_factory",
")",
":",
"context",
"=",
"empty_data_context",
"runner",
"=",
"CliRunner",
"(",
"mix_stderr",
"=",
"True",
")",
"temp... | [
111,
0
] | [
125,
50
] | python | en | ['en', 'en', 'en'] | True |
test_cli_works_from_random_directory_with_config_flag_great_expectations_directory | (
monkeypatch, empty_data_context, tmp_path_factory
) | We don't care about the NOUN here just combinations of the config flag | We don't care about the NOUN here just combinations of the config flag | def test_cli_works_from_random_directory_with_config_flag_great_expectations_directory(
monkeypatch, empty_data_context, tmp_path_factory
):
"""We don't care about the NOUN here just combinations of the config flag"""
context = empty_data_context
runner = CliRunner(mix_stderr=True)
temp_dir = tmp_pa... | [
"def",
"test_cli_works_from_random_directory_with_config_flag_great_expectations_directory",
"(",
"monkeypatch",
",",
"empty_data_context",
",",
"tmp_path_factory",
")",
":",
"context",
"=",
"empty_data_context",
"runner",
"=",
"CliRunner",
"(",
"mix_stderr",
"=",
"True",
")"... | [
128,
0
] | [
142,
50
] | python | en | ['en', 'en', 'en'] | True |
test_cli_works_from_random_directory_with_c_flag_fully_specified_yml | (
monkeypatch, empty_data_context, tmp_path_factory
) | We don't care about the NOUN here just combinations of the config flag | We don't care about the NOUN here just combinations of the config flag | def test_cli_works_from_random_directory_with_c_flag_fully_specified_yml(
monkeypatch, empty_data_context, tmp_path_factory
):
"""We don't care about the NOUN here just combinations of the config flag"""
context = empty_data_context
runner = CliRunner(mix_stderr=True)
temp_dir = tmp_path_factory.mkt... | [
"def",
"test_cli_works_from_random_directory_with_c_flag_fully_specified_yml",
"(",
"monkeypatch",
",",
"empty_data_context",
",",
"tmp_path_factory",
")",
":",
"context",
"=",
"empty_data_context",
"runner",
"=",
"CliRunner",
"(",
"mix_stderr",
"=",
"True",
")",
"temp_dir"... | [
145,
0
] | [
159,
50
] | python | en | ['en', 'en', 'en'] | True |
test_cli_works_from_random_directory_with_c_flag_great_expectations_directory | (
monkeypatch, empty_data_context, tmp_path_factory
) | We don't care about the NOUN here just combinations of the config flag | We don't care about the NOUN here just combinations of the config flag | def test_cli_works_from_random_directory_with_c_flag_great_expectations_directory(
monkeypatch, empty_data_context, tmp_path_factory
):
"""We don't care about the NOUN here just combinations of the config flag"""
context = empty_data_context
runner = CliRunner(mix_stderr=True)
temp_dir = tmp_path_fa... | [
"def",
"test_cli_works_from_random_directory_with_c_flag_great_expectations_directory",
"(",
"monkeypatch",
",",
"empty_data_context",
",",
"tmp_path_factory",
")",
":",
"context",
"=",
"empty_data_context",
"runner",
"=",
"CliRunner",
"(",
"mix_stderr",
"=",
"True",
")",
"... | [
162,
0
] | [
176,
50
] | python | en | ['en', 'en', 'en'] | True |
test_assume_yes_using_full_flag_using_checkpoint_delete | (
mock_emit,
caplog,
monkeypatch,
empty_context_with_checkpoint_v1_stats_enabled,
) |
What does this test and why?
All versions of the --assume-yes flag (--assume-yes/--yes/-y) should behave the same.
|
What does this test and why?
All versions of the --assume-yes flag (--assume-yes/--yes/-y) should behave the same.
| def test_assume_yes_using_full_flag_using_checkpoint_delete(
mock_emit,
caplog,
monkeypatch,
empty_context_with_checkpoint_v1_stats_enabled,
):
"""
What does this test and why?
All versions of the --assume-yes flag (--assume-yes/--yes/-y) should behave the same.
"""
context: DataCont... | [
"def",
"test_assume_yes_using_full_flag_using_checkpoint_delete",
"(",
"mock_emit",
",",
"caplog",
",",
"monkeypatch",
",",
"empty_context_with_checkpoint_v1_stats_enabled",
",",
")",
":",
"context",
":",
"DataContext",
"=",
"empty_context_with_checkpoint_v1_stats_enabled",
"monk... | [
480,
0
] | [
546,
44
] | python | en | ['en', 'error', 'th'] | False |
test_assume_yes_using_yes_flag_using_checkpoint_delete | (
mock_emit,
caplog,
monkeypatch,
empty_context_with_checkpoint_v1_stats_enabled,
) |
What does this test and why?
All versions of the --assume-yes flag (--assume-yes/--yes/-y) should behave the same.
|
What does this test and why?
All versions of the --assume-yes flag (--assume-yes/--yes/-y) should behave the same.
| def test_assume_yes_using_yes_flag_using_checkpoint_delete(
mock_emit,
caplog,
monkeypatch,
empty_context_with_checkpoint_v1_stats_enabled,
):
"""
What does this test and why?
All versions of the --assume-yes flag (--assume-yes/--yes/-y) should behave the same.
"""
context: DataConte... | [
"def",
"test_assume_yes_using_yes_flag_using_checkpoint_delete",
"(",
"mock_emit",
",",
"caplog",
",",
"monkeypatch",
",",
"empty_context_with_checkpoint_v1_stats_enabled",
",",
")",
":",
"context",
":",
"DataContext",
"=",
"empty_context_with_checkpoint_v1_stats_enabled",
"monke... | [
552,
0
] | [
618,
44
] | python | en | ['en', 'error', 'th'] | False |
test_assume_yes_using_y_flag_using_checkpoint_delete | (
mock_emit,
caplog,
monkeypatch,
empty_context_with_checkpoint_v1_stats_enabled,
) |
What does this test and why?
All versions of the --assume-yes flag (--assume-yes/--yes/-y) should behave the same.
|
What does this test and why?
All versions of the --assume-yes flag (--assume-yes/--yes/-y) should behave the same.
| def test_assume_yes_using_y_flag_using_checkpoint_delete(
mock_emit,
caplog,
monkeypatch,
empty_context_with_checkpoint_v1_stats_enabled,
):
"""
What does this test and why?
All versions of the --assume-yes flag (--assume-yes/--yes/-y) should behave the same.
"""
context: DataContext... | [
"def",
"test_assume_yes_using_y_flag_using_checkpoint_delete",
"(",
"mock_emit",
",",
"caplog",
",",
"monkeypatch",
",",
"empty_context_with_checkpoint_v1_stats_enabled",
",",
")",
":",
"context",
":",
"DataContext",
"=",
"empty_context_with_checkpoint_v1_stats_enabled",
"monkeyp... | [
624,
0
] | [
690,
44
] | python | en | ['en', 'error', 'th'] | False |
test_using_assume_yes_flag_on_command_with_no_assume_yes_implementation | (
mock_emit,
caplog,
monkeypatch,
titanic_pandas_data_context_with_v013_datasource_stats_enabled_with_checkpoints_v1_with_templates,
) |
What does this test and why?
The --assume-yes flag should not cause issues when run with commands that do not implement any logic based on it.
|
What does this test and why?
The --assume-yes flag should not cause issues when run with commands that do not implement any logic based on it.
| def test_using_assume_yes_flag_on_command_with_no_assume_yes_implementation(
mock_emit,
caplog,
monkeypatch,
titanic_pandas_data_context_with_v013_datasource_stats_enabled_with_checkpoints_v1_with_templates,
):
"""
What does this test and why?
The --assume-yes flag should not cause issues wh... | [
"def",
"test_using_assume_yes_flag_on_command_with_no_assume_yes_implementation",
"(",
"mock_emit",
",",
"caplog",
",",
"monkeypatch",
",",
"titanic_pandas_data_context_with_v013_datasource_stats_enabled_with_checkpoints_v1_with_templates",
",",
")",
":",
"context",
":",
"DataContext",... | [
696,
0
] | [
755,
5
] | python | en | ['en', 'error', 'th'] | False |
variable_t.__init__ | (
self,
name='',
decl_type=None,
type_qualifiers=None,
value=None,
bits=None,
mangled=None) | creates class that describes C++ global or member variable | creates class that describes C++ global or member variable | def __init__(
self,
name='',
decl_type=None,
type_qualifiers=None,
value=None,
bits=None,
mangled=None):
"""creates class that describes C++ global or member variable"""
declaration.declaration_t.__init__(self, name)
... | [
"def",
"__init__",
"(",
"self",
",",
"name",
"=",
"''",
",",
"decl_type",
"=",
"None",
",",
"type_qualifiers",
"=",
"None",
",",
"value",
"=",
"None",
",",
"bits",
"=",
"None",
",",
"mangled",
"=",
"None",
")",
":",
"declaration",
".",
"declaration_t",... | [
17,
4
] | [
32,
31
] | python | en | ['en', 'en', 'en'] | True |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.