histdatacom 1.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.
Files changed (87) hide show
  1. histdatacom/__init__.py +64 -0
  2. histdatacom/__main__.py +21 -0
  3. histdatacom/activity_stages.py +3050 -0
  4. histdatacom/api.py +359 -0
  5. histdatacom/cancellation.py +372 -0
  6. histdatacom/cli.py +1250 -0
  7. histdatacom/cli_config.py +991 -0
  8. histdatacom/concurrency.py +49 -0
  9. histdatacom/config.py +36 -0
  10. histdatacom/csvs.py +57 -0
  11. histdatacom/data_analytics/__init__.py +31 -0
  12. histdatacom/data_analytics/cli.py +109 -0
  13. histdatacom/data_analytics/feed_regimes.py +731 -0
  14. histdatacom/data_quality/__init__.py +369 -0
  15. histdatacom/data_quality/bars.py +3346 -0
  16. histdatacom/data_quality/calendar.py +1606 -0
  17. histdatacom/data_quality/calendar_profiles.py +703 -0
  18. histdatacom/data_quality/campaign.py +791 -0
  19. histdatacom/data_quality/contracts.py +577 -0
  20. histdatacom/data_quality/discovery.py +299 -0
  21. histdatacom/data_quality/engine.py +131 -0
  22. histdatacom/data_quality/format_support.py +276 -0
  23. histdatacom/data_quality/ingestion.py +1196 -0
  24. histdatacom/data_quality/inventory.py +351 -0
  25. histdatacom/data_quality/manifest.py +568 -0
  26. histdatacom/data_quality/modeling.py +1169 -0
  27. histdatacom/data_quality/polars_cache.py +73 -0
  28. histdatacom/data_quality/profiles.py +1376 -0
  29. histdatacom/data_quality/provenance.py +896 -0
  30. histdatacom/data_quality/reporting.py +406 -0
  31. histdatacom/data_quality/rules.py +346 -0
  32. histdatacom/data_quality/symbols.py +1854 -0
  33. histdatacom/data_quality/ticks.py +2885 -0
  34. histdatacom/data_quality/time.py +3209 -0
  35. histdatacom/exceptions.py +724 -0
  36. histdatacom/fx_enums.py +325 -0
  37. histdatacom/helper_args.py +48 -0
  38. histdatacom/histdata_ascii.py +457 -0
  39. histdatacom/histdata_com.py +824 -0
  40. histdatacom/influx.py +270 -0
  41. histdatacom/legacy_boundary.py +28 -0
  42. histdatacom/manifest_store.py +1619 -0
  43. histdatacom/observability.py +217 -0
  44. histdatacom/options.py +98 -0
  45. histdatacom/orchestration/__init__.py +697 -0
  46. histdatacom/orchestration/activities.py +1501 -0
  47. histdatacom/orchestration/assets/README.md +26 -0
  48. histdatacom/orchestration/assets/manifest.json +70 -0
  49. histdatacom/orchestration/assets/runtime-defaults.json +31 -0
  50. histdatacom/orchestration/assets/temporal-runtime-index.json +61 -0
  51. histdatacom/orchestration/assets/third-party/temporal-cli/LICENSE +21 -0
  52. histdatacom/orchestration/assets/third-party/temporal-cli/NOTICE.md +14 -0
  53. histdatacom/orchestration/cli.py +820 -0
  54. histdatacom/orchestration/client.py +1885 -0
  55. histdatacom/orchestration/contracts.py +33 -0
  56. histdatacom/orchestration/control.py +886 -0
  57. histdatacom/orchestration/cutover.py +73 -0
  58. histdatacom/orchestration/live_smoke.py +730 -0
  59. histdatacom/orchestration/maintenance.py +508 -0
  60. histdatacom/orchestration/performance.py +343 -0
  61. histdatacom/orchestration/queues.py +214 -0
  62. histdatacom/orchestration/readiness.py +110 -0
  63. histdatacom/orchestration/resources.py +1090 -0
  64. histdatacom/orchestration/rich_progress.py +341 -0
  65. histdatacom/orchestration/runtime.py +464 -0
  66. histdatacom/orchestration/supervisor.py +1603 -0
  67. histdatacom/orchestration/telemetry.py +43 -0
  68. histdatacom/orchestration/throughput.py +717 -0
  69. histdatacom/orchestration/worker.py +462 -0
  70. histdatacom/orchestration/workflow_metadata.py +5 -0
  71. histdatacom/orchestration/workflows.py +2333 -0
  72. histdatacom/records.py +283 -0
  73. histdatacom/repository_output.py +61 -0
  74. histdatacom/repository_quality.py +254 -0
  75. histdatacom/runtime_contracts.py +598 -0
  76. histdatacom/scraper/__init__.py +1 -0
  77. histdatacom/scraper/repo.py +386 -0
  78. histdatacom/scraper/scraper.py +439 -0
  79. histdatacom/scraper/urls.py +56 -0
  80. histdatacom/utils.py +270 -0
  81. histdatacom/verbosity.py +140 -0
  82. histdatacom-1.0.0.dist-info/METADATA +1821 -0
  83. histdatacom-1.0.0.dist-info/RECORD +87 -0
  84. histdatacom-1.0.0.dist-info/WHEEL +5 -0
  85. histdatacom-1.0.0.dist-info/entry_points.txt +2 -0
  86. histdatacom-1.0.0.dist-info/licenses/LICENSE +21 -0
  87. histdatacom-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,64 @@
1
+ """Entry point for histdatacom api.
2
+
3
+ histdatacom(options)
4
+
5
+ Returns:
6
+ data: returns a data frame or a list of data frames and metadata
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import sys
12
+ from typing import TYPE_CHECKING
13
+
14
+ from histdatacom.fx_enums import Format, Pairs, Timeframe
15
+ from histdatacom.options import Options
16
+
17
+ if TYPE_CHECKING:
18
+ from pandas import DataFrame # type: ignore
19
+ from polars import DataFrame as PolarsDataFrame
20
+ from pyarrow import Table
21
+
22
+ __all__ = [
23
+ "Options",
24
+ "Pairs",
25
+ "Timeframe",
26
+ "Format",
27
+ ]
28
+
29
+
30
+ __version__ = "1.0.0"
31
+ __author__ = "David Midlo"
32
+
33
+
34
+ class APICaller(sys.modules[__name__].__class__): # type: ignore # noqa:H601
35
+ """APICaller. A Masquerade class.
36
+
37
+ A class that extends sys.modules[__name__].__class__ (the histdatacom class)
38
+ extends/overwrites with a __call__ method to allow the module to be callable.
39
+
40
+ Returns:
41
+ data: returns a data frame or a list of data frames and metadata
42
+ """
43
+
44
+ def __call__( # noqa:BLK001
45
+ self, options: Options
46
+ ) -> "list" | "PolarsDataFrame" | "DataFrame" | "Table":
47
+ """Run histdatacom -h for help.
48
+
49
+ Args:
50
+ options (Options): a histdatacom Options object.
51
+
52
+ Returns:
53
+ "list" | "PolarsDataFrame" | "DataFrame" | "Table":
54
+ - (list) if called with -A or -U
55
+ - (PolarsDataFrame) if options.api_return_type = "polars"
56
+ - (DataFrame) if options.api_return_type = "pandas"
57
+ - (Table) if options.api_return_type = "arrow"
58
+ """
59
+ from . import histdata_com
60
+
61
+ return histdata_com.main(options)
62
+
63
+
64
+ sys.modules[__name__].__class__ = APICaller
@@ -0,0 +1,21 @@
1
+ # pylint: disable=invalid-name
2
+ """histdatacom.
3
+
4
+ Allows histdatacom to be run as a module with
5
+ as >>> python -m histdatacom
6
+ """
7
+
8
+ from . import histdata_com # noqa:WPS130
9
+
10
+
11
+ def main() -> None: # noqa:DAR401
12
+ """Run histdata_com.main and raise SystemExit on completion.
13
+
14
+ Raises:
15
+ SystemExit: Exit when finished.
16
+ """
17
+ raise SystemExit(histdata_com.main())
18
+
19
+
20
+ if __name__ == "__main__":
21
+ main()