data-factory-testing-framework 1.0.5__tar.gz → 1.1.0__tar.gz

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.
Files changed (80) hide show
  1. {data_factory_testing_framework-1.0.5/src/data_factory_testing_framework.egg-info → data_factory_testing_framework-1.1.0}/PKG-INFO +6 -2
  2. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/README.md +5 -1
  3. data_factory_testing_framework-1.1.0/VERSION +1 -0
  4. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_test_framework.py +1 -3
  5. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0/src/data_factory_testing_framework.egg-info}/PKG-INFO +6 -2
  6. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework.egg-info/SOURCES.txt +1 -2
  7. data_factory_testing_framework-1.0.5/VERSION +0 -1
  8. data_factory_testing_framework-1.0.5/tests/test_test_framework.py +0 -111
  9. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/DataFactoryTestingFramework.sln +0 -0
  10. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/LICENSE +0 -0
  11. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/MANIFEST.in +0 -0
  12. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/pyproject.toml +0 -0
  13. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/setup.cfg +0 -0
  14. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/setup.py +0 -0
  15. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/__init__.py +0 -0
  16. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_deserializers/__init__.py +0 -0
  17. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_deserializers/_deserializer_base.py +0 -0
  18. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_deserializers/_deserializer_data_factory.py +0 -0
  19. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_deserializers/_deserializer_fabric.py +0 -0
  20. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_deserializers/shared/__init__.py +0 -0
  21. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_deserializers/shared/_activity_deserializer.py +0 -0
  22. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_deserializers/shared/_data_factory_element_replacer.py +0 -0
  23. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_enum_meta.py +0 -0
  24. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_expression_runtime/data_factory_expression/__init__.py +0 -0
  25. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_expression_runtime/data_factory_expression/data_factory_to_expression_transformer.py +0 -0
  26. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_expression_runtime/data_factory_expression/exceptions.py +0 -0
  27. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_expression_runtime/data_factory_expression/expression_transformer.py +0 -0
  28. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_expression_runtime/expression_runtime.py +0 -0
  29. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_expression_runtime/functions_repository.py +0 -0
  30. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_pythonnet/Evaluator.csproj +0 -0
  31. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_pythonnet/__init__.py +0 -0
  32. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_pythonnet/data_factory_testing_framework_expressions_evaluator.py +0 -0
  33. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_repositories/__init__.py +0 -0
  34. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_repositories/_factories/base_repository_factory.py +0 -0
  35. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_repositories/_factories/data_factory_repository_factory.py +0 -0
  36. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_repositories/_factories/fabric_repository_factory.py +0 -0
  37. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/_repositories/data_factory_repository.py +0 -0
  38. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/__init__.py +0 -0
  39. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_activity_not_found_error.py +0 -0
  40. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_activity_output_field_not_found_error.py +0 -0
  41. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_control_activity_expression_evaluated_not_to_expected_type.py +0 -0
  42. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_data_factory_element_evaluation_error.py +0 -0
  43. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_function_call_invalid_arguments_count_error.py +0 -0
  44. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_parameter_not_found_error.py +0 -0
  45. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_pipeline_activities_circular_dependency_error.py +0 -0
  46. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_pipeline_not_found_error.py +0 -0
  47. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_state_iteration_item_not_set_error.py +0 -0
  48. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_unsupported_function_error.py +0 -0
  49. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_user_error.py +0 -0
  50. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_variable_being_evaluated_does_not_exist_error.py +0 -0
  51. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/exceptions/_variable_not_found_error.py +0 -0
  52. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/__init__.py +0 -0
  53. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/_data_factory_element.py +0 -0
  54. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/_data_factory_object_type.py +0 -0
  55. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/_pipeline.py +0 -0
  56. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/__init__.py +0 -0
  57. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_activity.py +0 -0
  58. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_activity_dependency.py +0 -0
  59. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_append_variable_activity.py +0 -0
  60. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_control_activity.py +0 -0
  61. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_execute_pipeline_activity.py +0 -0
  62. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_fail_activity.py +0 -0
  63. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_filter_activity.py +0 -0
  64. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_for_each_activity.py +0 -0
  65. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_if_condition_activity.py +0 -0
  66. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_set_variable_activity.py +0 -0
  67. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_switch_activity.py +0 -0
  68. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/models/activities/_until_activity.py +0 -0
  69. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/py.typed +0 -0
  70. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/state/__init__.py +0 -0
  71. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/state/_activity_result.py +0 -0
  72. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/state/_dependency_condition.py +0 -0
  73. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/state/_pipeline_run_state.py +0 -0
  74. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/state/_pipeline_run_variable.py +0 -0
  75. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/state/_run_parameter.py +0 -0
  76. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/state/_run_parameter_type.py +0 -0
  77. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework/state/_run_state.py +0 -0
  78. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework.egg-info/dependency_links.txt +0 -0
  79. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework.egg-info/requires.txt +0 -0
  80. {data_factory_testing_framework-1.0.5 → data_factory_testing_framework-1.1.0}/src/data_factory_testing_framework.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: data-factory-testing-framework
3
- Version: 1.0.5
3
+ Version: 1.1.0
4
4
  Summary: A stand-alone test framework that allows to write unit tests for Data Factory pipelines on Microsoft Fabric and Azure Data Factory.
5
5
  Author-email: Data Factory Testing Framework <dftf@microsoft.com>
6
6
  License: MIT License
@@ -44,7 +44,7 @@ Requires-Dist: pythonnet<4.0.0,>=3.0.3
44
44
 
45
45
  # Data Factory - Testing Framework :hammer_and_wrench:
46
46
 
47
- A stand-alone test framework that allows to write unit tests for Data Factory pipelines on [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/data-factory/) and [Azure Data Factory](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory).
47
+ A stand-alone test framework that allows to write unit tests for Data Factory pipelines on [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/data-factory/), [Azure Data Factory](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory) and [Azure Synapse Analytics](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory).
48
48
 
49
49
  > The framework is currently in _Public Preview_ and is not officially supported by Microsoft.
50
50
 
@@ -128,6 +128,10 @@ Azure Data Factory:
128
128
  1. [Copy blobs example](examples/data_factory/copy_blobs/README.md)
129
129
  2. [Batch job example](examples/data_factory/batch_job/README.md)
130
130
 
131
+ Azure Synapse Analytics:
132
+
133
+ 1. [Copy blobs example](examples/synapse/copy_blobs/README.md)
134
+
131
135
  ## Contributing :handshake:
132
136
 
133
137
  This project welcomes contributions and suggestions. Most contributions require you to agree to a
@@ -1,6 +1,6 @@
1
1
  # Data Factory - Testing Framework :hammer_and_wrench:
2
2
 
3
- A stand-alone test framework that allows to write unit tests for Data Factory pipelines on [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/data-factory/) and [Azure Data Factory](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory).
3
+ A stand-alone test framework that allows to write unit tests for Data Factory pipelines on [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/data-factory/), [Azure Data Factory](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory) and [Azure Synapse Analytics](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory).
4
4
 
5
5
  > The framework is currently in _Public Preview_ and is not officially supported by Microsoft.
6
6
 
@@ -84,6 +84,10 @@ Azure Data Factory:
84
84
  1. [Copy blobs example](examples/data_factory/copy_blobs/README.md)
85
85
  2. [Batch job example](examples/data_factory/batch_job/README.md)
86
86
 
87
+ Azure Synapse Analytics:
88
+
89
+ 1. [Copy blobs example](examples/synapse/copy_blobs/README.md)
90
+
87
91
  ## Contributing :handshake:
88
92
 
89
93
  This project welcomes contributions and suggestions. Most contributions require you to agree to a
@@ -0,0 +1 @@
1
+ 1.1.0
@@ -60,13 +60,11 @@ class TestFramework:
60
60
  self._repository = FabricRepositoryFactory().parse_from_folder(root_folder_path)
61
61
  else:
62
62
  self._repository = DataFactoryRepository([])
63
- elif self._framework_type == TestFrameworkType.DataFactory:
63
+ elif self._framework_type == TestFrameworkType.DataFactory or self._framework_type == TestFrameworkType.Synapse:
64
64
  if root_folder_path is not None:
65
65
  self._repository = DataFactoryRepositoryFactory().parse_from_folder(root_folder_path)
66
66
  else:
67
67
  self._repository = DataFactoryRepository([])
68
- elif self._framework_type == TestFrameworkType.Synapse:
69
- raise NotImplementedError("Synapse test framework is not implemented yet.")
70
68
 
71
69
  self._should_evaluate_child_pipelines = should_evaluate_child_pipelines
72
70
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: data-factory-testing-framework
3
- Version: 1.0.5
3
+ Version: 1.1.0
4
4
  Summary: A stand-alone test framework that allows to write unit tests for Data Factory pipelines on Microsoft Fabric and Azure Data Factory.
5
5
  Author-email: Data Factory Testing Framework <dftf@microsoft.com>
6
6
  License: MIT License
@@ -44,7 +44,7 @@ Requires-Dist: pythonnet<4.0.0,>=3.0.3
44
44
 
45
45
  # Data Factory - Testing Framework :hammer_and_wrench:
46
46
 
47
- A stand-alone test framework that allows to write unit tests for Data Factory pipelines on [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/data-factory/) and [Azure Data Factory](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory).
47
+ A stand-alone test framework that allows to write unit tests for Data Factory pipelines on [Microsoft Fabric](https://learn.microsoft.com/en-us/fabric/data-factory/), [Azure Data Factory](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory) and [Azure Synapse Analytics](https://learn.microsoft.com/en-us/azure/data-factory/concepts-pipelines-activities?tabs=data-factory).
48
48
 
49
49
  > The framework is currently in _Public Preview_ and is not officially supported by Microsoft.
50
50
 
@@ -128,6 +128,10 @@ Azure Data Factory:
128
128
  1. [Copy blobs example](examples/data_factory/copy_blobs/README.md)
129
129
  2. [Batch job example](examples/data_factory/batch_job/README.md)
130
130
 
131
+ Azure Synapse Analytics:
132
+
133
+ 1. [Copy blobs example](examples/synapse/copy_blobs/README.md)
134
+
131
135
  ## Contributing :handshake:
132
136
 
133
137
  This project welcomes contributions and suggestions. Most contributions require you to agree to a
@@ -73,5 +73,4 @@ src/data_factory_testing_framework/state/_pipeline_run_state.py
73
73
  src/data_factory_testing_framework/state/_pipeline_run_variable.py
74
74
  src/data_factory_testing_framework/state/_run_parameter.py
75
75
  src/data_factory_testing_framework/state/_run_parameter_type.py
76
- src/data_factory_testing_framework/state/_run_state.py
77
- tests/test_test_framework.py
76
+ src/data_factory_testing_framework/state/_run_state.py
@@ -1 +0,0 @@
1
- 1.0.5
@@ -1,111 +0,0 @@
1
- import pytest
2
- from data_factory_testing_framework import TestFramework, TestFrameworkType
3
- from data_factory_testing_framework.exceptions import (
4
- NoRemainingPipelineActivitiesMeetDependencyConditionsError,
5
- )
6
- from data_factory_testing_framework.models import DataFactoryElement, Pipeline
7
- from data_factory_testing_framework.models.activities import FailActivity, SetVariableActivity
8
-
9
-
10
- def test_circular_dependency_between_activities_should_throw_error() -> None:
11
- # Arrange
12
- test_framework = TestFramework(TestFrameworkType.Fabric)
13
- pipeline = Pipeline(
14
- pipeline_id="some-id",
15
- name="main",
16
- parameters={},
17
- variables={},
18
- activities=[
19
- SetVariableActivity(
20
- name="setVariable1",
21
- variable_name="variable",
22
- typeProperties={
23
- "variableName": "variable",
24
- "value": DataFactoryElement("'1'"),
25
- },
26
- dependsOn=[
27
- {
28
- "activity": "setVariable2",
29
- "dependencyConditions": [
30
- "Succeeded",
31
- ],
32
- }
33
- ],
34
- ),
35
- SetVariableActivity(
36
- name="setVariable2",
37
- variable_name="variable",
38
- typeProperties={
39
- "variableName": "variable",
40
- "value": DataFactoryElement("'1'"),
41
- },
42
- dependsOn=[
43
- {
44
- "activity": "setVariable1",
45
- "dependencyConditions": [
46
- "Succeeded",
47
- ],
48
- }
49
- ],
50
- ),
51
- ],
52
- )
53
- test_framework._repository.pipelines.append(pipeline)
54
-
55
- # Act & Assert
56
- with pytest.raises(NoRemainingPipelineActivitiesMeetDependencyConditionsError):
57
- next(test_framework.evaluate_pipeline(pipeline, []))
58
-
59
-
60
- def test_fail_activity_halts_further_evaluation() -> None:
61
- # Arrange
62
- test_framework = TestFramework(TestFrameworkType.Fabric)
63
- pipeline = Pipeline(
64
- pipeline_id="some-id",
65
- name="main",
66
- parameters={},
67
- variables={},
68
- activities=[
69
- SetVariableActivity(
70
- name="setVariable1",
71
- variable_name="variable",
72
- typeProperties={
73
- "variableName": "variable",
74
- "value": DataFactoryElement("'1'"),
75
- },
76
- dependsOn=[
77
- {
78
- "activity": "failActivity",
79
- "dependencyConditions": [
80
- "Succeeded",
81
- ],
82
- }
83
- ],
84
- ),
85
- FailActivity(
86
- name="failActivity",
87
- typeProperties={
88
- "message": DataFactoryElement("@concat('Error code: ', '500')"),
89
- "errorCode": "500",
90
- },
91
- dependsOn=[],
92
- ),
93
- ],
94
- )
95
- test_framework._repository.pipelines.append(pipeline)
96
-
97
- # Act
98
- activities = test_framework.evaluate_pipeline(pipeline, [])
99
-
100
- # Assert
101
- activity = next(activities)
102
- assert activity is not None
103
- assert activity.name == "failActivity"
104
- assert activity.type == "Fail"
105
- assert activity.status == "Failed"
106
- assert activity.type_properties["message"].result == "Error code: 500"
107
- assert activity.type_properties["errorCode"] == "500"
108
-
109
- # Assert that there are no more activities
110
- with pytest.raises(StopIteration):
111
- next(activities)