aplos-nca-saas-sdk 0.0.6__tar.gz → 0.0.7__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 (51) hide show
  1. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/PKG-INFO +1 -1
  2. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/pyproject.toml +1 -1
  3. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_base.py +19 -1
  4. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_suite.py +20 -12
  5. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/main.py +6 -2
  6. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/tests/app_login_test.py +1 -0
  7. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/version.py +1 -1
  8. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/.gitignore +0 -0
  9. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/.pypirc +0 -0
  10. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/.vscode/launch.json +0 -0
  11. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/.vscode/settings.json +0 -0
  12. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/LICENSE +0 -0
  13. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/README.md +0 -0
  14. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/devops/pypi/build.py +0 -0
  15. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/devops/pypi/readme.md +0 -0
  16. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/devops/requirements.txt +0 -0
  17. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/docs/images/API_Configuration_blur.png +0 -0
  18. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/docs/images/aplos-nca-commandline-cropped.png +0 -0
  19. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/docs/images/aplos-nca-commandline.png +0 -0
  20. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/mypy.ini +0 -0
  21. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/mypy_checks.py +0 -0
  22. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/readme.md +0 -0
  23. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/requirements.txt +0 -0
  24. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/run-checks.sh +0 -0
  25. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/__init__.py +0 -0
  26. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/aws_resources/aws_cognito.py +0 -0
  27. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_payload.py +0 -0
  28. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/aws_resources/aws_s3_presigned_upload.py +0 -0
  29. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/files/analysis_files/single_ev/configuration_single_ev.json +0 -0
  30. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/files/analysis_files/single_ev/meta_data.json +0 -0
  31. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/files/analysis_files/single_ev/single_ev.csv +0 -0
  32. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/configs/_config_base.py +0 -0
  33. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/configs/app_settings.py +0 -0
  34. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/configs/config_sample.json +0 -0
  35. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/configs/login.py +0 -0
  36. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_configurations.py +0 -0
  37. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_factory.py +0 -0
  38. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/integration_test_response.py +0 -0
  39. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/readme.md +0 -0
  40. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/tests/app_configuration_test.py +0 -0
  41. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/tests/app_execution_test.py +0 -0
  42. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/integration_testing/tests/app_validation_test.py +0 -0
  43. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/nca_resources/nca_app_configuration.py +0 -0
  44. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/nca_resources/nca_endpoints.py +0 -0
  45. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/nca_resources/nca_executions.py +0 -0
  46. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/nca_resources/nca_login.py +0 -0
  47. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/utilities/commandline_args.py +0 -0
  48. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/utilities/environment_services.py +0 -0
  49. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/utilities/environment_vars.py +0 -0
  50. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/src/aplos_nca_saas_sdk/utilities/http_utility.py +0 -0
  51. {aplos_nca_saas_sdk-0.0.6 → aplos_nca_saas_sdk-0.0.7}/tests/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: aplos_nca_saas_sdk
3
- Version: 0.0.6
3
+ Version: 0.0.7
4
4
  Summary: Aplos NCA SaaS SDK
5
5
  Project-URL: Homepage, https://aplosanalytics.com/
6
6
  Project-URL: Documentation, https://docs.aplosanalytics.com/
@@ -26,7 +26,7 @@ keywords = [
26
26
  "Clinical Trials"
27
27
  ]
28
28
 
29
- version = "0.0.6"
29
+ version = "0.0.7"
30
30
  authors = [
31
31
  { name="Eric Wilson", email="eric.wilson@aplosanalytics.com" }
32
32
  ]
@@ -55,7 +55,25 @@ class IntegrationTestBase:
55
55
  """
56
56
  Returns True if all tests in the suite were successful
57
57
  """
58
- return all([result.success for result in self.results])
58
+ return all([result.error is None for result in self.results])
59
+
60
+ def skipped_count(self) -> int:
61
+ """
62
+ Gets the number of tests that were skipped
63
+ """
64
+ return len([result for result in self.results if result.skipped])
65
+
66
+ def error_count(self) -> int:
67
+ """
68
+ Gets the number of tests that resulted in an error
69
+ """
70
+ return len([result for result in self.results if result.error is not None])
71
+
72
+ def errors(self) -> List[str]:
73
+ """
74
+ Gets the list of errors that occurred during the test
75
+ """
76
+ return [result.error for result in self.results if result.error is not None]
59
77
 
60
78
  def test(self) -> bool:
61
79
  """
@@ -42,9 +42,10 @@ class IntegrationTestSuite:
42
42
  test.config = test_config
43
43
  test_result: Dict[str, Any] = {
44
44
  "test_name": test.name,
45
- "success": True,
46
- "error": None,
47
- "skipped": False,
45
+ "success": 0,
46
+ "errors": [],
47
+ "skipped_count": 0,
48
+ "error_count": 0,
48
49
  "start_time_utc": None,
49
50
  "end_time_utc": None,
50
51
  }
@@ -55,10 +56,17 @@ class IntegrationTestSuite:
55
56
  success = test.test()
56
57
  test_result["success"] = success
57
58
  test_result["results"] = test.results
59
+ test_result["skipped_count"] = test.skipped_count()
60
+ test_result["error_count"] = test.error_count()
61
+ test_result["errors"] = test.errors()
62
+ if not success:
63
+ if self.fail_fast:
64
+ # just break and let the failure routine handle it
65
+ break
58
66
 
59
67
  except Exception as e: # pylint: disable=broad-except
60
68
  test_result["success"] = False
61
- test_result["error"] = str(e)
69
+ test_result["errors"] = [str(e)]
62
70
  if self.fail_fast:
63
71
  # just break and let the failure routine handle it
64
72
  break
@@ -72,7 +80,7 @@ class IntegrationTestSuite:
72
80
  else:
73
81
  logger.error(test_result)
74
82
  # find the failures
75
- failures = [test for test in self.test_results if not test["success"]]
83
+ failures = [test for test in self.test_results if len(test["errors"]) > 0]
76
84
  self.__print_results(start_time, failures)
77
85
 
78
86
  # print the results
@@ -86,19 +94,19 @@ class IntegrationTestSuite:
86
94
 
87
95
  def __print_results(self, start_time: datetime, failures: List[Dict[str, Any]]):
88
96
  print("Test Results:")
97
+ skipped = sum([test["skipped_count"] for test in self.test_results])
98
+
89
99
  for test_result in self.test_results:
90
100
  duration = test_result["end_time_utc"] - test_result["start_time_utc"]
91
101
  print(
92
102
  f" {test_result['test_name']} {'succeeded' if test_result['success'] else 'failed'} duration: {duration}"
93
103
  )
94
104
  if not test_result["success"]:
95
- print(f" Error: {test_result['error']}")
105
+ print(f" Error: {test_result['errors']}")
96
106
 
97
107
  print(f"Test Suite completed in {datetime.now(UTC) - start_time}")
98
108
 
99
- print(f"Total Tests: {len(self.test_results)}")
100
- print(f"Successful Tests: {len(self.test_results) - len(failures)}")
101
- print(f"Failed Tests: {len(failures)}")
102
- print(
103
- f"Skipped Tests: {len([test for test in self.test_results if test['skipped']])}"
104
- )
109
+ print(f" Total Tests: {len(self.test_results)}")
110
+ print(f" Successful: {len(self.test_results) - len(failures) - skipped}")
111
+ print(f" Skipped: {skipped}")
112
+ print(f" Failed: {len(failures)}")
@@ -29,12 +29,16 @@ def main():
29
29
 
30
30
  # normally we'd pull a test configuration file from Secrets Manager, Parameter Store, or some other secure location
31
31
  # here we're going to pull the sample file and then override some it's values.
32
- config_file = os.path.join(Path(__file__).parent, "configs", "config_sample.json")
32
+ config_file = os.path.join(
33
+ Path(__file__).parent,
34
+ "configs",
35
+ os.getenv("TEST_CONFIG_FILE") or "config_sample.json",
36
+ )
33
37
  # load it so we can see what it looks like
34
38
  config.load(file_path=config_file)
35
39
 
36
40
  # override the configuration
37
- override_config(config)
41
+ # override_config(config)
38
42
 
39
43
  its.test(test_config=config)
40
44
 
@@ -31,6 +31,7 @@ class TestAppLogin(IntegrationTestBase):
31
31
  test_response.name = self.name
32
32
  if not login.enabled or not self.config.logins.enabled:
33
33
  test_response.skipped = True
34
+ test_response.success = True
34
35
  self.results.append(test_response)
35
36
  continue
36
37
  try:
@@ -1,4 +1,4 @@
1
1
  # Aplos NCA SaaS SDK Version File
2
2
  # This is automatically generated during the build process.
3
3
  # DO NOT UPDATE IT DIRECTLY. IT WILL BE OVERWRITTEN.
4
- __version__ = '0.0.6'
4
+ __version__ = '0.0.7'