cumulusci-plus 5.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cumulusci-plus might be problematic. Click here for more details.
- cumulusci/__about__.py +1 -0
- cumulusci/__init__.py +22 -0
- cumulusci/__main__.py +3 -0
- cumulusci/cli/__init__.py +0 -0
- cumulusci/cli/cci.py +244 -0
- cumulusci/cli/error.py +125 -0
- cumulusci/cli/flow.py +185 -0
- cumulusci/cli/logger.py +72 -0
- cumulusci/cli/org.py +692 -0
- cumulusci/cli/plan.py +181 -0
- cumulusci/cli/project.py +391 -0
- cumulusci/cli/robot.py +116 -0
- cumulusci/cli/runtime.py +190 -0
- cumulusci/cli/service.py +521 -0
- cumulusci/cli/task.py +295 -0
- cumulusci/cli/tests/__init__.py +0 -0
- cumulusci/cli/tests/test_cci.py +545 -0
- cumulusci/cli/tests/test_error.py +170 -0
- cumulusci/cli/tests/test_flow.py +276 -0
- cumulusci/cli/tests/test_logger.py +25 -0
- cumulusci/cli/tests/test_org.py +1438 -0
- cumulusci/cli/tests/test_plan.py +245 -0
- cumulusci/cli/tests/test_project.py +235 -0
- cumulusci/cli/tests/test_robot.py +177 -0
- cumulusci/cli/tests/test_runtime.py +197 -0
- cumulusci/cli/tests/test_service.py +853 -0
- cumulusci/cli/tests/test_task.py +266 -0
- cumulusci/cli/tests/test_ui.py +310 -0
- cumulusci/cli/tests/test_utils.py +122 -0
- cumulusci/cli/tests/utils.py +52 -0
- cumulusci/cli/ui.py +234 -0
- cumulusci/cli/utils.py +150 -0
- cumulusci/conftest.py +181 -0
- cumulusci/core/__init__.py +0 -0
- cumulusci/core/config/BaseConfig.py +5 -0
- cumulusci/core/config/BaseTaskFlowConfig.py +5 -0
- cumulusci/core/config/OrgConfig.py +5 -0
- cumulusci/core/config/ScratchOrgConfig.py +5 -0
- cumulusci/core/config/__init__.py +125 -0
- cumulusci/core/config/base_config.py +111 -0
- cumulusci/core/config/base_task_flow_config.py +82 -0
- cumulusci/core/config/marketing_cloud_service_config.py +83 -0
- cumulusci/core/config/oauth2_service_config.py +17 -0
- cumulusci/core/config/org_config.py +604 -0
- cumulusci/core/config/project_config.py +782 -0
- cumulusci/core/config/scratch_org_config.py +251 -0
- cumulusci/core/config/sfdx_org_config.py +220 -0
- cumulusci/core/config/tests/_test_config_backwards_compatibility.py +33 -0
- cumulusci/core/config/tests/test_config.py +1895 -0
- cumulusci/core/config/tests/test_config_expensive.py +839 -0
- cumulusci/core/config/tests/test_config_util.py +91 -0
- cumulusci/core/config/universal_config.py +88 -0
- cumulusci/core/config/util.py +18 -0
- cumulusci/core/datasets.py +303 -0
- cumulusci/core/debug.py +33 -0
- cumulusci/core/dependencies/__init__.py +55 -0
- cumulusci/core/dependencies/base.py +561 -0
- cumulusci/core/dependencies/dependencies.py +273 -0
- cumulusci/core/dependencies/github.py +177 -0
- cumulusci/core/dependencies/github_resolvers.py +244 -0
- cumulusci/core/dependencies/resolvers.py +580 -0
- cumulusci/core/dependencies/tests/__init__.py +0 -0
- cumulusci/core/dependencies/tests/conftest.py +385 -0
- cumulusci/core/dependencies/tests/test_dependencies.py +950 -0
- cumulusci/core/dependencies/tests/test_github.py +83 -0
- cumulusci/core/dependencies/tests/test_resolvers.py +1027 -0
- cumulusci/core/dependencies/utils.py +13 -0
- cumulusci/core/enums.py +11 -0
- cumulusci/core/exceptions.py +311 -0
- cumulusci/core/flowrunner.py +888 -0
- cumulusci/core/github.py +665 -0
- cumulusci/core/keychain/__init__.py +24 -0
- cumulusci/core/keychain/base_project_keychain.py +441 -0
- cumulusci/core/keychain/encrypted_file_project_keychain.py +945 -0
- cumulusci/core/keychain/environment_project_keychain.py +7 -0
- cumulusci/core/keychain/serialization.py +152 -0
- cumulusci/core/keychain/subprocess_keychain.py +24 -0
- cumulusci/core/keychain/tests/conftest.py +50 -0
- cumulusci/core/keychain/tests/test_base_project_keychain.py +299 -0
- cumulusci/core/keychain/tests/test_encrypted_file_project_keychain.py +1228 -0
- cumulusci/core/metadeploy/__init__.py +0 -0
- cumulusci/core/metadeploy/api.py +88 -0
- cumulusci/core/metadeploy/plans.py +25 -0
- cumulusci/core/metadeploy/tests/test_api.py +276 -0
- cumulusci/core/runtime.py +115 -0
- cumulusci/core/sfdx.py +162 -0
- cumulusci/core/source/__init__.py +16 -0
- cumulusci/core/source/github.py +50 -0
- cumulusci/core/source/local_folder.py +35 -0
- cumulusci/core/source_transforms/__init__.py +0 -0
- cumulusci/core/source_transforms/tests/test_transforms.py +1091 -0
- cumulusci/core/source_transforms/transforms.py +532 -0
- cumulusci/core/tasks.py +404 -0
- cumulusci/core/template_utils.py +59 -0
- cumulusci/core/tests/__init__.py +0 -0
- cumulusci/core/tests/cassettes/TestDatasetsE2E.test_datasets_e2e.yaml +215 -0
- cumulusci/core/tests/cassettes/TestDatasetsE2E.test_datasets_extract_standard_objects.yaml +199 -0
- cumulusci/core/tests/cassettes/TestDatasetsE2E.test_datasets_read_explicit_extract_declaration.yaml +3 -0
- cumulusci/core/tests/fake_remote_repo/cumulusci.yml +32 -0
- cumulusci/core/tests/fake_remote_repo/tasks/directory/example_2.py +6 -0
- cumulusci/core/tests/fake_remote_repo/tasks/example.py +43 -0
- cumulusci/core/tests/fake_remote_repo_2/cumulusci.yml +11 -0
- cumulusci/core/tests/fake_remote_repo_2/tasks/example_3.py +6 -0
- cumulusci/core/tests/test_datasets_e2e.py +386 -0
- cumulusci/core/tests/test_exceptions.py +11 -0
- cumulusci/core/tests/test_flowrunner.py +836 -0
- cumulusci/core/tests/test_github.py +942 -0
- cumulusci/core/tests/test_sfdx.py +138 -0
- cumulusci/core/tests/test_source.py +678 -0
- cumulusci/core/tests/test_tasks.py +262 -0
- cumulusci/core/tests/test_utils.py +141 -0
- cumulusci/core/tests/test_utils_merge_config.py +276 -0
- cumulusci/core/tests/test_versions.py +76 -0
- cumulusci/core/tests/untrusted_repo_child/cumulusci.yml +7 -0
- cumulusci/core/tests/untrusted_repo_child/tasks/untrusted_child.py +6 -0
- cumulusci/core/tests/untrusted_repo_parent/cumulusci.yml +26 -0
- cumulusci/core/tests/untrusted_repo_parent/tasks/untrusted_parent.py +6 -0
- cumulusci/core/tests/utils.py +116 -0
- cumulusci/core/tests/yaml/global.yaml +0 -0
- cumulusci/core/utils.py +402 -0
- cumulusci/core/versions.py +149 -0
- cumulusci/cumulusci.yml +1621 -0
- cumulusci/files/admin_profile.xml +20 -0
- cumulusci/files/delete_excludes.txt +424 -0
- cumulusci/files/templates/project/README.md +12 -0
- cumulusci/files/templates/project/cumulusci.yml +63 -0
- cumulusci/files/templates/project/dot-gitignore +60 -0
- cumulusci/files/templates/project/mapping.yml +45 -0
- cumulusci/files/templates/project/scratch_def.json +25 -0
- cumulusci/oauth/__init__.py +0 -0
- cumulusci/oauth/client.py +400 -0
- cumulusci/oauth/exceptions.py +9 -0
- cumulusci/oauth/salesforce.py +95 -0
- cumulusci/oauth/tests/__init__.py +0 -0
- cumulusci/oauth/tests/cassettes/test_get_device_code.yaml +22 -0
- cumulusci/oauth/tests/cassettes/test_get_device_oauth_token.yaml +74 -0
- cumulusci/oauth/tests/test_client.py +308 -0
- cumulusci/oauth/tests/test_salesforce.py +46 -0
- cumulusci/plugins/__init__.py +3 -0
- cumulusci/plugins/plugin_base.py +93 -0
- cumulusci/plugins/plugin_loader.py +59 -0
- cumulusci/robotframework/CumulusCI.py +340 -0
- cumulusci/robotframework/CumulusCI.robot +7 -0
- cumulusci/robotframework/Performance.py +165 -0
- cumulusci/robotframework/Salesforce.py +936 -0
- cumulusci/robotframework/Salesforce.robot +192 -0
- cumulusci/robotframework/SalesforceAPI.py +416 -0
- cumulusci/robotframework/SalesforcePlaywright.py +220 -0
- cumulusci/robotframework/SalesforcePlaywright.robot +40 -0
- cumulusci/robotframework/__init__.py +2 -0
- cumulusci/robotframework/base_library.py +39 -0
- cumulusci/robotframework/faker_mixin.py +89 -0
- cumulusci/robotframework/form_handlers.py +222 -0
- cumulusci/robotframework/javascript/cci_init.js +34 -0
- cumulusci/robotframework/javascript/cumulusci.js +4 -0
- cumulusci/robotframework/locator_manager.py +197 -0
- cumulusci/robotframework/locators_56.py +88 -0
- cumulusci/robotframework/locators_57.py +5 -0
- cumulusci/robotframework/pageobjects/BasePageObjects.py +433 -0
- cumulusci/robotframework/pageobjects/ObjectManagerPageObject.py +246 -0
- cumulusci/robotframework/pageobjects/PageObjectLibrary.py +45 -0
- cumulusci/robotframework/pageobjects/PageObjects.py +351 -0
- cumulusci/robotframework/pageobjects/__init__.py +12 -0
- cumulusci/robotframework/pageobjects/baseobjects.py +120 -0
- cumulusci/robotframework/perftests/short/collection_perf.robot +105 -0
- cumulusci/robotframework/tests/CustomObjectTestPage.py +10 -0
- cumulusci/robotframework/tests/FooTestPage.py +8 -0
- cumulusci/robotframework/tests/cumulusci/base.robot +40 -0
- cumulusci/robotframework/tests/cumulusci/bulkdata.robot +38 -0
- cumulusci/robotframework/tests/cumulusci/communities.robot +57 -0
- cumulusci/robotframework/tests/cumulusci/datagen.robot +84 -0
- cumulusci/robotframework/tests/salesforce/TestLibraryA.py +24 -0
- cumulusci/robotframework/tests/salesforce/TestLibraryB.py +20 -0
- cumulusci/robotframework/tests/salesforce/TestListener.py +93 -0
- cumulusci/robotframework/tests/salesforce/api.robot +178 -0
- cumulusci/robotframework/tests/salesforce/browsers.robot +143 -0
- cumulusci/robotframework/tests/salesforce/classic.robot +51 -0
- cumulusci/robotframework/tests/salesforce/create_contact.robot +59 -0
- cumulusci/robotframework/tests/salesforce/faker.robot +68 -0
- cumulusci/robotframework/tests/salesforce/forms.robot +172 -0
- cumulusci/robotframework/tests/salesforce/label_locator.robot +244 -0
- cumulusci/robotframework/tests/salesforce/labels.html +33 -0
- cumulusci/robotframework/tests/salesforce/locators.robot +149 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/base_pageobjects.robot +100 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/example_page_object.py +25 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/listing_page.robot +115 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/objectmanager.robot +74 -0
- cumulusci/robotframework/tests/salesforce/pageobjects/pageobjects.robot +171 -0
- cumulusci/robotframework/tests/salesforce/performance.robot +109 -0
- cumulusci/robotframework/tests/salesforce/playwright/javascript_keywords.robot +33 -0
- cumulusci/robotframework/tests/salesforce/playwright/open_test_browser.robot +48 -0
- cumulusci/robotframework/tests/salesforce/playwright/playwright.robot +24 -0
- cumulusci/robotframework/tests/salesforce/playwright/ui.robot +32 -0
- cumulusci/robotframework/tests/salesforce/populate.robot +89 -0
- cumulusci/robotframework/tests/salesforce/test_testlistener.py +37 -0
- cumulusci/robotframework/tests/salesforce/ui.robot +361 -0
- cumulusci/robotframework/tests/test_cumulusci_library.py +304 -0
- cumulusci/robotframework/tests/test_locator_manager.py +158 -0
- cumulusci/robotframework/tests/test_pageobjects.py +291 -0
- cumulusci/robotframework/tests/test_performance.py +38 -0
- cumulusci/robotframework/tests/test_salesforce.py +79 -0
- cumulusci/robotframework/tests/test_salesforce_locators.py +73 -0
- cumulusci/robotframework/tests/test_template_util.py +53 -0
- cumulusci/robotframework/tests/test_utils.py +106 -0
- cumulusci/robotframework/utils.py +283 -0
- cumulusci/salesforce_api/__init__.py +0 -0
- cumulusci/salesforce_api/exceptions.py +23 -0
- cumulusci/salesforce_api/filterable_objects.py +96 -0
- cumulusci/salesforce_api/mc_soap_envelopes.py +89 -0
- cumulusci/salesforce_api/metadata.py +721 -0
- cumulusci/salesforce_api/org_schema.py +571 -0
- cumulusci/salesforce_api/org_schema_models.py +226 -0
- cumulusci/salesforce_api/package_install.py +265 -0
- cumulusci/salesforce_api/package_zip.py +301 -0
- cumulusci/salesforce_api/rest_deploy.py +148 -0
- cumulusci/salesforce_api/retrieve_profile_api.py +301 -0
- cumulusci/salesforce_api/soap_envelopes.py +177 -0
- cumulusci/salesforce_api/tests/__init__.py +0 -0
- cumulusci/salesforce_api/tests/metadata_test_strings.py +24 -0
- cumulusci/salesforce_api/tests/test_metadata.py +1015 -0
- cumulusci/salesforce_api/tests/test_package_install.py +219 -0
- cumulusci/salesforce_api/tests/test_package_zip.py +380 -0
- cumulusci/salesforce_api/tests/test_rest_deploy.py +264 -0
- cumulusci/salesforce_api/tests/test_retrieve_profile_api.py +337 -0
- cumulusci/salesforce_api/tests/test_utils.py +124 -0
- cumulusci/salesforce_api/utils.py +51 -0
- cumulusci/schema/cumulusci.jsonschema.json +782 -0
- cumulusci/tasks/__init__.py +0 -0
- cumulusci/tasks/apex/__init__.py +0 -0
- cumulusci/tasks/apex/anon.py +157 -0
- cumulusci/tasks/apex/batch.py +180 -0
- cumulusci/tasks/apex/testrunner.py +835 -0
- cumulusci/tasks/apex/tests/cassettes/ManualEditTestApexIntegrationTests.test_run_tests__integration_test.yaml +703 -0
- cumulusci/tasks/apex/tests/test_apex_tasks.py +1558 -0
- cumulusci/tasks/base_source_control_task.py +17 -0
- cumulusci/tasks/bulkdata/__init__.py +15 -0
- cumulusci/tasks/bulkdata/base_generate_data_task.py +96 -0
- cumulusci/tasks/bulkdata/dates.py +97 -0
- cumulusci/tasks/bulkdata/delete.py +156 -0
- cumulusci/tasks/bulkdata/extract.py +441 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/calculate_dependencies.py +117 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/extract_yml.py +123 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/hardcoded_default_declarations.py +49 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/synthesize_extract_declarations.py +283 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/tests/test_extract_yml.py +142 -0
- cumulusci/tasks/bulkdata/extract_dataset_utils/tests/test_synthesize_extract_declarations.py +575 -0
- cumulusci/tasks/bulkdata/factory_utils.py +134 -0
- cumulusci/tasks/bulkdata/generate.py +4 -0
- cumulusci/tasks/bulkdata/generate_and_load_data.py +232 -0
- cumulusci/tasks/bulkdata/generate_and_load_data_from_yaml.py +19 -0
- cumulusci/tasks/bulkdata/generate_from_yaml.py +183 -0
- cumulusci/tasks/bulkdata/generate_mapping.py +434 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/dependency_map.py +169 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/extract_mapping_file_generator.py +45 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/generate_mapping_from_declarations.py +121 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/load_mapping_file_generator.py +127 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/mapping_generator_post_processes.py +53 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/mapping_transforms.py +139 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/tests/test_generate_extract_mapping_from_declarations.py +135 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/tests/test_generate_load_mapping_from_declarations.py +330 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/tests/test_mapping_generator_post_processes.py +60 -0
- cumulusci/tasks/bulkdata/generate_mapping_utils/tests/test_mapping_transforms.py +188 -0
- cumulusci/tasks/bulkdata/load.py +1196 -0
- cumulusci/tasks/bulkdata/mapping_parser.py +811 -0
- cumulusci/tasks/bulkdata/query_transformers.py +264 -0
- cumulusci/tasks/bulkdata/select_utils.py +792 -0
- cumulusci/tasks/bulkdata/snowfakery.py +753 -0
- cumulusci/tasks/bulkdata/snowfakery_utils/queue_manager.py +478 -0
- cumulusci/tasks/bulkdata/snowfakery_utils/snowfakery_run_until.py +141 -0
- cumulusci/tasks/bulkdata/snowfakery_utils/snowfakery_working_directory.py +53 -0
- cumulusci/tasks/bulkdata/snowfakery_utils/subtask_configurator.py +64 -0
- cumulusci/tasks/bulkdata/step.py +1242 -0
- cumulusci/tasks/bulkdata/tests/__init__.py +0 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_random_strategy.yaml +147 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_similarity_annoy_strategy.yaml +123 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_similarity_select_and_insert_strategy.yaml +313 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_similarity_select_and_insert_strategy_bulk.yaml +550 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_similarity_strategy.yaml +175 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSelect.test_select_standard_strategy.yaml +147 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSnowfakery.test_run_until_records_in_org__multiple_needed.yaml +69 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSnowfakery.test_run_until_records_in_org__none_needed.yaml +22 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSnowfakery.test_run_until_records_in_org__one_needed.yaml +24 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestSnowfakery.test_snowfakery_query_salesforce.yaml +25 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpdatesIntegrationTests.test_updates_task.yaml +80 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_simple_upsert__rest.yaml +270 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_upsert__rest.yaml +267 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_upsert_complex_external_id_field__rest.yaml +369 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_upsert_complex_external_id_field_rest__duplicate_error.yaml +204 -0
- cumulusci/tasks/bulkdata/tests/cassettes/TestUpsert.test_upsert_complex_fields__bulk.yaml +675 -0
- cumulusci/tasks/bulkdata/tests/dummy_data_factory.py +36 -0
- cumulusci/tasks/bulkdata/tests/integration_test_utils.py +49 -0
- cumulusci/tasks/bulkdata/tests/mapping-oid.yml +87 -0
- cumulusci/tasks/bulkdata/tests/mapping_after.yml +38 -0
- cumulusci/tasks/bulkdata/tests/mapping_poly.yml +34 -0
- cumulusci/tasks/bulkdata/tests/mapping_poly_incomplete.yml +20 -0
- cumulusci/tasks/bulkdata/tests/mapping_poly_wrong.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_select.yml +20 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_invalid_strategy.yml +20 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_invalid_threshold__invalid_number.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_invalid_threshold__invalid_strategy.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_invalid_threshold__non_float.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_missing_priority_fields.yml +22 -0
- cumulusci/tasks/bulkdata/tests/mapping_select_no_priority_fields.yml +18 -0
- cumulusci/tasks/bulkdata/tests/mapping_simple.yml +27 -0
- cumulusci/tasks/bulkdata/tests/mapping_v1.yml +28 -0
- cumulusci/tasks/bulkdata/tests/mapping_v2.yml +21 -0
- cumulusci/tasks/bulkdata/tests/mapping_v3.yml +32 -0
- cumulusci/tasks/bulkdata/tests/mapping_vanilla_sf.yml +69 -0
- cumulusci/tasks/bulkdata/tests/mock_data_factory_without_mapping.py +12 -0
- cumulusci/tasks/bulkdata/tests/person_accounts.yml +23 -0
- cumulusci/tasks/bulkdata/tests/person_accounts_minimal.yml +15 -0
- cumulusci/tasks/bulkdata/tests/recordtypes.yml +8 -0
- cumulusci/tasks/bulkdata/tests/recordtypes_2.yml +6 -0
- cumulusci/tasks/bulkdata/tests/recordtypes_with_ispersontype.yml +8 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/child/child2.yml +3 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/child.yml +4 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/gen_npsp_standard_objects.recipe.yml +89 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/include_parent.yml +3 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/npsp_standard_objects_macros.yml +34 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/options.recipe.yml +6 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/query_snowfakery.recipe.yml +16 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/sf_standard_object_macros.yml +83 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery.load.yml +2 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery.recipe.yml +13 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery_2.load.yml +5 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery_channels.load.yml +13 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery_channels.recipe.yml +12 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/simple_snowfakery_channels_2.load.yml +13 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/unique_values.recipe.yml +4 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/upsert.recipe.yml +23 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/upsert_2.recipe.yml +29 -0
- cumulusci/tasks/bulkdata/tests/snowfakery/upsert_before.yml +10 -0
- cumulusci/tasks/bulkdata/tests/test_base_generate_data_tasks.py +61 -0
- cumulusci/tasks/bulkdata/tests/test_dates.py +99 -0
- cumulusci/tasks/bulkdata/tests/test_delete.py +404 -0
- cumulusci/tasks/bulkdata/tests/test_extract.py +1311 -0
- cumulusci/tasks/bulkdata/tests/test_factory_utils.py +55 -0
- cumulusci/tasks/bulkdata/tests/test_generate_and_load.py +252 -0
- cumulusci/tasks/bulkdata/tests/test_generate_from_snowfakery_task.py +343 -0
- cumulusci/tasks/bulkdata/tests/test_generatemapping.py +1039 -0
- cumulusci/tasks/bulkdata/tests/test_load.py +3175 -0
- cumulusci/tasks/bulkdata/tests/test_mapping_parser.py +1658 -0
- cumulusci/tasks/bulkdata/tests/test_query_db__joins_self_lookups.yml +12 -0
- cumulusci/tasks/bulkdata/tests/test_query_db_joins_lookups.yml +26 -0
- cumulusci/tasks/bulkdata/tests/test_query_db_joins_lookups_select.yml +48 -0
- cumulusci/tasks/bulkdata/tests/test_select.py +171 -0
- cumulusci/tasks/bulkdata/tests/test_select_utils.py +1057 -0
- cumulusci/tasks/bulkdata/tests/test_snowfakery.py +1153 -0
- cumulusci/tasks/bulkdata/tests/test_step.py +3957 -0
- cumulusci/tasks/bulkdata/tests/test_updates.py +513 -0
- cumulusci/tasks/bulkdata/tests/test_upsert.py +1015 -0
- cumulusci/tasks/bulkdata/tests/test_utils.py +158 -0
- cumulusci/tasks/bulkdata/tests/testdata.db +0 -0
- cumulusci/tasks/bulkdata/tests/update_describe.py +50 -0
- cumulusci/tasks/bulkdata/tests/update_person_accounts.yml +23 -0
- cumulusci/tasks/bulkdata/tests/utils.py +114 -0
- cumulusci/tasks/bulkdata/update_data.py +260 -0
- cumulusci/tasks/bulkdata/upsert_utils.py +130 -0
- cumulusci/tasks/bulkdata/utils.py +249 -0
- cumulusci/tasks/command.py +178 -0
- cumulusci/tasks/connectedapp.py +186 -0
- cumulusci/tasks/create_package_version.py +778 -0
- cumulusci/tasks/datadictionary.py +745 -0
- cumulusci/tasks/dx_convert_from.py +26 -0
- cumulusci/tasks/github/__init__.py +17 -0
- cumulusci/tasks/github/base.py +16 -0
- cumulusci/tasks/github/commit_status.py +13 -0
- cumulusci/tasks/github/merge.py +11 -0
- cumulusci/tasks/github/publish.py +11 -0
- cumulusci/tasks/github/pull_request.py +11 -0
- cumulusci/tasks/github/release.py +11 -0
- cumulusci/tasks/github/release_report.py +11 -0
- cumulusci/tasks/github/tag.py +11 -0
- cumulusci/tasks/github/tests/__init__.py +0 -0
- cumulusci/tasks/github/tests/test_util.py +202 -0
- cumulusci/tasks/github/tests/test_vcs_migration.py +44 -0
- cumulusci/tasks/github/tests/util_github_api.py +666 -0
- cumulusci/tasks/github/util.py +252 -0
- cumulusci/tasks/marketing_cloud/__init__.py +0 -0
- cumulusci/tasks/marketing_cloud/api.py +188 -0
- cumulusci/tasks/marketing_cloud/base.py +38 -0
- cumulusci/tasks/marketing_cloud/deploy.py +345 -0
- cumulusci/tasks/marketing_cloud/get_user_info.py +40 -0
- cumulusci/tasks/marketing_cloud/mc_constants.py +1 -0
- cumulusci/tasks/marketing_cloud/tests/__init__.py +0 -0
- cumulusci/tasks/marketing_cloud/tests/conftest.py +46 -0
- cumulusci/tasks/marketing_cloud/tests/expected-payload.json +110 -0
- cumulusci/tasks/marketing_cloud/tests/test_api.py +97 -0
- cumulusci/tasks/marketing_cloud/tests/test_api_soap_envelopes.py +145 -0
- cumulusci/tasks/marketing_cloud/tests/test_base.py +14 -0
- cumulusci/tasks/marketing_cloud/tests/test_deploy.py +400 -0
- cumulusci/tasks/marketing_cloud/tests/test_get_user_info.py +141 -0
- cumulusci/tasks/marketing_cloud/tests/validation-response.json +39 -0
- cumulusci/tasks/metadata/__init__.py +0 -0
- cumulusci/tasks/metadata/ee_src.py +94 -0
- cumulusci/tasks/metadata/managed_src.py +100 -0
- cumulusci/tasks/metadata/metadata_map.yml +868 -0
- cumulusci/tasks/metadata/modify.py +99 -0
- cumulusci/tasks/metadata/package.py +684 -0
- cumulusci/tasks/metadata/tests/__init__.py +0 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/.hidden/.keep +0 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/destructiveChanges.xml +9 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/package.xml +9 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/package_install_uninstall.xml +11 -0
- cumulusci/tasks/metadata/tests/package_metadata/namespaced_report_folder/reports/namespace__TestFolder/TestReport.report +3 -0
- cumulusci/tasks/metadata/tests/sample_package.xml +9 -0
- cumulusci/tasks/metadata/tests/test_ee_src.py +112 -0
- cumulusci/tasks/metadata/tests/test_managed_src.py +111 -0
- cumulusci/tasks/metadata/tests/test_modify.py +123 -0
- cumulusci/tasks/metadata/tests/test_package.py +476 -0
- cumulusci/tasks/metadata_etl/__init__.py +29 -0
- cumulusci/tasks/metadata_etl/base.py +436 -0
- cumulusci/tasks/metadata_etl/duplicate_rules.py +24 -0
- cumulusci/tasks/metadata_etl/field_sets.py +70 -0
- cumulusci/tasks/metadata_etl/help_text.py +92 -0
- cumulusci/tasks/metadata_etl/layouts.py +550 -0
- cumulusci/tasks/metadata_etl/objects.py +68 -0
- cumulusci/tasks/metadata_etl/permissions.py +167 -0
- cumulusci/tasks/metadata_etl/picklists.py +221 -0
- cumulusci/tasks/metadata_etl/remote_site_settings.py +99 -0
- cumulusci/tasks/metadata_etl/sharing.py +138 -0
- cumulusci/tasks/metadata_etl/tests/test_base.py +512 -0
- cumulusci/tasks/metadata_etl/tests/test_duplicate_rules.py +22 -0
- cumulusci/tasks/metadata_etl/tests/test_field_sets.py +156 -0
- cumulusci/tasks/metadata_etl/tests/test_help_text.py +387 -0
- cumulusci/tasks/metadata_etl/tests/test_ip_ranges.py +85 -0
- cumulusci/tasks/metadata_etl/tests/test_layouts.py +858 -0
- cumulusci/tasks/metadata_etl/tests/test_objects.py +236 -0
- cumulusci/tasks/metadata_etl/tests/test_permissions.py +223 -0
- cumulusci/tasks/metadata_etl/tests/test_picklists.py +547 -0
- cumulusci/tasks/metadata_etl/tests/test_remote_site_settings.py +46 -0
- cumulusci/tasks/metadata_etl/tests/test_sharing.py +333 -0
- cumulusci/tasks/metadata_etl/tests/test_value_sets.py +298 -0
- cumulusci/tasks/metadata_etl/value_sets.py +106 -0
- cumulusci/tasks/metadeploy.py +393 -0
- cumulusci/tasks/metaxml.py +88 -0
- cumulusci/tasks/preflight/__init__.py +0 -0
- cumulusci/tasks/preflight/dataset_load.py +49 -0
- cumulusci/tasks/preflight/licenses.py +86 -0
- cumulusci/tasks/preflight/packages.py +14 -0
- cumulusci/tasks/preflight/permsets.py +23 -0
- cumulusci/tasks/preflight/recordtypes.py +16 -0
- cumulusci/tasks/preflight/retrieve_tasks.py +30 -0
- cumulusci/tasks/preflight/settings.py +77 -0
- cumulusci/tasks/preflight/sobjects.py +202 -0
- cumulusci/tasks/preflight/tests/test_dataset_load.py +85 -0
- cumulusci/tasks/preflight/tests/test_licenses.py +174 -0
- cumulusci/tasks/preflight/tests/test_packages.py +14 -0
- cumulusci/tasks/preflight/tests/test_permset_preflights.py +51 -0
- cumulusci/tasks/preflight/tests/test_recordtypes.py +30 -0
- cumulusci/tasks/preflight/tests/test_retrieve_tasks.py +62 -0
- cumulusci/tasks/preflight/tests/test_settings.py +130 -0
- cumulusci/tasks/preflight/tests/test_sobjects.py +231 -0
- cumulusci/tasks/push/README.md +59 -0
- cumulusci/tasks/push/__init__.py +0 -0
- cumulusci/tasks/push/push_api.py +659 -0
- cumulusci/tasks/push/pushfails.py +136 -0
- cumulusci/tasks/push/tasks.py +476 -0
- cumulusci/tasks/push/tests/conftest.py +263 -0
- cumulusci/tasks/push/tests/test_push_api.py +951 -0
- cumulusci/tasks/push/tests/test_push_tasks.py +659 -0
- cumulusci/tasks/release_notes/README.md +63 -0
- cumulusci/tasks/release_notes/__init__.py +0 -0
- cumulusci/tasks/release_notes/exceptions.py +5 -0
- cumulusci/tasks/release_notes/generator.py +137 -0
- cumulusci/tasks/release_notes/parser.py +232 -0
- cumulusci/tasks/release_notes/provider.py +44 -0
- cumulusci/tasks/release_notes/task.py +300 -0
- cumulusci/tasks/release_notes/tests/__init__.py +0 -0
- cumulusci/tasks/release_notes/tests/change_notes/full/example1.md +17 -0
- cumulusci/tasks/release_notes/tests/change_notes/multi/1.txt +1 -0
- cumulusci/tasks/release_notes/tests/change_notes/multi/2.txt +1 -0
- cumulusci/tasks/release_notes/tests/change_notes/multi/3.txt +1 -0
- cumulusci/tasks/release_notes/tests/change_notes/single/1.txt +1 -0
- cumulusci/tasks/release_notes/tests/test_generator.py +582 -0
- cumulusci/tasks/release_notes/tests/test_parser.py +867 -0
- cumulusci/tasks/release_notes/tests/test_provider.py +512 -0
- cumulusci/tasks/release_notes/tests/test_task.py +461 -0
- cumulusci/tasks/release_notes/tests/utils.py +153 -0
- cumulusci/tasks/robotframework/__init__.py +3 -0
- cumulusci/tasks/robotframework/debugger/DebugListener.py +100 -0
- cumulusci/tasks/robotframework/debugger/__init__.py +10 -0
- cumulusci/tasks/robotframework/debugger/model.py +87 -0
- cumulusci/tasks/robotframework/debugger/ui.py +259 -0
- cumulusci/tasks/robotframework/libdoc.py +269 -0
- cumulusci/tasks/robotframework/robotframework.py +392 -0
- cumulusci/tasks/robotframework/stylesheet.css +130 -0
- cumulusci/tasks/robotframework/template.html +109 -0
- cumulusci/tasks/robotframework/tests/TestLibrary.py +18 -0
- cumulusci/tasks/robotframework/tests/TestPageObjects.py +31 -0
- cumulusci/tasks/robotframework/tests/TestResource.robot +8 -0
- cumulusci/tasks/robotframework/tests/failing_tests.robot +16 -0
- cumulusci/tasks/robotframework/tests/performance.robot +23 -0
- cumulusci/tasks/robotframework/tests/test_browser_proxies.py +137 -0
- cumulusci/tasks/robotframework/tests/test_debugger.py +360 -0
- cumulusci/tasks/robotframework/tests/test_robot_parallel.py +141 -0
- cumulusci/tasks/robotframework/tests/test_robotframework.py +860 -0
- cumulusci/tasks/salesforce/BaseRetrieveMetadata.py +58 -0
- cumulusci/tasks/salesforce/BaseSalesforceApiTask.py +45 -0
- cumulusci/tasks/salesforce/BaseSalesforceMetadataApiTask.py +18 -0
- cumulusci/tasks/salesforce/BaseSalesforceTask.py +4 -0
- cumulusci/tasks/salesforce/BaseUninstallMetadata.py +41 -0
- cumulusci/tasks/salesforce/CreateCommunity.py +124 -0
- cumulusci/tasks/salesforce/CreatePackage.py +29 -0
- cumulusci/tasks/salesforce/Deploy.py +240 -0
- cumulusci/tasks/salesforce/DeployBundles.py +88 -0
- cumulusci/tasks/salesforce/DescribeMetadataTypes.py +26 -0
- cumulusci/tasks/salesforce/EnsureRecordTypes.py +202 -0
- cumulusci/tasks/salesforce/GetInstalledPackages.py +8 -0
- cumulusci/tasks/salesforce/ListCommunities.py +40 -0
- cumulusci/tasks/salesforce/ListCommunityTemplates.py +19 -0
- cumulusci/tasks/salesforce/PublishCommunity.py +62 -0
- cumulusci/tasks/salesforce/RetrievePackaged.py +41 -0
- cumulusci/tasks/salesforce/RetrieveReportsAndDashboards.py +82 -0
- cumulusci/tasks/salesforce/RetrieveUnpackaged.py +36 -0
- cumulusci/tasks/salesforce/SOQLQuery.py +39 -0
- cumulusci/tasks/salesforce/UninstallLocal.py +15 -0
- cumulusci/tasks/salesforce/UninstallLocalBundles.py +28 -0
- cumulusci/tasks/salesforce/UninstallLocalNamespacedBundles.py +58 -0
- cumulusci/tasks/salesforce/UninstallPackage.py +32 -0
- cumulusci/tasks/salesforce/UninstallPackaged.py +56 -0
- cumulusci/tasks/salesforce/UpdateAdminProfile.py +8 -0
- cumulusci/tasks/salesforce/__init__.py +79 -0
- cumulusci/tasks/salesforce/activate_flow.py +74 -0
- cumulusci/tasks/salesforce/check_components.py +324 -0
- cumulusci/tasks/salesforce/composite.py +142 -0
- cumulusci/tasks/salesforce/create_permission_sets.py +35 -0
- cumulusci/tasks/salesforce/custom_settings.py +134 -0
- cumulusci/tasks/salesforce/custom_settings_wait.py +132 -0
- cumulusci/tasks/salesforce/enable_prediction.py +107 -0
- cumulusci/tasks/salesforce/insert_record.py +40 -0
- cumulusci/tasks/salesforce/install_package_version.py +242 -0
- cumulusci/tasks/salesforce/license_preflights.py +8 -0
- cumulusci/tasks/salesforce/network_member_group.py +178 -0
- cumulusci/tasks/salesforce/nonsourcetracking.py +228 -0
- cumulusci/tasks/salesforce/org_settings.py +193 -0
- cumulusci/tasks/salesforce/package_upload.py +328 -0
- cumulusci/tasks/salesforce/profiles.py +74 -0
- cumulusci/tasks/salesforce/promote_package_version.py +376 -0
- cumulusci/tasks/salesforce/retrieve_profile.py +195 -0
- cumulusci/tasks/salesforce/salesforce_files.py +244 -0
- cumulusci/tasks/salesforce/sourcetracking.py +507 -0
- cumulusci/tasks/salesforce/tests/__init__.py +3 -0
- cumulusci/tasks/salesforce/tests/test_CreateCommunity.py +278 -0
- cumulusci/tasks/salesforce/tests/test_CreatePackage.py +22 -0
- cumulusci/tasks/salesforce/tests/test_Deploy.py +470 -0
- cumulusci/tasks/salesforce/tests/test_DeployBundles.py +76 -0
- cumulusci/tasks/salesforce/tests/test_EnsureRecordTypes.py +345 -0
- cumulusci/tasks/salesforce/tests/test_ListCommunities.py +84 -0
- cumulusci/tasks/salesforce/tests/test_ListCommunityTemplates.py +49 -0
- cumulusci/tasks/salesforce/tests/test_PackageUpload.py +547 -0
- cumulusci/tasks/salesforce/tests/test_ProfileGrantAllAccess.py +699 -0
- cumulusci/tasks/salesforce/tests/test_PublishCommunity.py +181 -0
- cumulusci/tasks/salesforce/tests/test_RetrievePackaged.py +24 -0
- cumulusci/tasks/salesforce/tests/test_RetrieveReportsAndDashboards.py +56 -0
- cumulusci/tasks/salesforce/tests/test_RetrieveUnpackaged.py +21 -0
- cumulusci/tasks/salesforce/tests/test_SOQLQuery.py +30 -0
- cumulusci/tasks/salesforce/tests/test_UninstallLocal.py +15 -0
- cumulusci/tasks/salesforce/tests/test_UninstallLocalBundles.py +19 -0
- cumulusci/tasks/salesforce/tests/test_UninstallLocalNamespacedBundles.py +22 -0
- cumulusci/tasks/salesforce/tests/test_UninstallPackage.py +19 -0
- cumulusci/tasks/salesforce/tests/test_UninstallPackaged.py +66 -0
- cumulusci/tasks/salesforce/tests/test_UninstallPackagedIncremental.py +127 -0
- cumulusci/tasks/salesforce/tests/test_activate_flow.py +132 -0
- cumulusci/tasks/salesforce/tests/test_base_tasks.py +110 -0
- cumulusci/tasks/salesforce/tests/test_check_components.py +445 -0
- cumulusci/tasks/salesforce/tests/test_composite.py +250 -0
- cumulusci/tasks/salesforce/tests/test_create_permission_sets.py +41 -0
- cumulusci/tasks/salesforce/tests/test_custom_settings.py +227 -0
- cumulusci/tasks/salesforce/tests/test_custom_settings_wait.py +174 -0
- cumulusci/tasks/salesforce/tests/test_describemetadatatypes.py +18 -0
- cumulusci/tasks/salesforce/tests/test_enable_prediction.py +240 -0
- cumulusci/tasks/salesforce/tests/test_insert_record.py +110 -0
- cumulusci/tasks/salesforce/tests/test_install_package_version.py +464 -0
- cumulusci/tasks/salesforce/tests/test_network_member_group.py +444 -0
- cumulusci/tasks/salesforce/tests/test_nonsourcetracking.py +235 -0
- cumulusci/tasks/salesforce/tests/test_org_settings.py +407 -0
- cumulusci/tasks/salesforce/tests/test_profiles.py +202 -0
- cumulusci/tasks/salesforce/tests/test_retrieve_profile.py +287 -0
- cumulusci/tasks/salesforce/tests/test_salesforce_files.py +228 -0
- cumulusci/tasks/salesforce/tests/test_sourcetracking.py +350 -0
- cumulusci/tasks/salesforce/tests/test_trigger_handlers.py +300 -0
- cumulusci/tasks/salesforce/tests/test_update_dependencies.py +509 -0
- cumulusci/tasks/salesforce/tests/util.py +79 -0
- cumulusci/tasks/salesforce/trigger_handlers.py +119 -0
- cumulusci/tasks/salesforce/uninstall_packaged_incremental.py +136 -0
- cumulusci/tasks/salesforce/update_dependencies.py +290 -0
- cumulusci/tasks/salesforce/update_profile.py +339 -0
- cumulusci/tasks/salesforce/users/permsets.py +227 -0
- cumulusci/tasks/salesforce/users/photos.py +162 -0
- cumulusci/tasks/salesforce/users/tests/photo.mock.txt +1 -0
- cumulusci/tasks/salesforce/users/tests/test_permsets.py +950 -0
- cumulusci/tasks/salesforce/users/tests/test_photos.py +373 -0
- cumulusci/tasks/sample_data/capture_sample_data.py +77 -0
- cumulusci/tasks/sample_data/load_sample_data.py +85 -0
- cumulusci/tasks/sample_data/test_capture_sample_data.py +117 -0
- cumulusci/tasks/sample_data/test_load_sample_data.py +121 -0
- cumulusci/tasks/sfdx.py +83 -0
- cumulusci/tasks/tests/__init__.py +1 -0
- cumulusci/tasks/tests/conftest.py +30 -0
- cumulusci/tasks/tests/test_command.py +129 -0
- cumulusci/tasks/tests/test_connectedapp.py +236 -0
- cumulusci/tasks/tests/test_create_package_version.py +847 -0
- cumulusci/tasks/tests/test_datadictionary.py +1575 -0
- cumulusci/tasks/tests/test_dx_convert_from.py +60 -0
- cumulusci/tasks/tests/test_metadeploy.py +624 -0
- cumulusci/tasks/tests/test_metaxml.py +99 -0
- cumulusci/tasks/tests/test_promote_package_version.py +488 -0
- cumulusci/tasks/tests/test_pushfails.py +96 -0
- cumulusci/tasks/tests/test_salesforce.py +72 -0
- cumulusci/tasks/tests/test_sfdx.py +105 -0
- cumulusci/tasks/tests/test_util.py +207 -0
- cumulusci/tasks/util.py +261 -0
- cumulusci/tasks/vcs/__init__.py +19 -0
- cumulusci/tasks/vcs/commit_status.py +58 -0
- cumulusci/tasks/vcs/create_commit_status.py +37 -0
- cumulusci/tasks/vcs/download_extract.py +199 -0
- cumulusci/tasks/vcs/merge.py +298 -0
- cumulusci/tasks/vcs/publish.py +207 -0
- cumulusci/tasks/vcs/pull_request.py +9 -0
- cumulusci/tasks/vcs/release.py +134 -0
- cumulusci/tasks/vcs/release_report.py +105 -0
- cumulusci/tasks/vcs/tag.py +31 -0
- cumulusci/tasks/vcs/tests/github/test_commit_status.py +196 -0
- cumulusci/tasks/vcs/tests/github/test_download_extract.py +896 -0
- cumulusci/tasks/vcs/tests/github/test_merge.py +1118 -0
- cumulusci/tasks/vcs/tests/github/test_publish.py +823 -0
- cumulusci/tasks/vcs/tests/github/test_pull_request.py +29 -0
- cumulusci/tasks/vcs/tests/github/test_release.py +390 -0
- cumulusci/tasks/vcs/tests/github/test_release_report.py +109 -0
- cumulusci/tasks/vcs/tests/github/test_tag.py +90 -0
- cumulusci/tasks/vlocity/exceptions.py +2 -0
- cumulusci/tasks/vlocity/tests/test_vlocity.py +283 -0
- cumulusci/tasks/vlocity/vlocity.py +342 -0
- cumulusci/tests/__init__.py +1 -0
- cumulusci/tests/cassettes/GET_sobjects_Account_PersonAccount_describe.yaml +18 -0
- cumulusci/tests/cassettes/TestIntegrationInfrastructure.test_integration_tests.yaml +19 -0
- cumulusci/tests/pytest_plugins/pytest_sf_orgconnect.py +307 -0
- cumulusci/tests/pytest_plugins/pytest_sf_vcr.py +275 -0
- cumulusci/tests/pytest_plugins/pytest_sf_vcr_serializer.py +160 -0
- cumulusci/tests/pytest_plugins/pytest_typeguard.py +5 -0
- cumulusci/tests/pytest_plugins/test_vcr_string_compressor.py +49 -0
- cumulusci/tests/pytest_plugins/vcr_string_compressor.py +97 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Account_describe.yaml +18 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Case_describe.yaml +18 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Contact_describe.yaml +4838 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Custom__c_describe.yaml +242 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Event_describe.yaml +19 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Global_describe.yaml +1338 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Lead_describe.yaml +18 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_OpportunityContactRole_describe.yaml +34 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Opportunity_describe.yaml +1261 -0
- cumulusci/tests/shared_cassettes/GET_sobjects_Organization.yaml +49 -0
- cumulusci/tests/shared_cassettes/vcr_string_templates/batchInfoList_xml.tpl +15 -0
- cumulusci/tests/shared_cassettes/vcr_string_templates/batchInfo_xml.tpl +13 -0
- cumulusci/tests/shared_cassettes/vcr_string_templates/jobInfo_insert_xml.tpl +24 -0
- cumulusci/tests/shared_cassettes/vcr_string_templates/jobInfo_upsert_xml.tpl +25 -0
- cumulusci/tests/test_entry_points.py +20 -0
- cumulusci/tests/test_integration_infrastructure.py +131 -0
- cumulusci/tests/test_main.py +9 -0
- cumulusci/tests/test_schema.py +32 -0
- cumulusci/tests/test_utils.py +657 -0
- cumulusci/tests/test_vcr_serializer.py +134 -0
- cumulusci/tests/uncompressed_cassette.yaml +83 -0
- cumulusci/tests/util.py +344 -0
- cumulusci/utils/__init__.py +731 -0
- cumulusci/utils/classutils.py +9 -0
- cumulusci/utils/collections.py +32 -0
- cumulusci/utils/deprecation.py +11 -0
- cumulusci/utils/encryption.py +31 -0
- cumulusci/utils/fileutils.py +295 -0
- cumulusci/utils/git.py +142 -0
- cumulusci/utils/http/multi_request.py +214 -0
- cumulusci/utils/http/requests_utils.py +103 -0
- cumulusci/utils/http/tests/cassettes/ManualEditTestCompositeParallelSalesforce.test_http_headers.yaml +32 -0
- cumulusci/utils/http/tests/cassettes/TestCompositeParallelSalesforce.test_composite_parallel_salesforce.yaml +65 -0
- cumulusci/utils/http/tests/cassettes/TestCompositeParallelSalesforce.test_errors.yaml +24 -0
- cumulusci/utils/http/tests/cassettes/TestCompositeParallelSalesforce.test_reference_ids.yaml +49 -0
- cumulusci/utils/http/tests/test_multi_request.py +255 -0
- cumulusci/utils/iterators.py +21 -0
- cumulusci/utils/logging.py +128 -0
- cumulusci/utils/metaprogramming.py +10 -0
- cumulusci/utils/options.py +138 -0
- cumulusci/utils/parallel/queries_in_parallel/run_queries_in_parallel.py +29 -0
- cumulusci/utils/parallel/queries_in_parallel/tests/test_run_queries_in_parallel.py +50 -0
- cumulusci/utils/parallel/task_worker_queues/parallel_worker.py +238 -0
- cumulusci/utils/parallel/task_worker_queues/parallel_worker_queue.py +243 -0
- cumulusci/utils/parallel/task_worker_queues/tests/test_parallel_worker.py +353 -0
- cumulusci/utils/salesforce/count_sobjects.py +46 -0
- cumulusci/utils/salesforce/soql.py +17 -0
- cumulusci/utils/salesforce/tests/cassettes/ManualEdit_TestCountSObjects.test_count_sobjects__network_errors.yaml +23 -0
- cumulusci/utils/salesforce/tests/cassettes/TestCountSObjects.test_count_sobjects__errors.yaml +33 -0
- cumulusci/utils/salesforce/tests/cassettes/TestCountSObjects.test_count_sobjects_simple.yaml +29 -0
- cumulusci/utils/salesforce/tests/test_count_sobjects.py +29 -0
- cumulusci/utils/salesforce/tests/test_soql.py +30 -0
- cumulusci/utils/tests/cassettes/ManualEditTestDescribeOrg.test_minimal_schema.yaml +36 -0
- cumulusci/utils/tests/cassettes/ManualEdit_test_describe_to_sql.yaml +191 -0
- cumulusci/utils/tests/test_fileutils.py +284 -0
- cumulusci/utils/tests/test_git.py +85 -0
- cumulusci/utils/tests/test_logging.py +70 -0
- cumulusci/utils/tests/test_option_parsing.py +188 -0
- cumulusci/utils/tests/test_org_schema.py +691 -0
- cumulusci/utils/tests/test_org_schema_models.py +79 -0
- cumulusci/utils/tests/test_waiting.py +25 -0
- cumulusci/utils/version_strings.py +391 -0
- cumulusci/utils/waiting.py +42 -0
- cumulusci/utils/xml/__init__.py +91 -0
- cumulusci/utils/xml/metadata_tree.py +299 -0
- cumulusci/utils/xml/robot_xml.py +114 -0
- cumulusci/utils/xml/salesforce_encoding.py +100 -0
- cumulusci/utils/xml/test/test_metadata_tree.py +251 -0
- cumulusci/utils/xml/test/test_salesforce_encoding.py +173 -0
- cumulusci/utils/yaml/cumulusci_yml.py +401 -0
- cumulusci/utils/yaml/model_parser.py +156 -0
- cumulusci/utils/yaml/safer_loader.py +74 -0
- cumulusci/utils/yaml/tests/bad_cci.yml +5 -0
- cumulusci/utils/yaml/tests/cassettes/TestCumulusciYml.test_validate_url__with_errors.yaml +20 -0
- cumulusci/utils/yaml/tests/test_cumulusci_yml.py +286 -0
- cumulusci/utils/yaml/tests/test_model_parser.py +175 -0
- cumulusci/utils/yaml/tests/test_safer_loader.py +88 -0
- cumulusci/utils/ziputils.py +61 -0
- cumulusci/vcs/base.py +143 -0
- cumulusci/vcs/bootstrap.py +272 -0
- cumulusci/vcs/github/__init__.py +24 -0
- cumulusci/vcs/github/adapter.py +689 -0
- cumulusci/vcs/github/release_notes/generator.py +219 -0
- cumulusci/vcs/github/release_notes/parser.py +151 -0
- cumulusci/vcs/github/release_notes/provider.py +143 -0
- cumulusci/vcs/github/service.py +569 -0
- cumulusci/vcs/github/tests/test_adapter.py +138 -0
- cumulusci/vcs/github/tests/test_service.py +408 -0
- cumulusci/vcs/models.py +586 -0
- cumulusci/vcs/tests/conftest.py +41 -0
- cumulusci/vcs/tests/dummy_service.py +241 -0
- cumulusci/vcs/tests/test_vcs_base.py +687 -0
- cumulusci/vcs/tests/test_vcs_bootstrap.py +727 -0
- cumulusci/vcs/utils/__init__.py +31 -0
- cumulusci/vcs/vcs_source.py +287 -0
- cumulusci_plus-5.0.0.dist-info/METADATA +145 -0
- cumulusci_plus-5.0.0.dist-info/RECORD +744 -0
- cumulusci_plus-5.0.0.dist-info/WHEEL +4 -0
- cumulusci_plus-5.0.0.dist-info/entry_points.txt +3 -0
- cumulusci_plus-5.0.0.dist-info/licenses/AUTHORS.rst +41 -0
- cumulusci_plus-5.0.0.dist-info/licenses/LICENSE +30 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from cumulusci.salesforce_api.org_schema_models import SObject
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class TestOrgSchemaModels:
|
|
7
|
+
def test_sobject__eq__true(self):
|
|
8
|
+
a = SObject(name="foo", createable=False)
|
|
9
|
+
b = SObject(name="foo", createable=False)
|
|
10
|
+
assert a == b
|
|
11
|
+
|
|
12
|
+
def test_sobject__eq__false(self):
|
|
13
|
+
a = SObject(name="foo", createable=False)
|
|
14
|
+
b = SObject(name="bar", createable=False)
|
|
15
|
+
assert a != b
|
|
16
|
+
b = SObject(name="bar", createable=True)
|
|
17
|
+
assert a != b
|
|
18
|
+
|
|
19
|
+
def test_repr(self):
|
|
20
|
+
a = SObject(name="foo", createable=False)
|
|
21
|
+
r = repr(a)
|
|
22
|
+
assert "foo" in r
|
|
23
|
+
assert "createable" in r
|
|
24
|
+
|
|
25
|
+
def test_roundtrip_mappings(self, temp_db):
|
|
26
|
+
with temp_db() as (connection, metadata, session):
|
|
27
|
+
session.add(SObject(name="Foo", urls={"a": "b"}))
|
|
28
|
+
session.commit()
|
|
29
|
+
with temp_db() as (connection, metadata, session):
|
|
30
|
+
foo = session.query(SObject).one()
|
|
31
|
+
assert foo["name"] == "Foo"
|
|
32
|
+
assert foo["urls"] == {"a": "b"}
|
|
33
|
+
|
|
34
|
+
def test_roundtrip_mappings__empty(self, temp_db):
|
|
35
|
+
# with temp_db() as open_db:
|
|
36
|
+
with temp_db() as (connection, metadata, session):
|
|
37
|
+
session.add(SObject(name="Foo", urls={}))
|
|
38
|
+
session.commit()
|
|
39
|
+
with temp_db() as (connection, metadata, session):
|
|
40
|
+
foo = session.query(SObject).one()
|
|
41
|
+
assert foo["name"] == "Foo"
|
|
42
|
+
assert foo["urls"] == {}
|
|
43
|
+
assert session.execute("select urls from sobjects").first()["urls"] is None
|
|
44
|
+
|
|
45
|
+
def test_roundtrip_sequences(self, temp_db):
|
|
46
|
+
# with temp_db() as open_db:
|
|
47
|
+
with temp_db() as (connection, metadata, session):
|
|
48
|
+
session.add(
|
|
49
|
+
SObject(name="Foo", childRelationships=[("a", "b"), ("c", "d")])
|
|
50
|
+
)
|
|
51
|
+
session.commit()
|
|
52
|
+
with temp_db() as (connection, metadata, session):
|
|
53
|
+
foo = session.query(SObject).one()
|
|
54
|
+
assert foo["name"] == "Foo"
|
|
55
|
+
assert foo["childRelationships"] == (("a", "b"), ("c", "d"))
|
|
56
|
+
|
|
57
|
+
def test_roundtrip_sequences__empty(self, temp_db):
|
|
58
|
+
with temp_db() as (connection, metadata, session):
|
|
59
|
+
session.add(SObject(name="Foo", childRelationships=[]))
|
|
60
|
+
session.commit()
|
|
61
|
+
with temp_db() as (connection, metadata, session):
|
|
62
|
+
foo = session.query(SObject).one()
|
|
63
|
+
assert foo["name"] == "Foo"
|
|
64
|
+
assert foo["childRelationships"] == ()
|
|
65
|
+
assert (
|
|
66
|
+
session.execute("select childRelationships from sobjects").first()[
|
|
67
|
+
"childRelationships"
|
|
68
|
+
]
|
|
69
|
+
is None
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
def test_getattr_getitem(self):
|
|
73
|
+
so = SObject(name="Foo", childRelationships=[])
|
|
74
|
+
assert so.name == so["name"]
|
|
75
|
+
with pytest.raises(KeyError):
|
|
76
|
+
so["aaa"]
|
|
77
|
+
|
|
78
|
+
with pytest.raises(AttributeError):
|
|
79
|
+
so.aaa
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from unittest import mock
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from cumulusci.utils.waiting import poll, retry
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def test_retry(caplog):
|
|
9
|
+
func = mock.Mock(side_effect=[Exception, 42])
|
|
10
|
+
assert retry(func) == 42
|
|
11
|
+
assert "Sleeping for 5 seconds before retry..." in caplog.text
|
|
12
|
+
assert "Retrying (4 attempts remaining)" in caplog.text
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_retry__limit():
|
|
16
|
+
func = mock.Mock(side_effect=Exception)
|
|
17
|
+
with pytest.raises(Exception):
|
|
18
|
+
retry(func, retries=0)
|
|
19
|
+
assert func.call_count == 1
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def test_poll():
|
|
23
|
+
func = mock.Mock(side_effect=[False, False, False, True])
|
|
24
|
+
poll(func)
|
|
25
|
+
assert func.call_count == 4
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
#
|
|
2
|
+
# From https://github.com/python/cpython/blob/b07f546ea3a574bc3016fb023c157c65a47f4849/Lib/distutils/version.py
|
|
3
|
+
#
|
|
4
|
+
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
|
5
|
+
# --------------------------------------------
|
|
6
|
+
|
|
7
|
+
# 1. This LICENSE AGREEMENT is between the Python Software Foundation
|
|
8
|
+
# ("PSF"), and the Individual or Organization ("Licensee") accessing and
|
|
9
|
+
# otherwise using this software ("Python") in source or binary form and
|
|
10
|
+
# its associated documentation.
|
|
11
|
+
|
|
12
|
+
# 2. Subject to the terms and conditions of this License Agreement, PSF hereby
|
|
13
|
+
# grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
|
|
14
|
+
# analyze, test, perform and/or display publicly, prepare derivative works,
|
|
15
|
+
# distribute, and otherwise use Python alone or in any derivative version,
|
|
16
|
+
# provided, however, that PSF's License Agreement and PSF's notice of copyright,
|
|
17
|
+
# i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
|
18
|
+
# 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Python Software Foundation;
|
|
19
|
+
# All Rights Reserved" are retained in Python alone or in any derivative version
|
|
20
|
+
# prepared by Licensee.
|
|
21
|
+
|
|
22
|
+
# 3. In the event Licensee prepares a derivative work that is based on
|
|
23
|
+
# or incorporates Python or any part thereof, and wants to make
|
|
24
|
+
# the derivative work available to others as provided herein, then
|
|
25
|
+
# Licensee hereby agrees to include in any such work a brief summary of
|
|
26
|
+
# the changes made to Python.
|
|
27
|
+
|
|
28
|
+
# 4. PSF is making Python available to Licensee on an "AS IS"
|
|
29
|
+
# basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
30
|
+
# IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
|
31
|
+
# DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
|
32
|
+
# FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
|
33
|
+
# INFRINGE ANY THIRD PARTY RIGHTS.
|
|
34
|
+
|
|
35
|
+
# 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
|
36
|
+
# FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
|
37
|
+
# A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
|
38
|
+
# OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
|
39
|
+
|
|
40
|
+
# 6. This License Agreement will automatically terminate upon a material
|
|
41
|
+
# breach of its terms and conditions.
|
|
42
|
+
|
|
43
|
+
# 7. Nothing in this License Agreement shall be deemed to create any
|
|
44
|
+
# relationship of agency, partnership, or joint venture between PSF and
|
|
45
|
+
# Licensee. This License Agreement does not grant permission to use PSF
|
|
46
|
+
# trademarks or trade name in a trademark sense to endorse or promote
|
|
47
|
+
# products or services of Licensee, or any third party.
|
|
48
|
+
|
|
49
|
+
# 8. By copying, installing or otherwise using Python, Licensee
|
|
50
|
+
# agrees to be bound by the terms and conditions of this License
|
|
51
|
+
# Agreement.
|
|
52
|
+
|
|
53
|
+
#
|
|
54
|
+
# distutils/version.py
|
|
55
|
+
#
|
|
56
|
+
# Implements multiple version numbering conventions for the
|
|
57
|
+
# Python Module Distribution Utilities.
|
|
58
|
+
#
|
|
59
|
+
# $Id$
|
|
60
|
+
#
|
|
61
|
+
|
|
62
|
+
"""Provides classes to represent module version numbers (one class for
|
|
63
|
+
each style of version numbering). There are currently two such classes
|
|
64
|
+
implemented: StrictVersion and LooseVersion.
|
|
65
|
+
|
|
66
|
+
Every version number class implements the following interface:
|
|
67
|
+
* the 'parse' method takes a string and parses it to some internal
|
|
68
|
+
representation; if the string is an invalid version number,
|
|
69
|
+
'parse' raises a ValueError exception
|
|
70
|
+
* the class constructor takes an optional string argument which,
|
|
71
|
+
if supplied, is passed to 'parse'
|
|
72
|
+
* __str__ reconstructs the string that was passed to 'parse' (or
|
|
73
|
+
an equivalent string -- ie. one that will generate an equivalent
|
|
74
|
+
version number instance)
|
|
75
|
+
* __repr__ generates Python code to recreate the version number instance
|
|
76
|
+
* _cmp compares the current instance with either another instance
|
|
77
|
+
of the same class or a string (which will be parsed to an instance
|
|
78
|
+
of the same class, thus must follow the same rules)
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
import re
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class Version:
|
|
85
|
+
"""Abstract base class for version numbering classes. Just provides
|
|
86
|
+
constructor (__init__) and reproducer (__repr__), because those
|
|
87
|
+
seem to be the same for all version numbering classes; and route
|
|
88
|
+
rich comparisons to _cmp.
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
def __init__(self, vstring=None):
|
|
92
|
+
if vstring:
|
|
93
|
+
self.parse(vstring)
|
|
94
|
+
|
|
95
|
+
def __repr__(self):
|
|
96
|
+
return "%s ('%s')" % (self.__class__.__name__, str(self))
|
|
97
|
+
|
|
98
|
+
def __eq__(self, other):
|
|
99
|
+
c = self._cmp(other)
|
|
100
|
+
if c is NotImplemented:
|
|
101
|
+
return c
|
|
102
|
+
return c == 0
|
|
103
|
+
|
|
104
|
+
def __lt__(self, other):
|
|
105
|
+
c = self._cmp(other)
|
|
106
|
+
if c is NotImplemented:
|
|
107
|
+
return c
|
|
108
|
+
return c < 0
|
|
109
|
+
|
|
110
|
+
def __le__(self, other):
|
|
111
|
+
c = self._cmp(other)
|
|
112
|
+
if c is NotImplemented:
|
|
113
|
+
return c
|
|
114
|
+
return c <= 0
|
|
115
|
+
|
|
116
|
+
def __gt__(self, other):
|
|
117
|
+
c = self._cmp(other)
|
|
118
|
+
if c is NotImplemented:
|
|
119
|
+
return c
|
|
120
|
+
return c > 0
|
|
121
|
+
|
|
122
|
+
def __ge__(self, other):
|
|
123
|
+
c = self._cmp(other)
|
|
124
|
+
if c is NotImplemented:
|
|
125
|
+
return c
|
|
126
|
+
return c >= 0
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# Interface for version-number classes -- must be implemented
|
|
130
|
+
# by the following classes (the concrete ones -- Version should
|
|
131
|
+
# be treated as an abstract class).
|
|
132
|
+
# __init__ (string) - create and take same action as 'parse'
|
|
133
|
+
# (string parameter is optional)
|
|
134
|
+
# parse (string) - convert a string representation to whatever
|
|
135
|
+
# internal representation is appropriate for
|
|
136
|
+
# this style of version numbering
|
|
137
|
+
# __str__ (self) - convert back to a string; should be very similar
|
|
138
|
+
# (if not identical to) the string supplied to parse
|
|
139
|
+
# __repr__ (self) - generate Python code to recreate
|
|
140
|
+
# the instance
|
|
141
|
+
# _cmp (self, other) - compare two version numbers ('other' may
|
|
142
|
+
# be an unparsed version string, or another
|
|
143
|
+
# instance of your version class)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
class StrictVersion(Version):
|
|
147
|
+
|
|
148
|
+
"""Version numbering for anal retentives and software idealists.
|
|
149
|
+
Implements the standard interface for version number classes as
|
|
150
|
+
described above. A version number consists of two or three
|
|
151
|
+
dot-separated numeric components, with an optional "pre-release" tag
|
|
152
|
+
on the end. The pre-release tag consists of the letter 'a' or 'b'
|
|
153
|
+
followed by a number. If the numeric components of two version
|
|
154
|
+
numbers are equal, then one with a pre-release tag will always
|
|
155
|
+
be deemed earlier (lesser) than one without.
|
|
156
|
+
|
|
157
|
+
The following are valid version numbers (shown in the order that
|
|
158
|
+
would be obtained by sorting according to the supplied cmp function):
|
|
159
|
+
|
|
160
|
+
0.4 0.4.0 (these two are equivalent)
|
|
161
|
+
0.4.1
|
|
162
|
+
0.5a1
|
|
163
|
+
0.5b3
|
|
164
|
+
0.5
|
|
165
|
+
0.9.6
|
|
166
|
+
1.0
|
|
167
|
+
1.0.4a3
|
|
168
|
+
1.0.4b1
|
|
169
|
+
1.0.4
|
|
170
|
+
|
|
171
|
+
The following are examples of invalid version numbers:
|
|
172
|
+
|
|
173
|
+
1
|
|
174
|
+
2.7.2.2
|
|
175
|
+
1.3.a4
|
|
176
|
+
1.3pl1
|
|
177
|
+
1.3c4
|
|
178
|
+
|
|
179
|
+
The rationale for this version numbering system will be explained
|
|
180
|
+
in the distutils documentation.
|
|
181
|
+
"""
|
|
182
|
+
|
|
183
|
+
version_re = re.compile(
|
|
184
|
+
r"^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$", re.VERBOSE | re.ASCII
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
def parse(self, vstring):
|
|
188
|
+
match = self.version_re.match(vstring)
|
|
189
|
+
if not match:
|
|
190
|
+
raise ValueError("invalid version number '%s'" % vstring)
|
|
191
|
+
|
|
192
|
+
(major, minor, patch, prerelease, prerelease_num) = match.group(1, 2, 4, 5, 6)
|
|
193
|
+
|
|
194
|
+
if patch:
|
|
195
|
+
self.version = tuple(map(int, [major, minor, patch]))
|
|
196
|
+
else:
|
|
197
|
+
self.version = tuple(map(int, [major, minor])) + (0,)
|
|
198
|
+
|
|
199
|
+
if prerelease:
|
|
200
|
+
self.prerelease = (prerelease[0], int(prerelease_num))
|
|
201
|
+
else:
|
|
202
|
+
self.prerelease = None
|
|
203
|
+
|
|
204
|
+
def __str__(self):
|
|
205
|
+
|
|
206
|
+
if self.version[2] == 0:
|
|
207
|
+
vstring = ".".join(map(str, self.version[0:2]))
|
|
208
|
+
else:
|
|
209
|
+
vstring = ".".join(map(str, self.version))
|
|
210
|
+
|
|
211
|
+
if self.prerelease:
|
|
212
|
+
vstring = vstring + self.prerelease[0] + str(self.prerelease[1])
|
|
213
|
+
|
|
214
|
+
return vstring
|
|
215
|
+
|
|
216
|
+
def _cmp(self, other):
|
|
217
|
+
if isinstance(other, str):
|
|
218
|
+
other = StrictVersion(other)
|
|
219
|
+
elif not isinstance(other, StrictVersion):
|
|
220
|
+
return NotImplemented
|
|
221
|
+
|
|
222
|
+
if self.version != other.version:
|
|
223
|
+
# numeric versions don't match
|
|
224
|
+
# prerelease stuff doesn't matter
|
|
225
|
+
if self.version < other.version:
|
|
226
|
+
return -1
|
|
227
|
+
else:
|
|
228
|
+
return 1
|
|
229
|
+
|
|
230
|
+
# have to compare prerelease
|
|
231
|
+
# case 1: neither has prerelease; they're equal
|
|
232
|
+
# case 2: self has prerelease, other doesn't; other is greater
|
|
233
|
+
# case 3: self doesn't have prerelease, other does: self is greater
|
|
234
|
+
# case 4: both have prerelease: must compare them!
|
|
235
|
+
|
|
236
|
+
if not self.prerelease and not other.prerelease:
|
|
237
|
+
return 0
|
|
238
|
+
elif self.prerelease and not other.prerelease:
|
|
239
|
+
return -1
|
|
240
|
+
elif not self.prerelease and other.prerelease:
|
|
241
|
+
return 1
|
|
242
|
+
elif self.prerelease and other.prerelease:
|
|
243
|
+
if self.prerelease == other.prerelease:
|
|
244
|
+
return 0
|
|
245
|
+
elif self.prerelease < other.prerelease:
|
|
246
|
+
return -1
|
|
247
|
+
else:
|
|
248
|
+
return 1
|
|
249
|
+
else:
|
|
250
|
+
assert False, "never get here"
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
# end class StrictVersion
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
# The rules according to Greg Stein:
|
|
257
|
+
# 1) a version number has 1 or more numbers separated by a period or by
|
|
258
|
+
# sequences of letters. If only periods, then these are compared
|
|
259
|
+
# left-to-right to determine an ordering.
|
|
260
|
+
# 2) sequences of letters are part of the tuple for comparison and are
|
|
261
|
+
# compared lexicographically
|
|
262
|
+
# 3) recognize the numeric components may have leading zeroes
|
|
263
|
+
#
|
|
264
|
+
# The LooseVersion class below implements these rules: a version number
|
|
265
|
+
# string is split up into a tuple of integer and string components, and
|
|
266
|
+
# comparison is a simple tuple comparison. This means that version
|
|
267
|
+
# numbers behave in a predictable and obvious way, but a way that might
|
|
268
|
+
# not necessarily be how people *want* version numbers to behave. There
|
|
269
|
+
# wouldn't be a problem if people could stick to purely numeric version
|
|
270
|
+
# numbers: just split on period and compare the numbers as tuples.
|
|
271
|
+
# However, people insist on putting letters into their version numbers;
|
|
272
|
+
# the most common purpose seems to be:
|
|
273
|
+
# - indicating a "pre-release" version
|
|
274
|
+
# ('alpha', 'beta', 'a', 'b', 'pre', 'p')
|
|
275
|
+
# - indicating a post-release patch ('p', 'pl', 'patch')
|
|
276
|
+
# but of course this can't cover all version number schemes, and there's
|
|
277
|
+
# no way to know what a programmer means without asking him.
|
|
278
|
+
#
|
|
279
|
+
# The problem is what to do with letters (and other non-numeric
|
|
280
|
+
# characters) in a version number. The current implementation does the
|
|
281
|
+
# obvious and predictable thing: keep them as strings and compare
|
|
282
|
+
# lexically within a tuple comparison. This has the desired effect if
|
|
283
|
+
# an appended letter sequence implies something "post-release":
|
|
284
|
+
# eg. "0.99" < "0.99pl14" < "1.0", and "5.001" < "5.001m" < "5.002".
|
|
285
|
+
#
|
|
286
|
+
# However, if letters in a version number imply a pre-release version,
|
|
287
|
+
# the "obvious" thing isn't correct. Eg. you would expect that
|
|
288
|
+
# "1.5.1" < "1.5.2a2" < "1.5.2", but under the tuple/lexical comparison
|
|
289
|
+
# implemented here, this just isn't so.
|
|
290
|
+
#
|
|
291
|
+
# Two possible solutions come to mind. The first is to tie the
|
|
292
|
+
# comparison algorithm to a particular set of semantic rules, as has
|
|
293
|
+
# been done in the StrictVersion class above. This works great as long
|
|
294
|
+
# as everyone can go along with bondage and discipline. Hopefully a
|
|
295
|
+
# (large) subset of Python module programmers will agree that the
|
|
296
|
+
# particular flavour of bondage and discipline provided by StrictVersion
|
|
297
|
+
# provides enough benefit to be worth using, and will submit their
|
|
298
|
+
# version numbering scheme to its domination. The free-thinking
|
|
299
|
+
# anarchists in the lot will never give in, though, and something needs
|
|
300
|
+
# to be done to accommodate them.
|
|
301
|
+
#
|
|
302
|
+
# Perhaps a "moderately strict" version class could be implemented that
|
|
303
|
+
# lets almost anything slide (syntactically), and makes some heuristic
|
|
304
|
+
# assumptions about non-digits in version number strings. This could
|
|
305
|
+
# sink into special-case-hell, though; if I was as talented and
|
|
306
|
+
# idiosyncratic as Larry Wall, I'd go ahead and implement a class that
|
|
307
|
+
# somehow knows that "1.2.1" < "1.2.2a2" < "1.2.2" < "1.2.2pl3", and is
|
|
308
|
+
# just as happy dealing with things like "2g6" and "1.13++". I don't
|
|
309
|
+
# think I'm smart enough to do it right though.
|
|
310
|
+
#
|
|
311
|
+
# In any case, I've coded the test suite for this module (see
|
|
312
|
+
# ../test/test_version.py) specifically to fail on things like comparing
|
|
313
|
+
# "1.2a2" and "1.2". That's not because the *code* is doing anything
|
|
314
|
+
# wrong, it's because the simple, obvious design doesn't match my
|
|
315
|
+
# complicated, hairy expectations for real-world version numbers. It
|
|
316
|
+
# would be a snap to fix the test suite to say, "Yep, LooseVersion does
|
|
317
|
+
# the Right Thing" (ie. the code matches the conception). But I'd rather
|
|
318
|
+
# have a conception that matches common notions about version numbers.
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
class LooseVersion(Version):
|
|
322
|
+
|
|
323
|
+
"""Version numbering for anarchists and software realists.
|
|
324
|
+
Implements the standard interface for version number classes as
|
|
325
|
+
described above. A version number consists of a series of numbers,
|
|
326
|
+
separated by either periods or strings of letters. When comparing
|
|
327
|
+
version numbers, the numeric components will be compared
|
|
328
|
+
numerically, and the alphabetic components lexically. The following
|
|
329
|
+
are all valid version numbers, in no particular order:
|
|
330
|
+
|
|
331
|
+
1.5.1
|
|
332
|
+
1.5.2b2
|
|
333
|
+
161
|
|
334
|
+
3.10a
|
|
335
|
+
8.02
|
|
336
|
+
3.4j
|
|
337
|
+
1996.07.12
|
|
338
|
+
3.2.pl0
|
|
339
|
+
3.1.1.6
|
|
340
|
+
2g6
|
|
341
|
+
11g
|
|
342
|
+
0.960923
|
|
343
|
+
2.2beta29
|
|
344
|
+
1.13++
|
|
345
|
+
5.5.kw
|
|
346
|
+
2.0b1pl0
|
|
347
|
+
|
|
348
|
+
In fact, there is no such thing as an invalid version number under
|
|
349
|
+
this scheme; the rules for comparison are simple and predictable,
|
|
350
|
+
but may not always give the results you want (for some definition
|
|
351
|
+
of "want").
|
|
352
|
+
"""
|
|
353
|
+
|
|
354
|
+
component_re = re.compile(r"(\d+ | [a-z]+ | \.)", re.VERBOSE)
|
|
355
|
+
|
|
356
|
+
def __init__(self, vstring=None):
|
|
357
|
+
if vstring:
|
|
358
|
+
self.parse(vstring)
|
|
359
|
+
|
|
360
|
+
def parse(self, vstring):
|
|
361
|
+
# I've given up on thinking I can reconstruct the version string
|
|
362
|
+
# from the parsed tuple -- so I just store the string here for
|
|
363
|
+
# use by __str__
|
|
364
|
+
self.vstring = vstring
|
|
365
|
+
components = [x for x in self.component_re.split(vstring) if x and x != "."]
|
|
366
|
+
for i, obj in enumerate(components):
|
|
367
|
+
try:
|
|
368
|
+
components[i] = int(obj)
|
|
369
|
+
except ValueError:
|
|
370
|
+
pass
|
|
371
|
+
|
|
372
|
+
self.version = components
|
|
373
|
+
|
|
374
|
+
def __str__(self):
|
|
375
|
+
return self.vstring
|
|
376
|
+
|
|
377
|
+
def __repr__(self):
|
|
378
|
+
return "LooseVersion ('%s')" % str(self)
|
|
379
|
+
|
|
380
|
+
def _cmp(self, other):
|
|
381
|
+
if isinstance(other, str):
|
|
382
|
+
other = LooseVersion(other)
|
|
383
|
+
elif not isinstance(other, LooseVersion):
|
|
384
|
+
return NotImplemented
|
|
385
|
+
|
|
386
|
+
if self.version == other.version:
|
|
387
|
+
return 0
|
|
388
|
+
if self.version < other.version:
|
|
389
|
+
return -1
|
|
390
|
+
if self.version > other.version:
|
|
391
|
+
return 1
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import time
|
|
3
|
+
from typing import Callable
|
|
4
|
+
|
|
5
|
+
logger = logging.getLogger(__name__)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def retry(
|
|
9
|
+
func: Callable,
|
|
10
|
+
should_retry: Callable[[Exception], bool] = lambda e: True,
|
|
11
|
+
retries: int = 5,
|
|
12
|
+
retry_interval: int = 5,
|
|
13
|
+
retry_interval_add: int = 30,
|
|
14
|
+
):
|
|
15
|
+
while True:
|
|
16
|
+
try:
|
|
17
|
+
return func()
|
|
18
|
+
break
|
|
19
|
+
except Exception as e:
|
|
20
|
+
if not (retries and should_retry(e)):
|
|
21
|
+
raise
|
|
22
|
+
if retry_interval:
|
|
23
|
+
logger.warning(f"Sleeping for {retry_interval} seconds before retry...")
|
|
24
|
+
time.sleep(retry_interval)
|
|
25
|
+
if retry_interval_add:
|
|
26
|
+
retry_interval += retry_interval_add
|
|
27
|
+
retries -= 1
|
|
28
|
+
logger.warning(f"Retrying ({retries} attempts remaining)")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def poll(action: Callable):
|
|
32
|
+
"""poll for a result in a loop"""
|
|
33
|
+
count = 0
|
|
34
|
+
interval = 1
|
|
35
|
+
while True:
|
|
36
|
+
count += 1
|
|
37
|
+
complete = action()
|
|
38
|
+
if complete:
|
|
39
|
+
break
|
|
40
|
+
time.sleep(interval)
|
|
41
|
+
if count % 3 == 0:
|
|
42
|
+
interval += 1
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import typing as T
|
|
2
|
+
import xml.etree.ElementTree as etree
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from lxml import etree as lxml_etree
|
|
6
|
+
|
|
7
|
+
UTF8 = "UTF-8"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def elementtree_parse_file(
|
|
11
|
+
path: T.Union[str, Path, T.IO], namespace=None
|
|
12
|
+
) -> etree.ElementTree:
|
|
13
|
+
"""Parse a file from filename, Path or Stream using Python stdlib.
|
|
14
|
+
|
|
15
|
+
All else equal, prefer elementtree over LXML for performance and simplicity reasons."""
|
|
16
|
+
try:
|
|
17
|
+
if namespace:
|
|
18
|
+
etree.register_namespace("", namespace)
|
|
19
|
+
tree = etree.parse(path)
|
|
20
|
+
except etree.ParseError as err:
|
|
21
|
+
err.filename = path
|
|
22
|
+
raise err
|
|
23
|
+
return tree
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def lxml_parse_file(path: T.Union[str, Path, T.IO]) -> lxml_etree._ElementTree:
|
|
27
|
+
"""Parse a file from filename, Path or stream using lxml for richer API
|
|
28
|
+
|
|
29
|
+
Use this if you need advanced xpath and parent-pointer features.
|
|
30
|
+
Otherwise prefer elementree_parse_file for performance and simplicity reasons."""
|
|
31
|
+
parser = lxml_etree.XMLParser(
|
|
32
|
+
resolve_entities=False, load_dtd=False, no_network=True
|
|
33
|
+
)
|
|
34
|
+
try:
|
|
35
|
+
if isinstance(path, Path):
|
|
36
|
+
path = str(path)
|
|
37
|
+
tree = lxml_etree.parse(path, parser=parser)
|
|
38
|
+
except etree.ParseError as err:
|
|
39
|
+
err.filename = path
|
|
40
|
+
raise err
|
|
41
|
+
return tree
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
elementtree_parse_string = etree.fromstring
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def lxml_parse_string(string: str) -> lxml_etree._ElementTree:
|
|
48
|
+
"""Parse a string using lxml for richer API
|
|
49
|
+
|
|
50
|
+
Use this if you need advanced xpath and parent-pointer features.
|
|
51
|
+
Otherwise prefer elementree_parse_string for performance and simplicity reasons."""
|
|
52
|
+
|
|
53
|
+
parser = lxml_etree.XMLParser(
|
|
54
|
+
resolve_entities=False, load_dtd=False, no_network=True
|
|
55
|
+
)
|
|
56
|
+
return lxml_etree.ElementTree(lxml_etree.fromstring(string, parser=parser))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def remove_xml_element_file(name: str, path: T.Union[str, Path]):
|
|
60
|
+
"""Remove XML elements from a single file"""
|
|
61
|
+
etree.register_namespace("", "http://soap.sforce.com/2006/04/metadata")
|
|
62
|
+
tree = elementtree_parse_file(path)
|
|
63
|
+
tree = remove_xml_element(name, tree)
|
|
64
|
+
return tree.write(path, encoding=UTF8, xml_declaration=True)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def remove_xml_element_string(name: str, content: str):
|
|
68
|
+
"""Remove XML elements from a string"""
|
|
69
|
+
etree.register_namespace("", "http://soap.sforce.com/2006/04/metadata")
|
|
70
|
+
tree = etree.fromstring(content)
|
|
71
|
+
tree = remove_xml_element(name, tree)
|
|
72
|
+
clean_content = etree.tostring(tree, encoding=UTF8)
|
|
73
|
+
return clean_content
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def remove_xml_element(name: str, tree):
|
|
77
|
+
"""Removes XML elements from an ElementTree content tree"""
|
|
78
|
+
# root = tree.getroot()
|
|
79
|
+
remove = tree.findall(
|
|
80
|
+
".//{{http://soap.sforce.com/2006/04/metadata}}{}".format(name)
|
|
81
|
+
)
|
|
82
|
+
if not remove:
|
|
83
|
+
return tree
|
|
84
|
+
|
|
85
|
+
parent_map = {c: p for p in tree.iter() for c in p}
|
|
86
|
+
|
|
87
|
+
for elem in remove:
|
|
88
|
+
parent = parent_map[elem]
|
|
89
|
+
parent.remove(elem)
|
|
90
|
+
|
|
91
|
+
return tree
|