gen3-dataops-toolkit 3.6.1__tar.gz → 3.7.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 (56) hide show
  1. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/PKG-INFO +5 -2
  2. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/README.md +4 -1
  3. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/pyproject.toml +1 -1
  4. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/synth.py +22 -0
  5. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/synthetic_data/full_deploy_dd_and_synth.sh +19 -9
  6. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/__init__.py +0 -0
  7. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/__init__.py +0 -0
  8. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/__init__.py +0 -0
  9. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/dispatch.py +0 -0
  10. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/registry.py +0 -0
  11. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/resolve.py +0 -0
  12. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/runner.py +0 -0
  13. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/_internal/safety.py +0 -0
  14. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/config_cmds.py +0 -0
  15. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/delete_cmds.py +0 -0
  16. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/dict_cmds.py +0 -0
  17. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/ec2_cmds.py +0 -0
  18. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/indexd_cmds.py +0 -0
  19. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/jobs.py +0 -0
  20. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/k8s.py +0 -0
  21. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/main.py +0 -0
  22. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/metadata.py +0 -0
  23. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/pipeline_cmds.py +0 -0
  24. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/cli/release_cmds.py +0 -0
  25. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/config.py +0 -0
  26. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/indexd/__init__.py +0 -0
  27. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/indexd/file_access.py +0 -0
  28. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/indexd/indexd_registrar.py +0 -0
  29. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/ingest/ingest.py +0 -0
  30. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/resolver.py +0 -0
  31. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/delete/delete_all_metadata_for_project.py +0 -0
  32. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/delete/delete_metadata.sh +0 -0
  33. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/delete/delete_metadata_by_guid.py +0 -0
  34. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/dictionary/deploy_dd.sh +0 -0
  35. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/dictionary/pull_dict.sh +0 -0
  36. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/dictionary/upload_dictionary.py +0 -0
  37. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/indexd/register_indexd.py +0 -0
  38. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/indexd/verify_file_access.py +0 -0
  39. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/argocd_restart_etl.sh +0 -0
  40. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/argocd_restart_ms.sh +0 -0
  41. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/argocd_restart_schema.sh +0 -0
  42. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/login_to_pod.sh +0 -0
  43. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/k8s_ops/restart_etl_and_ms.sh +0 -0
  44. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/synthetic_data/delete_synth_metadata_sheepdog.py +0 -0
  45. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/synthetic_data/generate_synth_metadata.sh +0 -0
  46. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/synthetic_data/upload_synth_metadata_sheepdog.py +0 -0
  47. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/upload/metadata/upload_all_studies.sh +0 -0
  48. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/services/upload/metadata/upload_metadata.py +0 -0
  49. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/upload/__init__.py +0 -0
  50. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/upload/metadata_deleter.py +0 -0
  51. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/upload/metadata_submitter.py +0 -0
  52. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/upload/upload_synthdata_s3.py +0 -0
  53. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/utils/athena_utils.py +0 -0
  54. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/utils/dbt_utils.py +0 -0
  55. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/utils/release_writer.py +0 -0
  56. {gen3_dataops_toolkit-3.6.1 → gen3_dataops_toolkit-3.7.0}/src/g3dt/validate/validate.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gen3-dataops-toolkit
3
- Version: 3.6.1
3
+ Version: 3.7.0
4
4
  Summary: Gen3 DataOps toolkit (g3dt): operate SSM-published Gen3 data pipeline environments
5
5
  License: Apache-2.0
6
6
  Author: JoshuaHarris391
@@ -227,7 +227,10 @@ g3dt synth deploy -e test --studies synthetic_dataset_1 -n 100 --prev-version v1
227
227
  `deploy --skip-dict` runs the synthetic-data-only flow (delete previous
228
228
  batch, generate, upload, ETL) without re-uploading the dictionary or
229
229
  restarting the schema microservices — use it when the deployed dictionary is
230
- already current.
230
+ already current. Deleting the previous batch is the flow's one destructive
231
+ step, so it asks for confirmation (decline to skip it, or pass
232
+ `--skip-delete` to skip without prompting); on a first deploy, when no
233
+ previous batch exists locally, deletion is skipped automatically.
231
234
 
232
235
  `deploy` without `--studies` falls back to the original ACDC demo set
233
236
  (`AusDiab_Simulated,Baker-Biobank_Simulated,BioHeart-CT_Simulated,CAUGHT-CAD_Simulated`
@@ -193,7 +193,10 @@ g3dt synth deploy -e test --studies synthetic_dataset_1 -n 100 --prev-version v1
193
193
  `deploy --skip-dict` runs the synthetic-data-only flow (delete previous
194
194
  batch, generate, upload, ETL) without re-uploading the dictionary or
195
195
  restarting the schema microservices — use it when the deployed dictionary is
196
- already current.
196
+ already current. Deleting the previous batch is the flow's one destructive
197
+ step, so it asks for confirmation (decline to skip it, or pass
198
+ `--skip-delete` to skip without prompting); on a first deploy, when no
199
+ previous batch exists locally, deletion is skipped automatically.
197
200
 
198
201
  `deploy` without `--studies` falls back to the original ACDC demo set
199
202
  (`AusDiab_Simulated,Baker-Biobank_Simulated,BioHeart-CT_Simulated,CAUGHT-CAD_Simulated`
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "gen3-dataops-toolkit"
3
- version = "3.6.1"
3
+ version = "3.7.0"
4
4
  description = "Gen3 DataOps toolkit (g3dt): operate SSM-published Gen3 data pipeline environments"
5
5
  authors = ["JoshuaHarris391 <harjo391@gmail.com>"]
6
6
  readme = "README.md"
@@ -232,6 +232,12 @@ def deploy(
232
232
  "synthetic data only: delete previous batch, generate, upload, run "
233
233
  "ETL. Use when the deployed dictionary is already current.",
234
234
  ),
235
+ skip_delete: bool = typer.Option(
236
+ False, "--skip-delete",
237
+ help="Skip step 3 (deleting the previous synthetic batch) without "
238
+ "prompting. Without this flag, deletion asks for confirmation; "
239
+ "declining skips it and the flow continues.",
240
+ ),
235
241
  ) -> None:
236
242
  """Full end-to-end synthetic deploy: the whole cycle in one command.
237
243
 
@@ -251,6 +257,11 @@ def deploy(
251
257
  synthetic-data only. Equivalent by hand: synth delete + synth generate +
252
258
  synth upload + k8s restart-etl.
253
259
 
260
+ Step 3 is destructive, so it asks for confirmation (skip it outright with
261
+ --skip-delete, or decline the prompt — the flow continues either way).
262
+ On a first deploy, when no previous batch exists locally, deletion is
263
+ skipped automatically.
264
+
254
265
  Provider/model, restart targets, and the ETL cronjob come from the env's
255
266
  SSM tree unless overridden; the API key path comes from
256
267
  --llm-api-key-file or the marker. Studies and record counts are batch
@@ -265,6 +276,15 @@ def deploy(
265
276
  safety.confirm_prod_strict("synthetic full deploy", env)
266
277
  effective_studies = studies or DEPLOY_DEFAULT_STUDIES
267
278
  _check_per_study_counts(effective_studies, num_records)
279
+ if not skip_delete:
280
+ # Deleting the previous batch is the one destructive step in the
281
+ # flow; declining just skips it — everything else still runs.
282
+ effective_prev = prev_version or DEPLOY_DEFAULT_PREV_VERSION
283
+ skip_delete = not typer.confirm(
284
+ f"Delete the previous synthetic batch ({effective_studies} @ "
285
+ f"{effective_prev}) from the commons before uploading the new one?",
286
+ default=True,
287
+ )
268
288
  env_vars = script_env(e)
269
289
  env_vars.update(_llm_env_overrides(e, llm_provider, llm_model, llm_api_key_file))
270
290
  if restart_services:
@@ -279,6 +299,8 @@ def deploy(
279
299
  env_vars["G3DT_SYNTH_PREV_VERSION"] = prev_version
280
300
  if skip_dict:
281
301
  env_vars["G3DT_SYNTH_SKIP_DICT"] = "1"
302
+ if skip_delete:
303
+ env_vars["G3DT_SYNTH_SKIP_DELETE"] = "1"
282
304
  runner.run(
283
305
  runner.bash_script(
284
306
  "services/synthetic_data/full_deploy_dd_and_synth.sh", env
@@ -111,16 +111,26 @@ else
111
111
  fi
112
112
  fi
113
113
 
114
- echo "==== [4] Deleting old synthetic data (${STUDIES}) for version ${PREV_VERSION} ===="
115
- DELETE_SYNTH_ARGS=(
116
- -p "${STUDIES}"
117
- -s "${AWS_SECRET_NAME}"
118
- -i "${DATA_IMPORT_ORDER_FILE}"
119
- )
120
- if [ -n "${G3DT_AWS_PROFILE:-}" ]; then
121
- DELETE_SYNTH_ARGS+=(-profile "${G3DT_AWS_PROFILE}")
114
+ if [ -n "${G3DT_SYNTH_SKIP_DELETE:-}" ]; then
115
+ echo "==== [4] Skipping deletion of the previous synthetic batch (per operator choice) ===="
116
+ elif [ ! -f "${DATA_IMPORT_ORDER_FILE}" ]; then
117
+ # First deploy for these studies (or a different --prev-version): there is
118
+ # no previous local batch to walk, so there is nothing to delete.
119
+ echo "==== [4] No previous batch found — skipping deletion ===="
120
+ echo " (missing ${DATA_IMPORT_ORDER_FILE};"
121
+ echo " first deploy for these studies, or pass --prev-version)"
122
+ else
123
+ echo "==== [4] Deleting old synthetic data (${STUDIES}) for version ${PREV_VERSION} ===="
124
+ DELETE_SYNTH_ARGS=(
125
+ -p "${STUDIES}"
126
+ -s "${AWS_SECRET_NAME}"
127
+ -i "${DATA_IMPORT_ORDER_FILE}"
128
+ )
129
+ if [ -n "${G3DT_AWS_PROFILE:-}" ]; then
130
+ DELETE_SYNTH_ARGS+=(-profile "${G3DT_AWS_PROFILE}")
131
+ fi
132
+ python3 "${SERVICE_DIR}/synthetic_data/delete_synth_metadata_sheepdog.py" "${DELETE_SYNTH_ARGS[@]}"
122
133
  fi
123
- python3 "${SERVICE_DIR}/synthetic_data/delete_synth_metadata_sheepdog.py" "${DELETE_SYNTH_ARGS[@]}"
124
134
 
125
135
  echo "==== [5] Generating new synthetic data (${STUDIES}) for version ${VERSION} (LLM-realistic) ===="
126
136
  bash "${SERVICE_DIR}/synthetic_data/generate_synth_metadata.sh" \