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.
- histdatacom/__init__.py +64 -0
- histdatacom/__main__.py +21 -0
- histdatacom/activity_stages.py +3050 -0
- histdatacom/api.py +359 -0
- histdatacom/cancellation.py +372 -0
- histdatacom/cli.py +1250 -0
- histdatacom/cli_config.py +991 -0
- histdatacom/concurrency.py +49 -0
- histdatacom/config.py +36 -0
- histdatacom/csvs.py +57 -0
- histdatacom/data_analytics/__init__.py +31 -0
- histdatacom/data_analytics/cli.py +109 -0
- histdatacom/data_analytics/feed_regimes.py +731 -0
- histdatacom/data_quality/__init__.py +369 -0
- histdatacom/data_quality/bars.py +3346 -0
- histdatacom/data_quality/calendar.py +1606 -0
- histdatacom/data_quality/calendar_profiles.py +703 -0
- histdatacom/data_quality/campaign.py +791 -0
- histdatacom/data_quality/contracts.py +577 -0
- histdatacom/data_quality/discovery.py +299 -0
- histdatacom/data_quality/engine.py +131 -0
- histdatacom/data_quality/format_support.py +276 -0
- histdatacom/data_quality/ingestion.py +1196 -0
- histdatacom/data_quality/inventory.py +351 -0
- histdatacom/data_quality/manifest.py +568 -0
- histdatacom/data_quality/modeling.py +1169 -0
- histdatacom/data_quality/polars_cache.py +73 -0
- histdatacom/data_quality/profiles.py +1376 -0
- histdatacom/data_quality/provenance.py +896 -0
- histdatacom/data_quality/reporting.py +406 -0
- histdatacom/data_quality/rules.py +346 -0
- histdatacom/data_quality/symbols.py +1854 -0
- histdatacom/data_quality/ticks.py +2885 -0
- histdatacom/data_quality/time.py +3209 -0
- histdatacom/exceptions.py +724 -0
- histdatacom/fx_enums.py +325 -0
- histdatacom/helper_args.py +48 -0
- histdatacom/histdata_ascii.py +457 -0
- histdatacom/histdata_com.py +824 -0
- histdatacom/influx.py +270 -0
- histdatacom/legacy_boundary.py +28 -0
- histdatacom/manifest_store.py +1619 -0
- histdatacom/observability.py +217 -0
- histdatacom/options.py +98 -0
- histdatacom/orchestration/__init__.py +697 -0
- histdatacom/orchestration/activities.py +1501 -0
- histdatacom/orchestration/assets/README.md +26 -0
- histdatacom/orchestration/assets/manifest.json +70 -0
- histdatacom/orchestration/assets/runtime-defaults.json +31 -0
- histdatacom/orchestration/assets/temporal-runtime-index.json +61 -0
- histdatacom/orchestration/assets/third-party/temporal-cli/LICENSE +21 -0
- histdatacom/orchestration/assets/third-party/temporal-cli/NOTICE.md +14 -0
- histdatacom/orchestration/cli.py +820 -0
- histdatacom/orchestration/client.py +1885 -0
- histdatacom/orchestration/contracts.py +33 -0
- histdatacom/orchestration/control.py +886 -0
- histdatacom/orchestration/cutover.py +73 -0
- histdatacom/orchestration/live_smoke.py +730 -0
- histdatacom/orchestration/maintenance.py +508 -0
- histdatacom/orchestration/performance.py +343 -0
- histdatacom/orchestration/queues.py +214 -0
- histdatacom/orchestration/readiness.py +110 -0
- histdatacom/orchestration/resources.py +1090 -0
- histdatacom/orchestration/rich_progress.py +341 -0
- histdatacom/orchestration/runtime.py +464 -0
- histdatacom/orchestration/supervisor.py +1603 -0
- histdatacom/orchestration/telemetry.py +43 -0
- histdatacom/orchestration/throughput.py +717 -0
- histdatacom/orchestration/worker.py +462 -0
- histdatacom/orchestration/workflow_metadata.py +5 -0
- histdatacom/orchestration/workflows.py +2333 -0
- histdatacom/records.py +283 -0
- histdatacom/repository_output.py +61 -0
- histdatacom/repository_quality.py +254 -0
- histdatacom/runtime_contracts.py +598 -0
- histdatacom/scraper/__init__.py +1 -0
- histdatacom/scraper/repo.py +386 -0
- histdatacom/scraper/scraper.py +439 -0
- histdatacom/scraper/urls.py +56 -0
- histdatacom/utils.py +270 -0
- histdatacom/verbosity.py +140 -0
- histdatacom-1.0.0.dist-info/METADATA +1821 -0
- histdatacom-1.0.0.dist-info/RECORD +87 -0
- histdatacom-1.0.0.dist-info/WHEEL +5 -0
- histdatacom-1.0.0.dist-info/entry_points.txt +2 -0
- histdatacom-1.0.0.dist-info/licenses/LICENSE +21 -0
- histdatacom-1.0.0.dist-info/top_level.txt +1 -0
histdatacom/__init__.py
ADDED
|
@@ -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
|
histdatacom/__main__.py
ADDED
|
@@ -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()
|