Repository: great-expectations/great_expectations

Issue:
Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`


Discussion:
Done inline during improve_partitions push.

Resolving patch:
diff --git a/great_expectations/core/usage_statistics/anonymizers/types/__init__.py b/great_expectations/core/usage_statistics/anonymizers/types/__init__.py
new file mode 100644
diff --git a/great_expectations/core/usage_statistics/anonymizers/types/base.py b/great_expectations/core/usage_statistics/anonymizers/types/base.py
new file mode 100644
--- /dev/null
+++ b/great_expectations/core/usage_statistics/anonymizers/types/base.py
@@ -0,0 +1,5 @@
+GETTING_STARTED_DATASOURCE_NAME: str = "getting_started_datasource"
+GETTING_STARTED_EXPECTATION_SUITE_NAME: str = (
+    "getting_started_expectation_suite_taxi.demo"
+)
+GETTING_STARTED_CHECKPOINT_NAME: str = "getting_started_checkpoint"


Test patch:
diff --git a/tests/integration/docusaurus/tutorials/getting-started/getting_started.py b/tests/integration/docusaurus/tutorials/getting-started/getting_started.py
--- a/tests/integration/docusaurus/tutorials/getting-started/getting_started.py
+++ b/tests/integration/docusaurus/tutorials/getting-started/getting_started.py
@@ -8,13 +8,19 @@
 )
 from great_expectations.validator.validator import Validator
 
+from great_expectations.core.usage_statistics.anonymizers.types.base import (  # isort:skip
+    GETTING_STARTED_DATASOURCE_NAME,
+    GETTING_STARTED_EXPECTATION_SUITE_NAME,
+    GETTING_STARTED_CHECKPOINT_NAME,
+)
+
 context = ge.get_context()
 # NOTE: The following assertion is only for testing and can be ignored by users.
 assert context
 
 # First configure a new Datasource and add to DataContext
 datasource_yaml = f"""
-name: getting_started_datasource
+name: {GETTING_STARTED_DATASOURCE_NAME}
 class_name: Datasource
 module_name: great_expectations.datasource
 execution_engine:
@@ -38,17 +44,17 @@
 
 # Get Validator by creating ExpectationSuite and passing in BatchRequest
 batch_request = BatchRequest(
-    datasource_name="getting_started_datasource",
+    datasource_name=GETTING_STARTED_DATASOURCE_NAME,
     data_connector_name="default_inferred_data_connector_name",
     data_asset_name="yellow_tripdata_sample_2019-01.csv",
     limit=1000,
 )
 context.create_expectation_suite(
-    expectation_suite_name="getting_started_expectation_suite_taxi.demo"
+    expectation_suite_name=GETTING_STARTED_EXPECTATION_SUITE_NAME
 )
 validator = context.get_validator(
     batch_request=batch_request,
-    expectation_suite_name="getting_started_expectation_suite_taxi.demo",
+    expectation_suite_name=GETTING_STARTED_EXPECTATION_SUITE_NAME,
 )
 # NOTE: The following assertion is only for testing and can be ignored by users.
 assert isinstance(validator, Validator)
@@ -90,18 +96,18 @@
 
 # Create first checkpoint on yellow_tripdata_sample_2019-01.csv
 my_checkpoint_config = f"""
-name: getting_started_checkpoint
+name: {GETTING_STARTED_CHECKPOINT_NAME}
 config_version: 1.0
 class_name: SimpleCheckpoint
 run_name_template: "%Y%m%d-%H%M%S-my-run-name-template"
 validations:
   - batch_request:
-      datasource_name: getting_started_datasource
+      datasource_name: {GETTING_STARTED_DATASOURCE_NAME}
       data_connector_name: default_inferred_data_connector_name
       data_asset_name: yellow_tripdata_sample_2019-01.csv
       data_connector_query:
         index: -1
-    expectation_suite_name: getting_started_expectation_suite_taxi.demo
+    expectation_suite_name: {GETTING_STARTED_EXPECTATION_SUITE_NAME}
 """
 my_checkpoint_config = yaml.load(my_checkpoint_config)
 
@@ -117,18 +123,18 @@
 
 # Create second checkpoint on yellow_tripdata_sample_2019-02.csv
 yaml_config = f"""
-name: getting_started_checkpoint
+name: {GETTING_STARTED_CHECKPOINT_NAME}
 config_version: 1.0
 class_name: SimpleCheckpoint
 run_name_template: "%Y%m%d-%H%M%S-my-run-name-template"
 validations:
   - batch_request:
-      datasource_name: getting_started_datasource
+      datasource_name: {GETTING_STARTED_DATASOURCE_NAME}
       data_connector_name: default_inferred_data_connector_name
       data_asset_name: yellow_tripdata_sample_2019-02.csv
       data_connector_query:
         index: -1
-    expectation_suite_name: getting_started_expectation_suite_taxi.demo
+    expectation_suite_name: {GETTING_STARTED_EXPECTATION_SUITE_NAME}
 """