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
cumulusci/vcs/models.py
ADDED
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from abc import ABC, abstractmethod
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from io import StringIO
|
|
5
|
+
from re import Pattern
|
|
6
|
+
from typing import Optional, Union
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AbstractRepo(ABC):
|
|
10
|
+
"""Abstract base class for repositories.
|
|
11
|
+
This is the abstract base class for defining repository interfaces.
|
|
12
|
+
|
|
13
|
+
Raises:
|
|
14
|
+
NotImplementedError: Raised when a subclass does not implement the required method.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
repo: object
|
|
18
|
+
logger: logging.Logger
|
|
19
|
+
options: dict
|
|
20
|
+
repo_name: str
|
|
21
|
+
repo_owner: str
|
|
22
|
+
repo_url: str
|
|
23
|
+
project_config: Optional[object] = None
|
|
24
|
+
|
|
25
|
+
def __init__(self, **kwargs) -> None:
|
|
26
|
+
"""Initializes the AbstractRepo."""
|
|
27
|
+
self.repo = kwargs.get("repo")
|
|
28
|
+
self.logger = kwargs.get("logger", None)
|
|
29
|
+
self.options = kwargs.get("options", {})
|
|
30
|
+
self.repo_name = kwargs.get("repo_name", None)
|
|
31
|
+
self.repo_owner = kwargs.get("repo_owner", None)
|
|
32
|
+
self.repo_url = self.options.get("repository_url", None)
|
|
33
|
+
|
|
34
|
+
def __eq__(self, other):
|
|
35
|
+
return isinstance(other, AbstractRepo) and self.repo_url == other.repo_url
|
|
36
|
+
|
|
37
|
+
def __hash__(self):
|
|
38
|
+
return hash(self.repo_url)
|
|
39
|
+
|
|
40
|
+
@property
|
|
41
|
+
@abstractmethod
|
|
42
|
+
def owner_login(self) -> str:
|
|
43
|
+
"""Returns the login of the repository owner."""
|
|
44
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
45
|
+
|
|
46
|
+
@abstractmethod
|
|
47
|
+
def get_ref(self, ref_sha: str) -> "AbstractRef":
|
|
48
|
+
"""Returns a Reference object for the given SHA."""
|
|
49
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
50
|
+
|
|
51
|
+
@abstractmethod
|
|
52
|
+
def get_ref_for_tag(self, tag_name: str) -> "AbstractRef":
|
|
53
|
+
"""Gets a Reference object for the tag with the given name.
|
|
54
|
+
This method should be overridden by subclasses to provide
|
|
55
|
+
the specific implementation for retrieving the reference for a tag.
|
|
56
|
+
The method should return an instance of a class that implements
|
|
57
|
+
the AbstractRef interface."""
|
|
58
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
59
|
+
|
|
60
|
+
@abstractmethod
|
|
61
|
+
def get_tag_by_ref(self, ref: object, tag_name: str = None) -> "AbstractGitTag":
|
|
62
|
+
"""Gets a Git Tag for with the given ref.
|
|
63
|
+
This method should be overridden by subclasses to provide
|
|
64
|
+
the specific implementation for retrieving the tag.
|
|
65
|
+
The method should return an instance of a class that implements
|
|
66
|
+
the AbstractGitTag interface."""
|
|
67
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
68
|
+
|
|
69
|
+
@abstractmethod
|
|
70
|
+
def create_tag(
|
|
71
|
+
self,
|
|
72
|
+
tag_name: str,
|
|
73
|
+
message: str,
|
|
74
|
+
sha: str,
|
|
75
|
+
obj_type: str,
|
|
76
|
+
tagger={},
|
|
77
|
+
lightweight: Optional[bool] = False,
|
|
78
|
+
) -> "AbstractGitTag":
|
|
79
|
+
"""Create a Git Tag object for the tag with the given name.
|
|
80
|
+
This method should be overridden by subclasses to provide
|
|
81
|
+
the specific implementation for creating a Git Tag.
|
|
82
|
+
The method should return an instance of a class that implements
|
|
83
|
+
the AbstractGitTag interface."""
|
|
84
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
85
|
+
|
|
86
|
+
@abstractmethod
|
|
87
|
+
def branch(self, branch_name: str) -> "AbstractBranch":
|
|
88
|
+
"""Gets a Reference object for the branch with the given name.
|
|
89
|
+
This method should be overridden by subclasses to provide
|
|
90
|
+
the specific implementation for retrieving the reference for a branch.
|
|
91
|
+
The method should return an instance of a class that implements
|
|
92
|
+
the AbstractBranch interface."""
|
|
93
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
94
|
+
|
|
95
|
+
@abstractmethod
|
|
96
|
+
def branches(self) -> list:
|
|
97
|
+
"""Gets a list of all branches in the repository.
|
|
98
|
+
This method should be overridden by subclasses to provide
|
|
99
|
+
the specific implementation for retrieving the branches.
|
|
100
|
+
The method should return a list of instances of classes that implement
|
|
101
|
+
the AbstractBranch interface."""
|
|
102
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
103
|
+
|
|
104
|
+
@abstractmethod
|
|
105
|
+
def compare_commits(
|
|
106
|
+
self, base: str, head: str, source: str
|
|
107
|
+
) -> "AbstractComparison":
|
|
108
|
+
"""Compares the given head with the given base.
|
|
109
|
+
This method should be overridden by subclasses to provide
|
|
110
|
+
the specific implementation for comparing commits.
|
|
111
|
+
The method should return an instance of AbstractComparison."""
|
|
112
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
113
|
+
|
|
114
|
+
@abstractmethod
|
|
115
|
+
def merge(
|
|
116
|
+
self, base: str, head: str, source: str, message: str = ""
|
|
117
|
+
) -> "AbstractRepoCommit":
|
|
118
|
+
"""Merges the given base and head with the specified commit.
|
|
119
|
+
This method should be overridden by subclasses to provide
|
|
120
|
+
the specific implementation for merging commits.
|
|
121
|
+
The method should return an instance of AbstractRepoCommit."""
|
|
122
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
123
|
+
|
|
124
|
+
@abstractmethod
|
|
125
|
+
def pull_requests(self, **kwargs) -> list["AbstractPullRequest"]:
|
|
126
|
+
"""Fetches all pull requests from the repository.
|
|
127
|
+
This method should be overridden by subclasses to provide
|
|
128
|
+
the specific implementation for retrieving pull requests.
|
|
129
|
+
The method should return a list of instances of classes that implement
|
|
130
|
+
the AbstractPullRequest interface."""
|
|
131
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
132
|
+
|
|
133
|
+
@abstractmethod
|
|
134
|
+
def create_pull(
|
|
135
|
+
self,
|
|
136
|
+
title: str,
|
|
137
|
+
base: str,
|
|
138
|
+
head: str,
|
|
139
|
+
body: str = None,
|
|
140
|
+
maintainer_can_modify: bool = None,
|
|
141
|
+
options: dict = {},
|
|
142
|
+
) -> "AbstractPullRequest":
|
|
143
|
+
"""Creates a pull request in the repository.
|
|
144
|
+
This method should be overridden by subclasses to provide
|
|
145
|
+
the specific implementation for creating pull requests.
|
|
146
|
+
The method should return an instance of a class that implements
|
|
147
|
+
the AbstractPullRequest interface."""
|
|
148
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
149
|
+
|
|
150
|
+
@abstractmethod
|
|
151
|
+
def get_commit(self, commit_sha: str) -> "AbstractRepoCommit":
|
|
152
|
+
"""Gets a commit object for the given commit SHA.
|
|
153
|
+
This method should be overridden by subclasses to provide
|
|
154
|
+
the specific implementation for retrieving the commit.
|
|
155
|
+
The method should return an instance of a class that implements
|
|
156
|
+
the AbstractRepoCommit interface."""
|
|
157
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
158
|
+
|
|
159
|
+
@property
|
|
160
|
+
@abstractmethod
|
|
161
|
+
def default_branch(self) -> str:
|
|
162
|
+
"""Gets the default branch of the repository.
|
|
163
|
+
This method should be overridden by subclasses to provide
|
|
164
|
+
the specific implementation for retrieving the default branch.
|
|
165
|
+
The method should return the name of the default branch."""
|
|
166
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
167
|
+
|
|
168
|
+
@abstractmethod
|
|
169
|
+
def archive(self, format: str, zip_content: Union[str, object], ref=None) -> bytes:
|
|
170
|
+
"""Archives the repository content as a zip file."""
|
|
171
|
+
# This method should be overridden by subclasses to provide
|
|
172
|
+
# the specific implementation for archiving the repository.
|
|
173
|
+
# The method should return a bytes object representing the archived content.
|
|
174
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
175
|
+
|
|
176
|
+
@abstractmethod
|
|
177
|
+
def full_name(self) -> str:
|
|
178
|
+
"""Gets the full name of the repository.
|
|
179
|
+
This method should be overridden by subclasses to provide
|
|
180
|
+
the specific implementation for retrieving the full name.
|
|
181
|
+
The method should return a string representing the full name of the repository."""
|
|
182
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
183
|
+
|
|
184
|
+
@abstractmethod
|
|
185
|
+
def release_from_tag(self, tag_name: str) -> "AbstractRelease":
|
|
186
|
+
"""Gets a Release object for the tag with the given name.
|
|
187
|
+
This method should be overridden by subclasses to provide
|
|
188
|
+
the specific implementation for retrieving the release.
|
|
189
|
+
The method should return an instance of a class that implements
|
|
190
|
+
the AbstractRelease interface."""
|
|
191
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
192
|
+
|
|
193
|
+
@abstractmethod
|
|
194
|
+
def create_release(
|
|
195
|
+
self,
|
|
196
|
+
tag_name: str,
|
|
197
|
+
name: str,
|
|
198
|
+
body: str = None,
|
|
199
|
+
draft: bool = False,
|
|
200
|
+
prerelease: bool = False,
|
|
201
|
+
options: dict = {},
|
|
202
|
+
) -> "AbstractRelease":
|
|
203
|
+
"""Creates a release in the repository.
|
|
204
|
+
This method should be overridden by subclasses to provide
|
|
205
|
+
the specific implementation for creating releases.
|
|
206
|
+
The method should return an instance of a class that implements
|
|
207
|
+
the AbstractRelease interface."""
|
|
208
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
209
|
+
|
|
210
|
+
@abstractmethod
|
|
211
|
+
def releases(self) -> list["AbstractRelease"]:
|
|
212
|
+
"""Fetches all releases from the repository.
|
|
213
|
+
This method should be overridden by subclasses to provide
|
|
214
|
+
the specific implementation for retrieving releases.
|
|
215
|
+
The method should return a list of instances of classes that implement
|
|
216
|
+
the AbstractRelease interface."""
|
|
217
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
218
|
+
|
|
219
|
+
@abstractmethod
|
|
220
|
+
def latest_release(self) -> Optional["AbstractRelease"]:
|
|
221
|
+
"""Gets the latest release from the repository.
|
|
222
|
+
This method should be overridden by subclasses to provide
|
|
223
|
+
the specific implementation for retrieving the latest release.
|
|
224
|
+
The method should return an instance of a class that implements
|
|
225
|
+
the AbstractRelease interface."""
|
|
226
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
227
|
+
|
|
228
|
+
@abstractmethod
|
|
229
|
+
def has_issues(self) -> bool:
|
|
230
|
+
"""Checks if the repository supports issues.
|
|
231
|
+
This method should be overridden by subclasses to provide
|
|
232
|
+
the specific implementation for checking if the repository supports issues.
|
|
233
|
+
The method should return True if the repository supports issues, otherwise False."""
|
|
234
|
+
raise NotImplementedError(
|
|
235
|
+
"Subclasses should implement the has_issues method to check if the repository supports issues."
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
@abstractmethod
|
|
239
|
+
def get_pr_issue_labels(self, pull_request: "AbstractPullRequest") -> list[str]:
|
|
240
|
+
"""Gets the issue labels for the given pull request.
|
|
241
|
+
This method should be overridden by subclasses to provide
|
|
242
|
+
the specific implementation for retrieving the labels.
|
|
243
|
+
The method should return a list of labels associated with the pull request."""
|
|
244
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
245
|
+
|
|
246
|
+
@abstractmethod
|
|
247
|
+
def get_latest_prerelease(self) -> Optional["AbstractRelease"]:
|
|
248
|
+
"""Gets the latest pre-release from the repository.
|
|
249
|
+
This method should be overridden by subclasses to provide
|
|
250
|
+
the specific implementation for retrieving the latest pre-release.
|
|
251
|
+
The method should return an instance of a class that implements
|
|
252
|
+
the AbstractRelease interface."""
|
|
253
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
254
|
+
|
|
255
|
+
@abstractmethod
|
|
256
|
+
def directory_contents(self, subfolder: str, return_as, ref: str) -> dict:
|
|
257
|
+
"""Gets the contents of a directory in the repository.
|
|
258
|
+
This method should be overridden by subclasses to provide
|
|
259
|
+
the specific implementation for retrieving the directory contents.
|
|
260
|
+
The method should return the contents of the directory as a dictionary or list,
|
|
261
|
+
depending on the value of return_as."""
|
|
262
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
263
|
+
|
|
264
|
+
@abstractmethod
|
|
265
|
+
def file_contents(self, file: str, ref: str) -> StringIO:
|
|
266
|
+
"""Gets the contents of a file in the repository.
|
|
267
|
+
This method should be overridden by subclasses to provide
|
|
268
|
+
the specific implementation for retrieving the file contents.
|
|
269
|
+
The method should return the contents of the file as a StringIO object."""
|
|
270
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
271
|
+
|
|
272
|
+
@property
|
|
273
|
+
@abstractmethod
|
|
274
|
+
def clone_url(self) -> str:
|
|
275
|
+
"""Gets the https clone URL for the repository.
|
|
276
|
+
This method should be overridden by subclasses to provide
|
|
277
|
+
the specific implementation for retrieving the clone URL.
|
|
278
|
+
The method should return a string representing the clone URL of the repository."""
|
|
279
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
280
|
+
|
|
281
|
+
@abstractmethod
|
|
282
|
+
def create_commit_status(
|
|
283
|
+
self,
|
|
284
|
+
commit_id: str,
|
|
285
|
+
context: str,
|
|
286
|
+
state: str,
|
|
287
|
+
description: str,
|
|
288
|
+
target_url: str,
|
|
289
|
+
) -> "AbstractRepoCommit":
|
|
290
|
+
"""Creates a commit status in the repository.
|
|
291
|
+
This method should be overridden by subclasses to provide
|
|
292
|
+
the specific implementation for creating commit statuses.
|
|
293
|
+
The method should not return anything, but it should raise an exception
|
|
294
|
+
if the commit status creation fails."""
|
|
295
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
class AbstractRelease(ABC):
|
|
299
|
+
"""Abstract base class for releases.
|
|
300
|
+
This is the abstract base class for defining git releases.
|
|
301
|
+
|
|
302
|
+
Raises:
|
|
303
|
+
NotImplementedError: Raised when a subclass does not implement the required method.
|
|
304
|
+
"""
|
|
305
|
+
|
|
306
|
+
release: object
|
|
307
|
+
|
|
308
|
+
def __init__(self, **kwargs) -> None:
|
|
309
|
+
"""Initializes the AbstractRelease."""
|
|
310
|
+
self.release = kwargs.get("release", None)
|
|
311
|
+
|
|
312
|
+
@property
|
|
313
|
+
@abstractmethod
|
|
314
|
+
def tag_name(self) -> str:
|
|
315
|
+
"""Gets the tag name of the release."""
|
|
316
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
317
|
+
|
|
318
|
+
@property
|
|
319
|
+
@abstractmethod
|
|
320
|
+
def body(self) -> str:
|
|
321
|
+
"""Gets the body of the release."""
|
|
322
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
323
|
+
|
|
324
|
+
@property
|
|
325
|
+
@abstractmethod
|
|
326
|
+
def prerelease(self) -> bool:
|
|
327
|
+
"""Checks if the release is a pre-release."""
|
|
328
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
329
|
+
|
|
330
|
+
@property
|
|
331
|
+
@abstractmethod
|
|
332
|
+
def name(self) -> str:
|
|
333
|
+
"""Gets the name of the release."""
|
|
334
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
335
|
+
|
|
336
|
+
@property
|
|
337
|
+
@abstractmethod
|
|
338
|
+
def html_url(self) -> str:
|
|
339
|
+
"""Gets the HTML URL of the release."""
|
|
340
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
341
|
+
|
|
342
|
+
@property
|
|
343
|
+
@abstractmethod
|
|
344
|
+
def created_at(self) -> datetime:
|
|
345
|
+
"""Gets the creation date of the release."""
|
|
346
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
347
|
+
|
|
348
|
+
@property
|
|
349
|
+
@abstractmethod
|
|
350
|
+
def draft(self) -> bool:
|
|
351
|
+
"""Checks if the release is a draft."""
|
|
352
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
353
|
+
|
|
354
|
+
@property
|
|
355
|
+
@abstractmethod
|
|
356
|
+
def tag_ref_name(self) -> str:
|
|
357
|
+
"""Gets the tag reference name of the release."""
|
|
358
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
359
|
+
|
|
360
|
+
@property
|
|
361
|
+
def updateable(self) -> bool:
|
|
362
|
+
"""Checks if the release is updateable."""
|
|
363
|
+
return False
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
class AbstractRef(ABC):
|
|
367
|
+
"""Abstract base class for Refs.
|
|
368
|
+
This is the abstract base class for defining git references.
|
|
369
|
+
|
|
370
|
+
Raises:
|
|
371
|
+
NotImplementedError: Raised when a subclass does not implement the required method.
|
|
372
|
+
"""
|
|
373
|
+
|
|
374
|
+
ref: object
|
|
375
|
+
|
|
376
|
+
def __init__(self, ref, **kwargs) -> None:
|
|
377
|
+
"""Initializes the AbstractRef."""
|
|
378
|
+
self.ref = ref
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
class AbstractGitTag(ABC):
|
|
382
|
+
|
|
383
|
+
tag: object
|
|
384
|
+
_sha: str = ""
|
|
385
|
+
|
|
386
|
+
def __init__(self, **kwargs) -> None:
|
|
387
|
+
"""Initializes the AbstractGitTag."""
|
|
388
|
+
self.tag = kwargs.get("tag", None)
|
|
389
|
+
|
|
390
|
+
@property
|
|
391
|
+
def sha(self) -> str:
|
|
392
|
+
"""Gets the SHA for the git tag."""
|
|
393
|
+
return self._sha
|
|
394
|
+
|
|
395
|
+
@sha.setter
|
|
396
|
+
def sha(self, value: str):
|
|
397
|
+
"""Sets the SHA for the git tag.
|
|
398
|
+
|
|
399
|
+
Args:
|
|
400
|
+
value (str): The SHA for the git tag.
|
|
401
|
+
"""
|
|
402
|
+
self._sha = value
|
|
403
|
+
|
|
404
|
+
@property
|
|
405
|
+
@abstractmethod
|
|
406
|
+
def message(self) -> str:
|
|
407
|
+
"""Gets the message of the tag."""
|
|
408
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
class AbstractBranch(ABC):
|
|
412
|
+
"""Abstract base class for Branch.
|
|
413
|
+
This is the abstract base class for defining git branches.
|
|
414
|
+
|
|
415
|
+
Raises:
|
|
416
|
+
NotImplementedError: Raised when a subclass does not implement the required method.
|
|
417
|
+
"""
|
|
418
|
+
|
|
419
|
+
repo: AbstractRepo
|
|
420
|
+
branch: object
|
|
421
|
+
name: str
|
|
422
|
+
|
|
423
|
+
def __init__(self, repo: AbstractRepo, branch_name: str, **kwargs) -> None:
|
|
424
|
+
"""Initializes the AbstractBranch."""
|
|
425
|
+
self.repo = repo
|
|
426
|
+
self.name = branch_name
|
|
427
|
+
|
|
428
|
+
self.branch = kwargs.get("branch", None)
|
|
429
|
+
if not self.branch:
|
|
430
|
+
self.get_branch()
|
|
431
|
+
|
|
432
|
+
@abstractmethod
|
|
433
|
+
def get_branch(self) -> None:
|
|
434
|
+
"""Gets the branch object for the current branch name."""
|
|
435
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
436
|
+
|
|
437
|
+
@classmethod
|
|
438
|
+
@abstractmethod
|
|
439
|
+
def branches(cls, repo: AbstractRepo) -> list["AbstractBranch"]:
|
|
440
|
+
"""Gets a list of all branches in the repository.
|
|
441
|
+
This method should be overridden by subclasses to provide
|
|
442
|
+
the specific implementation for retrieving the branches.
|
|
443
|
+
The method should return a list of instances of classes that implement
|
|
444
|
+
the AbstractBranch interface."""
|
|
445
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
446
|
+
|
|
447
|
+
@property
|
|
448
|
+
@abstractmethod
|
|
449
|
+
def commit(self) -> "AbstractRepoCommit":
|
|
450
|
+
"""Gets the branch commit for the current branch."""
|
|
451
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
class AbstractComparison(ABC):
|
|
455
|
+
"""Abstract base class for comparisons.
|
|
456
|
+
This is the abstract base class for defining git comparisons.
|
|
457
|
+
|
|
458
|
+
Raises:
|
|
459
|
+
NotImplementedError: Raised when a subclass does not implement the required method.
|
|
460
|
+
"""
|
|
461
|
+
|
|
462
|
+
comparison: object
|
|
463
|
+
|
|
464
|
+
def __init__(self, repo: AbstractRepo, base: str, head: str, **kwargs) -> None:
|
|
465
|
+
"""Initializes the AbstractComparison."""
|
|
466
|
+
self.repo = repo
|
|
467
|
+
self.base = base
|
|
468
|
+
self.head = head
|
|
469
|
+
self.comparison = kwargs.get("comparison", None)
|
|
470
|
+
|
|
471
|
+
@classmethod
|
|
472
|
+
@abstractmethod
|
|
473
|
+
def compare(cls, repo: AbstractRepo, base: str, head: str) -> "AbstractComparison":
|
|
474
|
+
"""Compares the given base and head with the specified commit.
|
|
475
|
+
This method should be overridden by subclasses to provide
|
|
476
|
+
the specific implementation for comparing commits.
|
|
477
|
+
The method should return an instance of AbstractComparison."""
|
|
478
|
+
raise NotImplementedError("Subclasses should provide their own implementation")
|
|
479
|
+
|
|
480
|
+
@abstractmethod
|
|
481
|
+
def get_comparison(self) -> None:
|
|
482
|
+
"""Gets the comparison object for the current base and head."""
|
|
483
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
484
|
+
|
|
485
|
+
@property
|
|
486
|
+
def files(self) -> list:
|
|
487
|
+
"""Gets the files changed in the comparison."""
|
|
488
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
489
|
+
|
|
490
|
+
@property
|
|
491
|
+
def behind_by(self) -> int:
|
|
492
|
+
"""Gets the number of commits the head is behind the base."""
|
|
493
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
class AbstractRepoCommit(ABC):
|
|
497
|
+
"""Abstract base class for commits.
|
|
498
|
+
This is the abstract base class for defining git commits.
|
|
499
|
+
|
|
500
|
+
Raises:
|
|
501
|
+
NotImplementedError: Raised when a subclass does not implement the required method.
|
|
502
|
+
"""
|
|
503
|
+
|
|
504
|
+
commit: object
|
|
505
|
+
|
|
506
|
+
def __init__(self, **kwargs) -> None:
|
|
507
|
+
"""Initializes the AbstractRepoCommit."""
|
|
508
|
+
self.commit = kwargs.get("commit", None)
|
|
509
|
+
|
|
510
|
+
@abstractmethod
|
|
511
|
+
def get_statuses(self, context: str, regex_match: Pattern[str]) -> Optional[str]:
|
|
512
|
+
"""Gets the statuses for the commit.
|
|
513
|
+
This method should be overridden by subclasses to provide
|
|
514
|
+
the specific implementation for retrieving the statuses.
|
|
515
|
+
The method should return a string if a match is found, otherwise None."""
|
|
516
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
517
|
+
|
|
518
|
+
@property
|
|
519
|
+
@abstractmethod
|
|
520
|
+
def parents(self) -> list["AbstractRepoCommit"]:
|
|
521
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
522
|
+
|
|
523
|
+
@property
|
|
524
|
+
@abstractmethod
|
|
525
|
+
def sha(self) -> str:
|
|
526
|
+
"""Gets the SHA of the commit."""
|
|
527
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
class AbstractPullRequest(ABC):
|
|
531
|
+
"""Abstract base class for pull requests.
|
|
532
|
+
This is the abstract base class for defining git pull requests.
|
|
533
|
+
|
|
534
|
+
Raises:
|
|
535
|
+
NotImplementedError: Raised when a subclass does not implement the required method.
|
|
536
|
+
"""
|
|
537
|
+
|
|
538
|
+
repo: Union[AbstractRepo, None]
|
|
539
|
+
pull_request: Union[object, None]
|
|
540
|
+
|
|
541
|
+
def __init__(self, **kwargs) -> None:
|
|
542
|
+
"""Initializes the AbstractPullRequest."""
|
|
543
|
+
self.repo = kwargs.get("repo", None)
|
|
544
|
+
self.pull_request = kwargs.get("pull_request", None)
|
|
545
|
+
|
|
546
|
+
@classmethod
|
|
547
|
+
@abstractmethod
|
|
548
|
+
def pull_requests(cls, *args, **kwargs) -> list["AbstractPullRequest"]:
|
|
549
|
+
"""Fetches all pull requests from the repository."""
|
|
550
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
551
|
+
|
|
552
|
+
@classmethod
|
|
553
|
+
@abstractmethod
|
|
554
|
+
def create_pull(cls, *args, **kwargs) -> "AbstractPullRequest":
|
|
555
|
+
"""Creates a pull request on the repository."""
|
|
556
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
557
|
+
|
|
558
|
+
@property
|
|
559
|
+
@abstractmethod
|
|
560
|
+
def number(self) -> int:
|
|
561
|
+
"""Gets the pull request number."""
|
|
562
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
563
|
+
|
|
564
|
+
@property
|
|
565
|
+
@abstractmethod
|
|
566
|
+
def title(self) -> str:
|
|
567
|
+
"""Gets the pull title."""
|
|
568
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
569
|
+
|
|
570
|
+
@property
|
|
571
|
+
@abstractmethod
|
|
572
|
+
def base_ref(self) -> str:
|
|
573
|
+
"""Gets the base reference of the pull request."""
|
|
574
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
575
|
+
|
|
576
|
+
@property
|
|
577
|
+
@abstractmethod
|
|
578
|
+
def head_ref(self) -> str:
|
|
579
|
+
"""Gets the head reference of the pull request."""
|
|
580
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
581
|
+
|
|
582
|
+
@property
|
|
583
|
+
@abstractmethod
|
|
584
|
+
def merged_at(self) -> datetime:
|
|
585
|
+
"""Gets the date when the pull request was merged."""
|
|
586
|
+
raise NotImplementedError("Subclasses should implement this method.")
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from cumulusci.core.config import BaseProjectConfig, ServiceConfig, UniversalConfig
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@pytest.fixture()
|
|
7
|
+
def project_config():
|
|
8
|
+
universal_config = UniversalConfig()
|
|
9
|
+
project_config = BaseProjectConfig(universal_config, config={"no_yaml": True})
|
|
10
|
+
project_config.config["services"] = {
|
|
11
|
+
"github": {
|
|
12
|
+
"attributes": {"name": {"required": True}, "password": {}},
|
|
13
|
+
},
|
|
14
|
+
"github_enterprise": {
|
|
15
|
+
"attributes": {"name": {"required": True}, "password": {}},
|
|
16
|
+
},
|
|
17
|
+
"test_service": {
|
|
18
|
+
"attributes": {"name": {"required": True}, "password": {}},
|
|
19
|
+
},
|
|
20
|
+
}
|
|
21
|
+
project_config.project = {"name": "TestProject"}
|
|
22
|
+
return project_config
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
@pytest.fixture
|
|
26
|
+
def key():
|
|
27
|
+
return "0123456789123456"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@pytest.fixture
|
|
31
|
+
def service_config():
|
|
32
|
+
return ServiceConfig(
|
|
33
|
+
{
|
|
34
|
+
"name": "bar@baz.biz",
|
|
35
|
+
"password": "test123",
|
|
36
|
+
"username": "username",
|
|
37
|
+
"email": "bar@baz.biz",
|
|
38
|
+
"token": "abcdef",
|
|
39
|
+
},
|
|
40
|
+
name="alias",
|
|
41
|
+
)
|