gen3-dataops-toolkit 2.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 (53) hide show
  1. g3dt/__init__.py +0 -0
  2. g3dt/cli/__init__.py +5 -0
  3. g3dt/cli/_internal/__init__.py +1 -0
  4. g3dt/cli/_internal/dispatch.py +428 -0
  5. g3dt/cli/_internal/registry.py +65 -0
  6. g3dt/cli/_internal/resolve.py +22 -0
  7. g3dt/cli/_internal/runner.py +76 -0
  8. g3dt/cli/_internal/safety.py +110 -0
  9. g3dt/cli/config_cmds.py +202 -0
  10. g3dt/cli/delete_cmds.py +101 -0
  11. g3dt/cli/dict_cmds.py +102 -0
  12. g3dt/cli/ec2_cmds.py +114 -0
  13. g3dt/cli/indexd_cmds.py +57 -0
  14. g3dt/cli/jobs.py +83 -0
  15. g3dt/cli/k8s.py +54 -0
  16. g3dt/cli/main.py +110 -0
  17. g3dt/cli/metadata.py +76 -0
  18. g3dt/cli/synth.py +206 -0
  19. g3dt/config.py +393 -0
  20. g3dt/indexd/__init__.py +0 -0
  21. g3dt/indexd/indexd_registrar.py +244 -0
  22. g3dt/ingest/ingest.py +629 -0
  23. g3dt/resolver.py +163 -0
  24. g3dt/services/delete/delete_all_metadata_for_project.py +170 -0
  25. g3dt/services/delete/delete_metadata.sh +153 -0
  26. g3dt/services/delete/delete_metadata_by_guid.py +338 -0
  27. g3dt/services/dictionary/deploy_dd.sh +65 -0
  28. g3dt/services/dictionary/pull_dict.sh +59 -0
  29. g3dt/services/dictionary/upload_dictionary.py +109 -0
  30. g3dt/services/indexd/register_indexd.py +240 -0
  31. g3dt/services/k8s_ops/argocd_restart_etl.sh +140 -0
  32. g3dt/services/k8s_ops/argocd_restart_ms.sh +102 -0
  33. g3dt/services/k8s_ops/argocd_restart_schema.sh +106 -0
  34. g3dt/services/k8s_ops/login_to_pod.sh +110 -0
  35. g3dt/services/k8s_ops/restart_etl_and_ms.sh +56 -0
  36. g3dt/services/synthetic_data/delete_synth_metadata_sheepdog.py +183 -0
  37. g3dt/services/synthetic_data/full_deploy_dd_and_synth.sh +124 -0
  38. g3dt/services/synthetic_data/generate_synth_metadata.sh +133 -0
  39. g3dt/services/synthetic_data/upload_synth_metadata_sheepdog.py +165 -0
  40. g3dt/services/upload/metadata/upload_all_studies.sh +108 -0
  41. g3dt/services/upload/metadata/upload_metadata.py +152 -0
  42. g3dt/upload/__init__.py +1 -0
  43. g3dt/upload/metadata_deleter.py +265 -0
  44. g3dt/upload/metadata_submitter.py +1093 -0
  45. g3dt/upload/upload_synthdata_s3.py +164 -0
  46. g3dt/utils/athena_utils.py +834 -0
  47. g3dt/utils/dbt_utils.py +66 -0
  48. g3dt/utils/release_writer.py +188 -0
  49. g3dt/validate/validate.py +609 -0
  50. gen3_dataops_toolkit-2.0.0.dist-info/METADATA +125 -0
  51. gen3_dataops_toolkit-2.0.0.dist-info/RECORD +53 -0
  52. gen3_dataops_toolkit-2.0.0.dist-info/WHEEL +4 -0
  53. gen3_dataops_toolkit-2.0.0.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,125 @@
1
+ Metadata-Version: 2.4
2
+ Name: gen3-dataops-toolkit
3
+ Version: 2.0.0
4
+ Summary: Gen3 DataOps toolkit (g3dt): operate SSM-published Gen3 data pipeline environments
5
+ License: Apache-2.0
6
+ Author: JoshuaHarris391
7
+ Author-email: harjo391@gmail.com
8
+ Requires-Python: >=3.9.5,<4.0.0
9
+ Classifier: License :: OSI Approved :: Apache Software License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Requires-Dist: awswrangler (>=3.14.0,<4.0.0)
17
+ Requires-Dist: boto3
18
+ Requires-Dist: gen3 (>=4.27.4,<5.0.0)
19
+ Requires-Dist: gen3-metadata (>=1.4.0,<2.0.0)
20
+ Requires-Dist: gen3_validator (>=2.0.0,<3.0.0)
21
+ Requires-Dist: numpy (<2.0.0)
22
+ Requires-Dist: pyarrow (>=14.0.0,<19.0.0)
23
+ Requires-Dist: pyjwt (>=2.10.1,<3.0.0)
24
+ Requires-Dist: python-dotenv
25
+ Requires-Dist: pytz (>=2025.2,<2026.0)
26
+ Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
27
+ Requires-Dist: s3fs (==2025.10.0)
28
+ Requires-Dist: tenacity (>=8.2,<10.0)
29
+ Requires-Dist: typer (>=0.12)
30
+ Requires-Dist: tzlocal (>=5.3.1,<6.0.0)
31
+ Project-URL: Repository, https://github.com/AustralianBioCommons/gen3-dataops-toolkit
32
+ Description-Content-Type: text/markdown
33
+
34
+ # gen3-dataops-toolkit (`g3dt`)
35
+
36
+ Operate Gen3 AWS data-pipeline environments from one pip-installable CLI.
37
+
38
+ `g3dt` is the tooling half of the Gen3 DataOps platform: the
39
+ [gen3-aws-data-pipeline](https://github.com/AustralianBioCommons/gen3-aws-data-pipeline)
40
+ CDK app deploys a complete pipeline per project/environment and publishes every
41
+ resource name to AWS SSM Parameter Store; `g3dt` resolves those names at
42
+ runtime and gives operators one command surface for dictionary deploys,
43
+ metadata upload/delete, indexd registration, EC2 job dispatch, and Kubernetes
44
+ restarts. The dbt half of the platform lives in
45
+ [gen3-dbt-template](https://github.com/AustralianBioCommons/gen3-dbt-template).
46
+
47
+ **No AWS resource name is compiled into this package.** The same wheel
48
+ operates any project: it is targeted purely by `--env`, the project's SSM tree
49
+ (`/{project}/{env}/...`), and a tiny local bootstrap marker.
50
+
51
+ ## Install
52
+
53
+ ```bash
54
+ pip install gen3-dataops-toolkit
55
+ ```
56
+
57
+ ## Bootstrap (the only local configuration)
58
+
59
+ `g3dt` needs to know just the project and region — everything else comes from
60
+ SSM. Create `~/.g3dt/g3dt.yaml`:
61
+
62
+ ```yaml
63
+ project: etl # your projectId
64
+ region: ap-southeast-2
65
+ default_env: test
66
+ profiles: # optional: AWS named profile per env
67
+ test: etl_test # (omit entirely on EC2/CodeBuild — ambient
68
+ staging: etl_staging # role credentials are used)
69
+ studies: # optional: the project's study registry;
70
+ mystudy_test: # alternatively upload it once per env to
71
+ project_id: MyStudy # s3://<metadata-bucket>/config/studies.yaml
72
+ program_id: program1
73
+ s3_metadata_path: s3://my-bucket/metadata/mystudy/
74
+ ```
75
+
76
+ Search order: `./g3dt.yaml` → `~/.g3dt/g3dt.yaml` → `/etc/g3dt/g3dt.yaml`
77
+ (the EC2 job box's copy, written by CDK user-data). Env vars override:
78
+ `G3DT_PROJECT`, `AWS_REGION`, `G3DT_DEFAULT_ENV`.
79
+
80
+ ## Quick start
81
+
82
+ ```bash
83
+ g3dt config envs # environments with a deployed SSM tree
84
+ g3dt config show --env test # every resolved name — the safety check
85
+ g3dt ec2 up --env test # start the env's job box (SSM-managed)
86
+ g3dt metadata upload --study mystudy --env test --on ec2
87
+ g3dt jobs logs <run-id> --follow # live logs; laptop can sleep, job keeps going
88
+ g3dt ec2 down --env test # or let the auto-stop alarm handle it
89
+ g3dt docs # the full operations overview
90
+ ```
91
+
92
+ ## How configuration works
93
+
94
+ There are exactly two kinds of configuration:
95
+
96
+ - **INPUTS** — human-authored values, committed as
97
+ `config/<projectId>.<env>.json` in the CDK repo and read only by
98
+ `cdk deploy`. To change a deployed setting (e.g. the dictionary version),
99
+ edit that file and redeploy — the value flows to SSM.
100
+ - **OUTPUTS** — every resource name the CDK creates plus the mirrored Gen3
101
+ app facts, published to SSM under `/{project}/{env}/...` on deploy. `g3dt`
102
+ reads these live (cached one round-trip per invocation) and never stores
103
+ them locally.
104
+
105
+ Because the CLI and the infrastructure read the same parameters, they cannot
106
+ disagree — and because each environment has its own tree (including its own
107
+ `ec2/instanceId`), running a job against the wrong environment's resources is
108
+ structurally impossible.
109
+
110
+ ## Development
111
+
112
+ ```bash
113
+ poetry install
114
+ poetry run python3 -m pytest
115
+ ```
116
+
117
+ ## Provenance
118
+
119
+ This toolkit was ported (working tree only) from
120
+ [AustralianBioCommons/acdc-aws-etl-pipeline](https://github.com/AustralianBioCommons/acdc-aws-etl-pipeline),
121
+ the ACDC ETL monolith, as part of the Gen3 DataOps platform refactor (2026).
122
+ It starts at version **2.0.0**; versions ≤ 1.2.0 on PyPI are the legacy
123
+ `acdc_aws_etl_pipeline` package, which continues to operate the legacy ACDC
124
+ pipeline unchanged.
125
+
@@ -0,0 +1,53 @@
1
+ g3dt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ g3dt/cli/__init__.py,sha256=9v7e7h3EBw-Gmk7kkFnaJ5A4rMO7BC4W1Fe_XpKDBVU,190
3
+ g3dt/cli/_internal/__init__.py,sha256=l-i4zejAuT7zliVczKBiD4wYTY6-jYdGs-ruxKfrhxA,90
4
+ g3dt/cli/_internal/dispatch.py,sha256=HOHMGyJ5DmtCqeU46KlNYcs71HbmKv3ccaAFJ6cWHjo,15624
5
+ g3dt/cli/_internal/registry.py,sha256=ty0uaKYKp95I9JSh8dmG2XgxdxjVioeoqbcr1gyRRz4,1686
6
+ g3dt/cli/_internal/resolve.py,sha256=oCRj6iw3mOLzEhtmGsc5Mxdkz24TQSNCHpQjRoV38KM,614
7
+ g3dt/cli/_internal/runner.py,sha256=YgSpwRHSXzhv1i8OLZnVDTktIHzTQOFLxRpY7jinazQ,2680
8
+ g3dt/cli/_internal/safety.py,sha256=ibIFrB0dQYLF9JQffxmtC32oD4Wy1LE1Rmk5Nrt0VxU,3872
9
+ g3dt/cli/config_cmds.py,sha256=bPwVTtPmuUX8iktQyFzTGJoO9xF0_owLnwEFMQ0Qduw,7366
10
+ g3dt/cli/delete_cmds.py,sha256=QzqKj9yoEPPn8UnbaXLJMplpgRz7tILZ1tyh7zDjfIc,3686
11
+ g3dt/cli/dict_cmds.py,sha256=mqZMmriKWqcquTChM28lxAnvFejPc0ViTZ5q4yu9QRQ,3294
12
+ g3dt/cli/ec2_cmds.py,sha256=__ZLvSHYw9a3EF23yvGIPKD6y7Xbdx1zGpvVbsR-YkE,4256
13
+ g3dt/cli/indexd_cmds.py,sha256=GoFs-JBQnzc6eAKuDwGNMZ_kvA3ll1eKqnpX0IIFp7M,1854
14
+ g3dt/cli/jobs.py,sha256=DueLOdSEr__qG44mzNifly9Vnb8Vwt6Jsrtyu3z7ys0,2793
15
+ g3dt/cli/k8s.py,sha256=1h-IqyFwhsHrMG-bjgytbz26DxnvIIMxsEfcVIeyTEA,1972
16
+ g3dt/cli/main.py,sha256=GB91S0MmBeH3_uMV4nMiXuVGfSnrOgrHUa3FjxTAtCc,3641
17
+ g3dt/cli/metadata.py,sha256=I-jwGS6jWsY-EtpTqXFTtqOdwzEQ3AlGsR6SmyCmC-k,2630
18
+ g3dt/cli/synth.py,sha256=5VKRb02vYHOtHSzz5anmD7MSwKs6HLLO4_ooxurRSJQ,7231
19
+ g3dt/config.py,sha256=KYFgnu6LYewqPDEJ_5GPt58vOwjC8upc7GcKRq71Dmk,15014
20
+ g3dt/indexd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ g3dt/indexd/indexd_registrar.py,sha256=EknHXv81MshZJm101UrBtQfQjgZntnOR9O6Ed_eYYng,7231
22
+ g3dt/ingest/ingest.py,sha256=NLiJ_yij28D90UvcuCnZZmQSQQJqKCuoyQdlueNu_pY,23856
23
+ g3dt/resolver.py,sha256=A2xgHVQrVc5YBvwJr90ITCYLX-D3kchKHz4xzJoUpHU,5965
24
+ g3dt/services/delete/delete_all_metadata_for_project.py,sha256=tSlkFu1u35C4a_ORdYgamxOVwazTG88TUlMbCpAtkYc,4563
25
+ g3dt/services/delete/delete_metadata.sh,sha256=5haS4K8o4zywDJCGKoWLXlFg4jeVn49zecCvJaOnaEk,4714
26
+ g3dt/services/delete/delete_metadata_by_guid.py,sha256=0_iwhJ4KIG0ESNMcELSfrL3rXuMYW2HA5AOePUZJqAU,9967
27
+ g3dt/services/dictionary/deploy_dd.sh,sha256=wWcne7l4qa3NAOPAC1T22OV9c4ObwVYOKZRmOQZCdJ0,2895
28
+ g3dt/services/dictionary/pull_dict.sh,sha256=gUX_ilfoaoSS6U6ZRQNnkjFLK8AwZ3AWEUYgRoD8M6Y,1643
29
+ g3dt/services/dictionary/upload_dictionary.py,sha256=jBFAot26xfNyqHXLtFvon9vrtKDfDriXby7wXf0Iy_g,3249
30
+ g3dt/services/indexd/register_indexd.py,sha256=YwBLpsrL6fV1SyjHorR04YMV4HjDnNWR3sgkLm29Q3o,6698
31
+ g3dt/services/k8s_ops/argocd_restart_etl.sh,sha256=0vRHLQw1Fpvg1myiS83bOH6hUkPFjIURCj6laSDN5Jg,5071
32
+ g3dt/services/k8s_ops/argocd_restart_ms.sh,sha256=1HrSUPO5cUaocMpl7OgZeyBRac0I_ceAT1vbkdpXbvU,2828
33
+ g3dt/services/k8s_ops/argocd_restart_schema.sh,sha256=5M5eEip9yOFkLL6FMlzCmyrlNMoFoMBdT2S0st8tNqE,3002
34
+ g3dt/services/k8s_ops/login_to_pod.sh,sha256=w1qA-8MhtXM9-MnUTvqX1nMRyjBF64-8uBtMBldA7mY,3397
35
+ g3dt/services/k8s_ops/restart_etl_and_ms.sh,sha256=VbUzEYEd1fv4VkwLcvRQS-byHwW5x_Y6OcT2SNHsqUQ,2069
36
+ g3dt/services/synthetic_data/delete_synth_metadata_sheepdog.py,sha256=frm35EYdfXyREOUeZKO_j9pbrjKuZLRN0bPO2BeeEj0,5053
37
+ g3dt/services/synthetic_data/full_deploy_dd_and_synth.sh,sha256=RdHLTR9wmr3PPogHV6_pD7cC7-tEOUMFn8GThB3E82I,5087
38
+ g3dt/services/synthetic_data/generate_synth_metadata.sh,sha256=cD3TIEDBzFt9-tI7PWrkw9YI0tWMik0M86xrxtvnAKw,4996
39
+ g3dt/services/synthetic_data/upload_synth_metadata_sheepdog.py,sha256=0JrCsBzscjESskSUKOxekWgjyHEtQc7ui0ZidLEHibM,4981
40
+ g3dt/services/upload/metadata/upload_all_studies.sh,sha256=8ANiiRU9vKbfv174-6XCAu1wXfVdxJkfK3WOlYd2osU,2951
41
+ g3dt/services/upload/metadata/upload_metadata.py,sha256=fTXbGpQkLRIGRIbGno5LSLUcivp8ltfHwclS3v5Yz9Q,4950
42
+ g3dt/upload/__init__.py,sha256=hXU9IZQGMTQk7d6vo4NvNxSqH_ZDq7dYJ1oNJrv26Pc,34
43
+ g3dt/upload/metadata_deleter.py,sha256=jxAyY1r739CEnzOuxrJv-a0AGJcVl6I5cYajnTXTlWU,8405
44
+ g3dt/upload/metadata_submitter.py,sha256=8_QO-n_TtMm0ujoYzbCOYqLevrlXOrPABQeB7wuB3II,39920
45
+ g3dt/upload/upload_synthdata_s3.py,sha256=Ge5TQzZkWnJNp-q0Ak-Yhv1h1eWLxg-PlWVHrd1m0B8,5155
46
+ g3dt/utils/athena_utils.py,sha256=oxIP08-tjMdCK6egCVO2GmL8iA_1z1i9FY-fXS2j-X8,33389
47
+ g3dt/utils/dbt_utils.py,sha256=5XRFOwNNIeuW2sQuor3h_OZTuXGg6xv2AUYwj9bMAAM,2054
48
+ g3dt/utils/release_writer.py,sha256=I8UPNKLMdK2wEjL9KsRJGkbI_YSqpx0j6sydwLrjbas,7771
49
+ g3dt/validate/validate.py,sha256=4maAZh14uTwBTvhdMSOiYea9Ql6YPttL69FwBlUsINU,22912
50
+ gen3_dataops_toolkit-2.0.0.dist-info/METADATA,sha256=9saenX-9cQ-rD84pP9-7N2okNtzylIqaR7mrVvUyh8U,5076
51
+ gen3_dataops_toolkit-2.0.0.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
52
+ gen3_dataops_toolkit-2.0.0.dist-info/entry_points.txt,sha256=h105uANZs0L-lhqNPipmquf6BkzqKSSAlWaABhyljbo,43
53
+ gen3_dataops_toolkit-2.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.4.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ g3dt=g3dt.cli.main:main
3
+